Index: /LMDZ5/trunk/libf/dyn3d/conf_gcm.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/conf_gcm.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/conf_gcm.F	(revision 1502)
@@ -215,11 +215,12 @@
        CALL getin('output_grads_dyn',output_grads_dyn)
 
-!Config  Key  = idissip
+!Config  Key  = dissip_period
 !Config  Desc = periode de la dissipation 
-!Config  Def  = 10
+!Config  Def  = 0
 !Config  Help = periode de la dissipation 
-!Config         (en pas) ... a completer !
-       idissip = 10
-       CALL getin('idissip',idissip)
+!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
+!Config  dissip_period>0 => on prend cette valeur
+       dissip_period = 0
+       CALL getin('dissip_period',dissip_period)
 
 ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
@@ -619,5 +620,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
@@ -862,5 +863,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
Index: /LMDZ5/trunk/libf/dyn3d/control_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/control_mod.F90	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/control_mod.F90	(revision 1502)
@@ -12,5 +12,5 @@
   REAL    :: periodav
   INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys
-  INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy
+  INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy
   INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn
   LOGICAL :: offline
Index: /LMDZ5/trunk/libf/dyn3d/defrun.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/defrun.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/defrun.F	(revision 1502)
@@ -133,7 +133,7 @@
 
       READ (tapedef,9001) ch1,ch4
-      READ (tapedef,*)    idissip
-      WRITE(tapeout,9001) ch1,'idissip'
-      WRITE(tapeout,*)    idissip
+      READ (tapedef,*)    dissip_period
+      WRITE(tapeout,9001) ch1,'dissip_period'
+      WRITE(tapeout,*)    dissip_period
 
 ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
Index: /LMDZ5/trunk/libf/dyn3d/ini_paramLMDZ_dyn.h
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/ini_paramLMDZ_dyn.h	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/ini_paramLMDZ_dyn.h	(revision 1502)
@@ -78,5 +78,5 @@
      .                "once", dt_cum,dt_cum)
 c
