Index: trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F
===================================================================
--- trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F	(revision 801)
+++ trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F	(revision 828)
@@ -98,4 +98,13 @@
         call getin("nday",nday_r)
         WRITE(tapeout,*)" nday = ",nday_r
+        
+        ndynstep=-9999 ! default value
+        call getin("ndynstep",ndynstep)
+        if (ndynstep .gt. 0) then
+          WRITE(tapeout,*) ""
+          WRITE(tapeout,*) "Number of dynamical steps to run:"
+          WRITE(tapeout,*) " ndynstep = ",ndynstep
+          WRITE(tapeout,*) " nday value is now discarded "
+        endif
 
         WRITE(tapeout,*) ""
Index: trunk/LMDZ.MARS/libf/dyn3d/gcm.F
===================================================================
--- trunk/LMDZ.MARS/libf/dyn3d/gcm.F	(revision 801)
+++ trunk/LMDZ.MARS/libf/dyn3d/gcm.F	(revision 828)
@@ -206,12 +206,23 @@
           iday = iday+1
          ENDIF
-      itaufin=nint(nday_r*day_step) ! nint() to avoid problematic roundoffs
+      if (ndynstep .gt. 0) then
+         itaufin = ndynstep
+      else
+         itaufin=nint(nday_r*day_step) ! nint() to avoid problematic roundoffs
+      endif
       ! check that this is compatible with call sequence dyn/phys/dissip
       ! i.e. that itaufin is a multiple of iphysiq and idissip
       if ((modulo(itaufin,iphysiq).ne.0).or.
      &    (modulo(itaufin,idissip).ne.0)) then
-        write(*,*) "gcm: Problem: incompatibility between nday=",nday_r,
+        if (ndynstep .gt. 0) then
+       write(*,'(A,I5)') 
+     &  "gcm: Problem: incompatibility between ndynstep=",ndynstep
+        else
+       write(*,'((A,F9.2),2(A,I5))') 
+     &  "gcm: Problem: incompatibility between nday=",nday_r,
      &  " day_step=",day_step," which imply itaufin=",itaufin
-        write(*,*) "  whereas iphysiq=",iphysiq," and idissip=",
+        endif
+        write(*,'(2(A,I5))') 
+     &   "  whereas iphysiq=",iphysiq," and idissip=",
      &  idissip
         stop
@@ -223,5 +234,10 @@
       itaufinp1 = itaufin +1
 
-      day_end = day_ini + floor(nday_r+time_0)
+      if (ndynstep .gt. 0) then
+        day_end = day_ini 
+     &          + floor(float(ndynstep)/float(day_step)+time_0)
+      else
+        day_end = day_ini + floor(nday_r+time_0)
+      endif
       PRINT 300, itau,itaufin,day_ini,day_end
  300  FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x,  
