Index: /trunk/WRFV3/lmdz/physiq.F90
===================================================================
--- /trunk/WRFV3/lmdz/physiq.F90	(revision 177)
+++ /trunk/WRFV3/lmdz/physiq.F90	(revision 178)
@@ -2476,4 +2476,10 @@
 !c=================================================================================================
 
+       PRINT *,'  Lluis end calc itap: ', itap,' it_wape_prescr: ',&
+         it_wape_prescr,' k ale ale_wake alp alp_bl ale ale_bl _____'
+        DO i=1, klev
+         PRINT *, i, ale(i), ale_wake(i), alp(i),alp_bl(i), ale(i),  &
+           ale_bl(i)
+      END DO
 
 !c sb, oct02:
@@ -2791,4 +2797,11 @@
 !ccc fin nrlmd le 10/04/2012
 
+         PRINT *,'  Lluis before the itap: ', itap,' it_wape_prescr: ',&
+           it_wape_prescr,' k ale ale_wake alp alp_bl ale ale_bl _____'
+          DO i=1, klev
+           PRINT *, i, ale(i), ale_wake(i), alp(i),alp_bl(i), ale(i),  &
+             ale_bl(i)
+         END DO
+
          if (iflag_thermals>=1) then
          call calltherm(pdtphys                                                      &
@@ -2811,4 +2824,11 @@
 !ccc fin nrlmd le 10/04/2012                                                         &
        &      ,zqla,ztva )
+
+       PRINT *,'  Lluis after the itap: ', itap,' it_wape_prescr: ',&
+         it_wape_prescr,' k ale ale_wake alp alp_bl ale ale_bl _____'
+       DO i=1, klev
+         PRINT *, i, ale(i), ale_wake(i), alp(i),alp_bl(i), ale(i),  &
+          ale_bl(i)
+       END DO
 
 !ccc nrlmd le 10/04/2012
@@ -4285,10 +4305,12 @@
 
 ! Lluis
-  PRINT *,'  Lluis: ',klev,'  UBOUNDS: ',UBOUND(t_seri), UBOUND(u_seri),             &
-    UBOUND(d_q_con), UBOUND(d_t_con)
-  PRINT *,'  Lluis llp ',llp,' itap: ',itap,' zlev t_seri u_seri d_q_con d_t_con_____'
-  DO i=1,klev
-     PRINT *,i,t_seri(llp,i), u_seri(llp,i), d_q_con(llp,i), d_t_con(llp,i)
-  END DO 
+      PRINT *,'  Lluis: ',klev,'  UBOUNDS: ',UBOUND(t_seri),      &
+        UBOUND(u_seri), UBOUND(d_q_con), UBOUND(d_t_con)
+       PRINT *,'  Lluis llp ',llp,' itap: ',itap,' zlev t_seri ' // &
+         'u_seri d_q_con d_t_con_____'
+       DO i=1,klev
+         PRINT *,i,t_seri(llp,i), u_seri(llp,i), d_q_con(llp,i),    &
+           d_t_con(llp,i)
+       END DO 
 
 
Index: /trunk/WRFV3/lmdz/thermcell_main.F90
===================================================================
--- /trunk/WRFV3/lmdz/thermcell_main.F90	(revision 177)
+++ /trunk/WRFV3/lmdz/thermcell_main.F90	(revision 178)
@@ -253,18 +253,23 @@
 ! L. Fita, LMD July 2014. Initializing variables. 
 !   Some not initializated according to values: iflag_trig_bl, iflag_clos_bl
