Index: LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90	(revision 2610)
+++ LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90	(revision 2611)
@@ -1,3 +1,3 @@
-SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
+SUBROUTINE add_pbl_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
   ! ======================================================================
   ! Ajoute les tendances de couche limite, soit determinees par la
@@ -34,4 +34,5 @@
   CHARACTER *(*) text
   REAL paprs(klon,klev+1)
+  INTEGER flag_inhib_tend ! if flag_inhib_tend != 0, tendencies are not added
 
   ! Local :
@@ -56,7 +57,7 @@
     PRINT *, ' add_pbl_tend, zzdt ', zzdt
     PRINT *, ' add_pbl_tend, zzdq ', zzdq
-    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy)
+    CALL add_phys_tend(zdu, zdv, zzdt, zzdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
   ELSE
-    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy)
+    CALL add_phys_tend(zdu, zdv, zdt, zdq, zdql, zdqi, paprs, text,abortphy,flag_inhib_tend)
   END IF
 
Index: LMDZ5/trunk/libf/phylmd/add_phys_tend.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/add_phys_tend.F90	(revision 2610)
+++ LMDZ5/trunk/libf/phylmd/add_phys_tend.F90	(revision 2611)
@@ -2,5 +2,5 @@
 ! $Id$
 !
-SUBROUTINE add_phys_tend (zdu,zdv,zdt,zdq,zdql,zdqi,paprs,text,abortphy)
+SUBROUTINE add_phys_tend (zdu,zdv,zdt,zdq,zdql,zdqi,paprs,text,abortphy,flag_inhib_tend)
 !======================================================================
 ! Ajoute les tendances des variables physiques aux variables 
@@ -20,4 +20,5 @@
 USE geometry_mod, ONLY: longitude_deg, latitude_deg
 USE print_control_mod, ONLY: prt_level
+USE cmp_seri_mod
 IMPLICIT none
   include "YOMCST.h"
@@ -31,4 +32,5 @@
 CHARACTER*(*) text
 INTEGER abortphy
+INTEGER flag_inhib_tend ! if flag_inhib_tend != 0, tendencies are not added
 
 ! Local :
@@ -55,5 +57,20 @@
 ! Initialisations
 
-      IF (abortphy==1) RETURN ! on n ajoute pas les tendance si le modele
+     IF (prt_level >= 5) then
+        write (*,*) "In add_phys_tend, after ",text
+        call flush
+     end if
+
+     ! if flag_inhib_tend != 0, tendencies are not added
+     IF (flag_inhib_tend /= 0) then
+        ! If requiered, diagnostics are shown
+        IF (flag_inhib_tend > 0) then
+           ! print some diagnostics if xxx_seri have changed
+           call cmp_seri(flag_inhib_tend,text)
+        END IF
+        RETURN ! on n ajoute pas les tendance
+     END IF
+
+     IF (abortphy==1) RETURN ! on n ajoute pas les tendance si le modele
                               ! a deja plante.
 
@@ -259,4 +276,4 @@
 
 
-      RETURN
-      END
+  RETURN
+END SUBROUTINE add_phys_tend
Index: LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 2610)
+++ LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 2611)
@@ -248,7 +248,13 @@
       integer jcode
       INTEGER read_climoz 
+!
+      integer :: it_end ! iteration number of the last call
 !Al1
       integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file
       data ecrit_slab_oc/-1/
+!
+!     if flag_inhib_forcing = 0, tendencies of forcing are added
+!                           <> 0, tendencies of forcing are not added
+      INTEGER :: flag_inhib_forcing = 0
 
 !=====================================================================
@@ -747,7 +753,9 @@
         pbl_tke(:,2,:)=1.e-2
         PRINT *, ' pbl_tke dans lmdz1d '
-       DO nsrf = 1,4
-         PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf)
-       ENDDO
+        if (prt_level .ge. 5) then 
+         DO nsrf = 1,4
+           PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf)
+         ENDDO
+        end if
 
 !>jyg
@@ -900,13 +908,15 @@
 !=====================================================================
            
-      do while(it.le.nint(fnday*day_step))
+      it_end = nint(fnday*day_step)
+!test JLD     it_end = 10
+      do while(it.le.it_end)
 
        if (prt_level.ge.1) then
          print*,'XXXXXXXXXXXXXXXXXXX ITAP,day,time=',                       &
-     &             it,day,time,nint(fnday*day_step),day_step
+     &             it,day,time,it_end,day_step
          print*,'PAS DE TEMPS ',timestep
        endif
 !Al1 demande de restartphy.nc