-         CALL histdef(nid_ctesGCM, "idissip", 
+         CALL histdef(nid_ctesGCM, "dissip_period", 
      .  "periode de la dissipation (en pas) ... a completer",
      .                "-",iip1,jjp1,thoriid, 1,1,1, -99, 32, 
Index: /LMDZ5/trunk/libf/dyn3d/iniconst.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/iniconst.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/iniconst.F	(revision 1502)
@@ -39,5 +39,4 @@
 c-----------------------------------------------------------------------
 
-      dtdiss  = idissip * dtvr
       dtphys  = iphysiq * dtvr
       unsim   = 1./iim
Index: /LMDZ5/trunk/libf/dyn3d/inidissip.F90
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/inidissip.F90	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/inidissip.F90	(revision 1502)
@@ -11,5 +11,5 @@
   !   -------------
 
-  USE control_mod, only : idissip,iperiod
+  USE control_mod, only : dissip_period,iperiod
 
   IMPLICIT NONE
@@ -215,10 +215,13 @@
   ENDDO
 
-  write(lunout,*)'inidissip: tetamin dtvr iperiod ',tetamin,dtvr,iperiod
-  idissip = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
-  write(lunout,*)'inidissip: tetamin idissip ',tetamin,idissip
-  idissip = MAX(iperiod,idissip)
-  dtdiss  = idissip * dtvr
-  write(lunout,*)'inidissip: idissip dtdiss ',idissip,dtdiss
+  ! If dissip_period=0 calculate value for dissipation period, else keep value read from gcm.def
+  IF (dissip_period == 0) THEN
+     dissip_period = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
+     write(lunout,*)'inidissip: tetamin dtvr iperiod dissip_period(intermed) ',tetamin,dtvr,iperiod,dissip_period
+     dissip_period = MAX(iperiod,dissip_period)
+  END IF
+
+  dtdiss  = dissip_period * dtvr
+  write(lunout,*)'inidissip: dissip_period=',dissip_period,' dtdiss=',dtdiss,' dtvr=',dtvr
 
   DO l = 1,llm
Index: /LMDZ5/trunk/libf/dyn3d/leapfrog.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/leapfrog.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/leapfrog.F	(revision 1502)
@@ -275,5 +275,6 @@
       ! Purely Matsuno time stepping
          IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
-         IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
+         IF( MOD(itau,dissip_period ).EQ.0.AND..NOT.forward ) 
+     s        apdiss = .TRUE.
          IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 
      s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
@@ -281,5 +282,6 @@
       ! Leapfrog/Matsuno time stepping 
          IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
-         IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
+         IF( MOD(itau+1,dissip_period).EQ.0 .AND. .NOT. forward )
+     s        apdiss = .TRUE.
          IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
       END IF
Index: /LMDZ5/trunk/libf/dyn3d/write_paramLMDZ_dyn.h
===================================================================
--- /LMDZ5/trunk/libf/dyn3d/write_paramLMDZ_dyn.h	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3d/write_paramLMDZ_dyn.h	(revision 1502)
@@ -51,6 +51,6 @@
      .               zx_tmp_2d,iip1*jjp1,ndex2d)
 c
-      zx_tmp_2d(1:iip1,1:jjp1)=REAL(idissip)
-      CALL histwrite(nid_ctesGCM, "idissip", itau_w,
+      zx_tmp_2d(1:iip1,1:jjp1)=REAL(dissip_period)
+      CALL histwrite(nid_ctesGCM, "dissip_period", itau_w,
      .               zx_tmp_2d,iip1*jjp1,ndex2d)
 c
Index: /LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F	(revision 1502)
@@ -225,11 +225,12 @@
        CALL getin('output_grads_dyn',output_grads_dyn)
 
-!Config  Key  = idissip
+!Config  Key  = dissip_period
 !Config  Desc = periode de la dissipation 
-!Config  Def  = 10
+!Config  Def  = 0
 !Config  Help = periode de la dissipation 
-!Config         (en pas) ... a completer !
-       idissip = 10
-       CALL getin('idissip',idissip)
+!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
+!Config  dissip_period>0 => on prend cette valeur
+       dissip_period = 0
+       CALL getin('dissip_period',dissip_period)
 
 ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
@@ -635,5 +636,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
@@ -909,5 +910,5 @@
       write(lunout,*)' periodav = ', periodav 
       write(lunout,*)' output_grads_dyn = ', output_grads_dyn
-      write(lunout,*)' idissip = ', idissip
+      write(lunout,*)' dissip_period = ', dissip_period
       write(lunout,*)' lstardis = ', lstardis
       write(lunout,*)' nitergdiv = ', nitergdiv
Index: /LMDZ5/trunk/libf/dyn3dpar/control_mod.F90
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/control_mod.F90	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/control_mod.F90	(revision 1502)
@@ -12,5 +12,5 @@
   REAL    :: periodav
   INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys
-  INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy
+  INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy
   INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn
   LOGICAL :: offline
Index: /LMDZ5/trunk/libf/dyn3dpar/defrun.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/defrun.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/defrun.F	(revision 1502)
@@ -132,7 +132,7 @@
 
       READ (tapedef,9001) ch1,ch4
-      READ (tapedef,*)    idissip
-      WRITE(tapeout,9001) ch1,'idissip'
-      WRITE(tapeout,*)    idissip
+      READ (tapedef,*)    dissip_period
+      WRITE(tapeout,9001) ch1,'dissip_period'
+      WRITE(tapeout,*)    dissip_period
 
 ccc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
Index: /LMDZ5/trunk/libf/dyn3dpar/iniconst.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/iniconst.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/iniconst.F	(revision 1502)
@@ -39,5 +39,4 @@
 c-----------------------------------------------------------------------
 
-      dtdiss  = idissip * dtvr
       dtphys  = iphysiq * dtvr
       unsim   = 1./iim
Index: /LMDZ5/trunk/libf/dyn3dpar/inidissip.F90
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/inidissip.F90	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/inidissip.F90	(revision 1502)
@@ -11,5 +11,5 @@
   !   -------------
 
-  USE control_mod, only : idissip,iperiod
+  USE control_mod, only : dissip_period,iperiod
 
   IMPLICIT NONE
@@ -215,10 +215,13 @@
   ENDDO
 
-  write(lunout,*)'inidissip: tetamin dtvr iperiod ',tetamin,dtvr,iperiod
-  idissip = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
-  write(lunout,*)'inidissip: tetamin idissip ',tetamin,idissip
-  idissip = MAX(iperiod,idissip)
-  dtdiss  = idissip * dtvr
-  write(lunout,*)'inidissip: idissip dtdiss ',idissip,dtdiss
+  ! If dissip_period=0 calculate value for dissipation period, else keep value read from gcm.def
+  IF (dissip_period == 0) THEN
+     dissip_period = INT( tetamin/( 2.*dtvr*iperiod) ) * iperiod
+     write(lunout,*)'inidissip: tetamin dtvr iperiod dissip_period(intermed) ',tetamin,dtvr,iperiod,dissip_period
+     dissip_period = MAX(iperiod,dissip_period)
+  END IF
+
+  dtdiss  = dissip_period * dtvr
+  write(lunout,*)'inidissip: dissip_period=',dissip_period,' dtdiss=',dtdiss,' dtvr=',dtvr
 
   DO l = 1,llm
Index: /LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F
===================================================================
--- /LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F	(revision 1501)
+++ /LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F	(revision 1502)
@@ -350,9 +350,10 @@
       conser = .FALSE.
       apdiss = .FALSE.
-c      idissip=1
+
       IF( purmats ) THEN
       ! Purely Matsuno time stepping
          IF( MOD(itau,iconser) .EQ.0.AND.  forward    ) conser = .TRUE.
-         IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE.
+         IF( MOD(itau,dissip_period ).EQ.0.AND..NOT.forward ) 
+     s        apdiss = .TRUE.
          IF( MOD(itau,iphysiq ).EQ.0.AND..NOT.forward 
      s          .and. iflag_phys.EQ.1                 ) apphys = .TRUE.
@@ -360,5 +361,6 @@
       ! Leapfrog/Matsuno time stepping 
          IF( MOD(itau   ,iconser) .EQ. 0              ) conser = .TRUE.
-         IF( MOD(itau+1,idissip)  .EQ. 0              ) apdiss = .TRUE.
+         IF( MOD(itau+1,dissip_period).EQ.0 .AND. .NOT. forward )
+     s        apdiss = .TRUE.
          IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE.
       END IF