-     zdthladj = 0.
-     pbl_tke_max0 = 0.
-     fraca0 = 0.
-     w_conv = 0.
-     w0 = 0.
-     therm_tke_max0 = 0.
-     env_tke_max0 = 0.
-     alp_bl_det = 0.
-     alp_bl_fluct_m = 0.
-     alp_bl_fluct_tke = 0.
-     alp_bl_conv = 0.
-     alp_bl_stat = 0.
-     interp = 0.
-     klcl = 0
+      PRINT *,'  Lluis debut thermcell_main i Alp_bl Ale_bl __' 
+      DO l=1, ngrid
+        PRINT *, l, Alp_bl(l), Ale_bl(l)
+      END DO
+
+!!     zdthladj = 0.
+!!     pbl_tke_max0 = 0.
+!!     fraca0 = 0.
+!!     w_conv = 0.
+!!     w0 = 0.
+!!     therm_tke_max0 = 0.
+!!     env_tke_max0 = 0.
+!!     alp_bl_det = 0.
+!!     alp_bl_fluct_m = 0.
+!!     alp_bl_fluct_tke = 0.
+!!     alp_bl_conv = 0.
+!!     alp_bl_stat = 0.
+!!     interp = 0.
+!!     klcl = 0
 
 !-----------------------------------------------------------------------
@@ -487,4 +492,5 @@
 !      print*,'THERM thermcell_main iflag_thermals_ed=',iflag_thermals_ed
       if (iflag_thermals_ed<=9) then
+         PRINT *,'  Lluis going to thermcell_plume!!!!'
 !         print*,'THERM NOUVELLE/NOUVELLE Arnaud'
          CALL thermcell_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,po,zl,rhobarz,&
@@ -495,4 +501,5 @@
 
       elseif (iflag_thermals_ed>9) then
+         PRINT *,'  Lluis going to thermcellV1_plume!!!!'
 !        print*,'THERM RIO et al 2010, version d Arnaud'
          CALL thermcellV1_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,po,zl,rhobarz,&
@@ -503,4 +510,6 @@
 
       endif
+      PRINT *,'  Lluis in thermcell_main iflag_thermals_ed: ',       &
+        iflag_thermals_ed, ' ig=528 ',zw2(528,:)
 
       if (prt_level.ge.1) print*,'apres thermcell_plume ',lev_out
@@ -601,4 +610,5 @@
      &       detr,zqla,lev_out,lunout1,igout)
 !IM 060508    &       detr,zqla,zmax,lev_out,lunout,igout)
+      PRINT *,'  Lluis after thermcell_flux2 ig=528 zw2: ',zw2(528,:)
 
       if (prt_level.ge.1) print*,'thermcell_main apres thermcell_flux'
@@ -745,4 +755,5 @@
       if (prt_level.ge.10)write(lunout,*)                                &
     &     'WARNING thermcell_main wth2=0. si zw2 > 1.e-10'
+      PRINT *,'  Lluis in thermcell_main ig=528 l wth3 zf2 fraca zw2 ___' 
       do l=1,nlay
          do ig=1,ngrid
@@ -758,4 +769,8 @@
             wth3(ig,l)=zf2*(1-2.*fraca(ig,l))/(1-fraca(ig,l))  &
      &                *zw2(ig,l)*zw2(ig,l)*zw2(ig,l)
+            IF (ig == 528) PRINT *, l, wth3(ig,l), zf2,           &
+               fraca(ig,l), zw2(ig,l)
+!             PRINT *, ig, l, wth3(ig,l), zf2,           &
+!               fraca(ig,l), zw2(ig,l)
             q2(ig,l)=zf2*(zqta(ig,l)*1000.-po(ig,l)*1000.)**2
 !test: on calcul q2/po=ratqsc
@@ -1001,4 +1016,10 @@
       enddo
       enddo
+      PRINT *,'  Lluis in thermcell_main i Alp_bl Srhobarz Swth3 ' //&
+        'Ale_bl Szw2 ______', alp_bl_k
+      DO l=1, ngrid
+        PRINT *, l, Alp_bl(l), SUM(rhobarz(l,:)), SUM(wth3(l,:)),    &
+           Ale_bl(l), SUM(zw2(l,:)) 
+      END DO
 
 !test:calcul de la ponderation des couches pour KE