-       if (it.eq.nint(fnday*day_step)) lastcall=.True.
+       if (it.eq.it_end) lastcall=.True.
 
 !---------------------------------------------------------------------
@@ -938,4 +948,6 @@
          write(*,*) 'firstcall,lastcall,phis',                               &
      &               firstcall,lastcall,phis
+       end if
+       if (prt_level>=5) then
          write(*,'(a10,2a4,4a13)') 'BEFOR1 IT=','it','l',                   &
      &        'presniv','plev','play','phi'
@@ -959,7 +971,7 @@
 
 !---------------------------------------------------------------------
-! Listing output for debug prt_level>=1
-!---------------------------------------------------------------------
-        if (prt_level>=1) then
+! Listing output for debug
+!---------------------------------------------------------------------
+        if (prt_level>=5) then
           write(*,'(a11,2a4,4a13)') 'AFTER1 IT=','it','l',                  &
      &        'presniv','plev','play','phi'
@@ -998,5 +1010,5 @@
         endif
 
-      IF (prt_level >= 1) print*, 'fcoriolis, xlat,mxcalc ', &
+      IF (prt_level >= 5) print*, 'fcoriolis, xlat,mxcalc ', &
                                    fcoriolis, xlat,mxcalc
 
@@ -1048,4 +1060,6 @@
 !! Increment state variables
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    IF (flag_inhib_forcing == 0) then ! if tendency of forcings should be added
+
 ! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h
 ! au dessus de 700hpa, on relaxe vers les profils initiaux
@@ -1066,5 +1080,5 @@
      &               +d_q_nudge(1:mxcalc,:) )
 
-        if (prt_level.ge.1) then
+        if (prt_level.ge.3) then
           print *,                                                          &
      &    'physiq-> temp(1),dt_phys(1),d_th_adv(1),dt_cooling(1) ',         &
@@ -1113,4 +1127,6 @@
 !cc        q(1:mxcalc,2)=tmpvar(1:mxcalc)
 
+   END IF ! end if tendency of tendency should be added
+
 !---------------------------------------------------------------------
 !   Air temperature :
Index: LMDZ5/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2610)
+++ LMDZ5/trunk/libf/phylmd/physiq_mod.F90	(revision 2611)
@@ -216,4 +216,6 @@
 
     USE paramLMDZ_phy_mod
+
+    USE cmp_seri_mod
 
     !IM stations CFMIP
@@ -801,7 +803,16 @@
     ! eva: evaporation de l'eau liquide nuageuse
     ! vdf: couche limite (Vertical DiFfusion)
-
+    !
     ! tendance nulles
     REAL, dimension(klon,klev):: du0, dv0, dt0, dq0, dql0, dqi0
+    !
+    ! Flag pour pouvoir ne pas ajouter les tendances. 
+    ! Par defaut, les tendances doivente etre ajoutees et
+    ! flag_inhib_tend = 0
+    ! flag_inhib_tend > 0 : tendances non ajoutees, avec un nombre 
+    ! croissant de print quand la valeur du flag augmente
+    !!! attention, ce flag doit etre change avec prudence !!!
+    INTEGER :: flag_inhib_tend = 0 !  0 is the default value
+!!    INTEGER :: flag_inhib_tend = 2
 
     !
@@ -1772,4 +1783,6 @@
        ENDDO
     ENDDO
+    ! Initialize variables used for diagnostic purpose
+    if (flag_inhib_tend .ne. 0) call init_cmp_seri
     !IM
     IF (ip_ebil_phy.ge.1) THEN 
@@ -2217,9 +2230,9 @@
           CALL add_pbl_tend &
                (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,dqi0,paprs,&
-               'vdf',abortphy)
+               'vdf',abortphy,flag_inhib_tend)
        ELSE
           CALL add_phys_tend &
                (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,dqi0,paprs,&
-               'vdf',abortphy)
+               'vdf',abortphy,flag_inhib_tend)
        ENDIF
        !--------------------------------------------------------------------
@@ -2599,5 +2612,5 @@
 
     CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, paprs, &
-         'convection',abortphy)
+         'convection',abortphy,flag_inhib_tend)
 
     !-------------------------------------------------------------------------
@@ -2772,5 +2785,5 @@
        d_q_wake(:,:)=dq_wake(:,:)*dtime
        CALL add_phys_tend(du0,dv0,d_t_wake,d_q_wake,dql0,dqi0,paprs,'wake', &
-            abortphy)
+            abortphy,flag_inhib_tend)
        !------------------------------------------------------------------------
 
