Index: /branches/LMDZ_WRFmeas_develop/WRFV3/lmdz/physiq.F90
===================================================================
--- /branches/LMDZ_WRFmeas_develop/WRFV3/lmdz/physiq.F90	(revision 149)
+++ /branches/LMDZ_WRFmeas_develop/WRFV3/lmdz/physiq.F90	(revision 150)
@@ -1305,4 +1305,5 @@
 ! L. Fita, LMD August 2014
       CHARACTER(LEN=50)                                  :: errmsg, fname, varname
+      CHARACTER(LEN=50)                                  :: jDS, jHS
       LOGICAL                                            :: found
       REAL                                               :: largest
@@ -1316,4 +1317,23 @@
 !
       CALL phys_cal_update(jD_cur,jH_cur)
+      WRITE(jDS,'f10.5')jD_cur
+      WRITE(jHS,'f10.5')jH_cur
+
+      fname = 'Entering in physic at day= '//TRIM(jDS)//' hour: '//TRIM(jHS)
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 
 !c======================================================================
@@ -1855,4 +1875,21 @@
 !
       itap   = itap + 1
+      WRITE(jDS,'I5')itap
+      fname = 'After itap= '//TRIM(jDS)
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 !c
 !
@@ -1970,4 +2007,19 @@
       END IF 
       PRINT *,'  Lluis 1 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After dynamic'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 
 !c Diagnostiquer la tendance dynamique
@@ -2131,4 +2183,19 @@
       END IF 
       PRINT *,'  Lluis 2 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After reevap'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 !c
 !c=========================================================================
@@ -2169,5 +2236,4 @@
 ! non nul aux poles.
       IF (abs(solarlong0-1000.)<1.e-4) then
-         PRINT *,' Lluis calling zenang_an'
          call zenang_an(cycle_diurne,jH_cur,rlat,rlon,rmu0,fract)
       ELSE
@@ -2213,7 +2279,4 @@
 
       if (iflag_pbl/=0) then
-
-      PRINT *,'  Lluis before pbl_surface qsol: ',qsol(llp),    &
-        ' rmu0: ',rmu0(llp),' jH_cur: ',jH_cur
 
       CALL pbl_surface(                                                              &
@@ -2241,6 +2304,19 @@
        &     zxfluxt,   zxfluxq,   q2m,     fluxq, pbl_tke )
 
-      PRINT *,'  Lluis after pbl_surface qsol: ',qsol(llp),    &
-        ' rmu0: ',rmu0(llp),' jH_cur: ',jH_cur
+      fname = 'After pbl_surface'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 
 !-----------------------------------------------------------------------------------------
@@ -2274,4 +2350,20 @@
       ENDIF
       PRINT *,'  Lluis 3 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After surface_main'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 !c =================================================================== c
 !c   Calcul de Qsat
@@ -2635,4 +2727,20 @@
 !C
       PRINT *,'  Lluis 4 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After convection'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
       IF (check) THEN
           za = qcheck(klon,klev,paprs,q_seri,ql_seri,airephy)
@@ -2748,4 +2856,20 @@
       END IF 
       PRINT *,'  Lluis 5 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After wakes'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 !c      print*,'apres callwake iflag_cldcon=', iflag_cldcon
 !c
@@ -2975,4 +3099,19 @@
       END IF 
       PRINT *,'  Lluis 6 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After thermals'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 
 !c-------------------------------------------------------------------------
@@ -3042,4 +3181,20 @@
       END IF 
       PRINT *,'  Lluis 7 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After firstilp'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
       if (mydebug) then
         call writefield_phy('u_seri',u_seri,llm)
@@ -3274,4 +3429,20 @@
       END IF 
       PRINT *,'  Lluis 8 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After coupling convection+thermics+wakes'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 !c
 !c Calculer l'humidite relative pour diagnostique
@@ -3517,6 +3688,4 @@
       ENDIF
 !c
-      PRINT *,'  Lluis before calling radlwsw rmu0: ',rmu0(llp),   &
-        ' dist: ',dist,' frac: ',fract(llp),' jH_cur: ',jH_cur
          CALL radlwsw                                                                &
        &        (dist, rmu0, fract,                                                  &
@@ -3541,6 +3710,4 @@
        &        solsw_aero, solsw0_aero,                                             &
        &        topswcf_aero, solswcf_aero)
-      PRINT *,'  Lluis after calling radlwsw rmu0: ',rmu0(llp),   &
-        ' dist: ',dist,' frac: ',fract(llp),' jH_cur: ',jH_cur
          
 !c
@@ -3647,4 +3814,20 @@
       END IF 
       PRINT *,'  Lluis 9 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After radiation'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
 !c
 !c
@@ -3822,8 +4005,19 @@
       END IF 
       PRINT *,'  Lluis 10 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
-      fname = '10 d_h_vcol'
+      fname = 'after orography'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
       varname = 't_seri'
       CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
-
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 !c
 !c
@@ -3939,6 +4133,18 @@
 !c
       fname = 'after phytrac'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
       varname = 't_seri'
       CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
 
 !================================================================
@@ -3955,6 +4161,18 @@
 
       fname = 'after ener_conserv'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
       varname = 't_seri'
       CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
       varname = 'd_t_ec'
       CALL check_var3D(fname, varname, d_t_ec, klon, klev, largest, .FALSE.)
@@ -3983,4 +4201,20 @@
       END IF 
       PRINT *,'  Lluis 11 d_h_vcol: ',d_h_vcol,' d_h_vcol_phy: ',d_h_vcol_phy
+      fname = 'After everything, writting'
+      varname = 'paprs'
+      CALL check_var3D(fname, varname, paprs, klon, klev+1, largest, .FALSE.)
+      varname = 'pplay'
+      CALL check_var3D(fname, varname, pplay, klon, klev, largest, .FALSE.)
+      varname = 'pphi'
+      CALL check_var3D(fname, varname, pphi, klon, klev, largest, .FALSE.)
+      varname = 't_seri'
+      CALL check_var3D(fname, varname, t_seri, klon, klev, largest, .FALSE.)
+      varname = 'u_seri'
+      CALL check_var3D(fname, varname, u_seri, klon, klev, largest, .FALSE.)
+      varname = 'v_seri'
+      CALL check_var3D(fname, varname, v_seri, klon, klev, largest, .FALSE.)
+      varname = 'q_seri'
+      CALL check_var3D(fname, varname, q_seri, klon, klev, largest, .FALSE.)
+
       PRINT *,'Lluis Reaching the SORTIES point'
 