Index: /trunk/WRFV3/lmdz/thermcell_plume.F90
===================================================================
--- /trunk/WRFV3/lmdz/thermcell_plume.F90	(revision 177)
+++ /trunk/WRFV3/lmdz/thermcell_plume.F90	(revision 178)
@@ -191,4 +191,9 @@
     endif
 enddo
+  PRINT *,'  Lluis in themcell_plume ig actvie l zw2 ztv zlev pphi ___'
+  DO ig=1,ngrid
+    PRINT *,ig, active(ig), 1, zw2(ig,1), ztv(ig,1), zlev(ig,1), pphi(ig,1), &
+      2, zw2(ig,2), ztv(ig,2), zlev(ig,2), pphi(ig,2)
+  END DO
 !
 !==============================================================================
@@ -645,4 +650,9 @@
     endif
 enddo
+  PRINT *,'  Lluis in themcellV1_plume ig actvie l zw2 ztv zlev pphi ___'
+  DO ig=1,ngrid
+    PRINT *,ig, active(ig), 1, zw2(ig,1), ztv(ig,1), zlev(ig,1), pphi(ig,1), &
+      2, zw2(ig,2), ztv(ig,2), zlev(ig,2), pphi(ig,2)
+  END DO
 !
 
Index: /trunk/WRFV3/run/namelist.input.backup
===================================================================
--- /trunk/WRFV3/run/namelist.input.backup	(revision 177)
+++ /trunk/WRFV3/run/namelist.input.backup	(revision 178)
@@ -1,79 +1,72 @@
  &time_control
  run_days                            = 0,
- run_hours                           = 0,
+ run_hours                           = 12,
  run_minutes                         = 0,
  run_seconds                         = 0,
- start_year                          = 1995,
- start_month                         = 01, 
- start_day                           = 13,
- start_hour                          = 00,
- start_minute                        = 00,
- start_second                        = 00,
- end_year                            = 1995,
- end_month                           = 01, 
- end_day                             = 18,
- end_hour                            = 00,
- end_minute                          = 00,
- end_second                          = 00,
- history_interval                    = 30,
- interval_seconds                    = 21600 
- input_from_file                     = .true.,
- frames_per_outfile                  = 240,
+ start_year                          = 2000, 2000, 2000,
+ start_month                         = 01,   01,   01,
+ start_day                           = 24,   24,   24,
+ start_hour                          = 12,   12,   12,
+ start_minute                        = 00,   00,   00,
+ start_second                        = 00,   00,   00,
+ end_year                            = 2000, 2000, 2000,
+ end_month                           = 01,   01,   01,
+ end_day                             = 25,   25,   25,
+ end_hour                            = 12,   12,   12,
+ end_minute                          = 00,   00,   00,
+ end_second                          = 00,   00,   00,
+ interval_seconds                    = 21600
+ input_from_file                     = .true.,.true.,.true.,
+ history_interval                    = 180,  60,   60,
+ frames_per_outfile                  = 1000, 1000, 1000,
  restart                             = .false.,
- restart_interval_h                  = 120,
+ restart_interval                    = 5000,
  io_form_history                     = 2
  io_form_restart                     = 2
  io_form_input                       = 2
  io_form_boundary                    = 2
- auxinput4_inname                    = 'wrflowinp_d<domain>'
- auxinput4_interval                  = 360, 
- io_form_auxinput4                   = 2
- override_restart_timers             = .true.
  debug_level                         = 0
  /
 
  &domains
- time_step                           = 180 
- time_step_fract_num                 = 00
- time_step_fract_den                 = 1
+ time_step                           = 180,
+ time_step_fract_num                 = 0,
+ time_step_fract_den                 = 1,
  max_dom                             = 1,
- e_we                                = 80, 
- e_sn                                = 90, 
- e_vert                              = 39,
- p_top_requested                     = 1000,
- num_metgrid_levels                  = 38,
+ e_we                                = 74,    112,   94,
+ e_sn                                = 61,    97,    91,
+ e_vert                              = 28,    28,    28,
+ p_top_requested                     = 5000,
+ num_metgrid_levels                  = 27,
  num_metgrid_soil_levels             = 4,