@@ -2919,5 +2932,5 @@
           !
           CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs,  &
-                             dql0,dqi0,paprs,'thermals', abortphy)
+                             dql0,dqi0,paprs,'thermals', abortphy,flag_inhib_tend)
           !
           !>jyg
@@ -2983,5 +2996,5 @@
           ! ajout des tendances de l'ajustement sec ou des thermiques
           CALL add_phys_tend(du0,dv0,d_t_ajsb,d_q_ajsb,dql0,dqi0,paprs, &
-               'ajsb',abortphy)
+               'ajsb',abortphy,flag_inhib_tend)
           d_t_ajs(:,:)=d_t_ajs(:,:)+d_t_ajsb(:,:)
           d_q_ajs(:,:)=d_q_ajs(:,:)+d_q_ajsb(:,:)
@@ -3042,5 +3055,5 @@
 
     CALL add_phys_tend(du0,dv0,d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc,paprs, &
-         'lsc',abortphy)
+         'lsc',abortphy,flag_inhib_tend)
     !---------------------------------------------------------------------------
     DO k = 1, klev
@@ -3804,6 +3817,6 @@
     ENDDO
 
-    CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy)
-    CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy)
+    CALL add_phys_tend(du0,dv0,d_t_swr,dq0,dql0,dqi0,paprs,'SW',abortphy,flag_inhib_tend)
+    CALL add_phys_tend(du0,dv0,d_t_lwr,dq0,dql0,dqi0,paprs,'LW',abortphy,flag_inhib_tend)
 
     !
@@ -3889,5 +3902,5 @@
        ! ajout des tendances de la trainee de l'orographie
        CALL add_phys_tend(d_u_oro,d_v_oro,d_t_oro,dq0,dql0,dqi0,paprs,'oro', &
-            abortphy)
+            abortphy,flag_inhib_tend)
        !----------------------------------------------------------------------
        !
@@ -3935,5 +3948,5 @@
        ! ajout des tendances de la portance de l'orographie
        CALL add_phys_tend(d_u_lif, d_v_lif, d_t_lif, dq0, dql0, dqi0, paprs, &
-            'lif', abortphy)
+            'lif', abortphy,flag_inhib_tend)
     ENDIF ! fin de test sur ok_orolf
 
@@ -3958,5 +3971,5 @@
        d_t_hin(:, :)=0.
        CALL add_phys_tend(du_gwd_hines, dv_gwd_hines, d_t_hin, dq0, dql0, &
-            dqi0, paprs, 'hin', abortphy)
+            dqi0, paprs, 'hin', abortphy,flag_inhib_tend)
     ENDIF
 
@@ -3975,5 +3988,5 @@
 
        CALL add_phys_tend(du_gwd_front, dv_gwd_front, dt0, dq0, dql0, dqi0, &
-            paprs, 'front_gwd_rando', abortphy)
+            paprs, 'front_gwd_rando', abortphy,flag_inhib_tend)
     ENDIF
 
@@ -3983,5 +3996,5 @@
             du_gwd_rando, dv_gwd_rando, east_gwstress, west_gwstress)
        CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0, dqi0, &
-            paprs, 'flott_gwd_rando', abortphy)
+            paprs, 'flott_gwd_rando', abortphy,flag_inhib_tend)
        zustr_gwd_rando=0.
        zvstr_gwd_rando=0.
@@ -4046,5 +4059,5 @@
        ! ajout de la tendance d'humidite due au methane
        CALL add_phys_tend(du0, dv0, dt0, d_q_ch4*dtime, dql0, dqi0, paprs, &
-            'q_ch4', abortphy)
+            'q_ch4', abortphy,flag_inhib_tend)
     END IF
     !
Index: LMDZ5/trunk/libf/phylmd/radlwsw_m.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/radlwsw_m.F90	(revision 2610)
+++ LMDZ5/trunk/libf/phylmd/radlwsw_m.F90	(revision 2611)
@@ -465,4 +465,5 @@
         PWV(i,k) = MAX (q(iof+i,k), 1.0e-12)
         PQS(i,k) = PWV(i,k)
+!       Confert from  column density of ozone in a cell, in kDU, to a mass fraction
         POZON(i,k, :) = wo(iof+i, k, :) * RG * dobson_u * 1e3 &
              / (paprs(iof+i, k) - paprs(iof+i, k+1))