- dx                                  = 20000.,
- dy                                  = 20000.,
- grid_id                             = 1,   
- parent_id                           = 0,  
- i_parent_start                      = 1,  
- j_parent_start                      = 1,  
- parent_grid_ratio                   = 1,  
- parent_time_step_ratio              = 1, 
+ dx                                  = 30000, 10000,  3333.33,
+ dy                                  = 30000, 10000,  3333.33,
+ grid_id                             = 1,     2,     3,
+ parent_id                           = 0,     1,     2,
+ i_parent_start                      = 1,     31,    30,
+ j_parent_start                      = 1,     17,    30,
+ parent_grid_ratio                   = 1,     3,     3,
+ parent_time_step_ratio              = 1,     3,     3,
  feedback                            = 1,
  smooth_option                       = 0
- bottom_top_plus1                    = 39,
- max_lidar_locs                      = 20,
  /
 
  &physics
- mp_physics                          = 0, 
- ra_lw_physics                       = 0, 
- ra_sw_physics                       = 0, 
- radt                                = 120,
- sf_sfclay_physics                   = 0, 
- sf_surface_physics                  = 0, 
- bl_pbl_physics                      = 0, 
- bldt                                = 0, 
- cu_physics                          = 0, 
- cudt                                = 0, 
+ mp_physics                          = 3,     3,     3,
+ ra_lw_physics                       = 1,     1,     1,
+ ra_sw_physics                       = 1,     1,     1,
+ radt                                = 30,    30,    30,
+ sf_sfclay_physics                   = 1,     1,     1,
+ sf_surface_physics                  = 2,     2,     2,
+ bl_pbl_physics                      = 1,     1,     1,
+ bldt                                = 0,     0,     0,
+ cu_physics                          = 1,     1,     0,
+ cudt                                = 5,     5,     5,
  isfflx                              = 1,
  ifsnow                              = 0,
  icloud                              = 1,
  surface_input_source                = 1,
- num_soil_layers                     = 5,
- mp_zero_out                         = 0,
- sst_update                          = 1
+ num_soil_layers                     = 4,
+ sf_urban_physics                    = 0,     0,     0,
  /
 
@@ -82,27 +75,26 @@
 
  &dynamics
- diff_opt                            = 0,
- km_opt                              = 0,
- damp_opt                            = 3,
+ w_damping                           = 0,
+ diff_opt                            = 1,
+ km_opt                              = 4,
+ diff_6th_opt                        = 0,      0,      0,
+ diff_6th_factor                     = 0.12,   0.12,   0.12,
  base_temp                           = 290.
- zdamp                               = 5000., 
- dampcoef                            = 0.2,  
- khdif                               = 0,   
- kvdif                               = 0,   
- non_hydrostatic                     = .true.,
- moist_adv_opt                       = 0,    
- scalar_adv_opt                      = 0,   
- chem_adv_opt                        = 0,  
- tke_adv_opt                         = 0,  
- fft_filter_lat                      = 75.,
- w_damping                           = 1,
+ damp_opt                            = 0,
+ zdamp                               = 5000.,  5000.,  5000.,
+ dampcoef                            = 0.2,    0.2,    0.2
+ khdif                               = 0,      0,      0,
+ kvdif                               = 0,      0,      0,
+ non_hydrostatic                     = .true., .true., .true.,
+ moist_adv_opt                       = 1,      1,      1,     
+ scalar_adv_opt                      = 1,      1,      1,     
  /
 
  &bdy_control
-  spec_bdy_width           = 5,
-  spec_zone                = 1,
-  relax_zone               = 4,
-  specified                = .true.,
-  nested                   = .false.,
+ spec_bdy_width                      = 5,
+ spec_zone                           = 1,
+ relax_zone                          = 4,
+ specified                           = .true., .false.,.false.,
+ nested                              = .false., .true., .true.,
  /
 
