Changeset 828


Ignore:
Timestamp:
Nov 5, 2012, 3:02:40 PM (12 years ago)
Author:
tnavarro
Message:

new option in run.def: ndynstep to run a number of dynamical time step. More efficient thannday for fractions of days

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r795 r828  
    18101810>> Minor improvement for running fractions of sols; enforce some rounding of
    18111811   'Time' (ie: fraction of day) read from the start.nc file in order to limit
    1812    the accumultation of roundoffs from multiple runs.
     1812
     1813== 05/11/2012 == TN
     1814>> Added new option : ndynstep in run.def, that allows to run for a specific number a dynamical timesteps.
     1815   If ndynstep is not specified or is negative, nday is used. Otherwise nday value is discarded.
     1816   The problem with nday alone is that one can only run the GCM for a decimal fraction of one sol.
  • trunk/LMDZ.MARS/libf/dyn3d/defrun_new.F

    r791 r828  
    9898        call getin("nday",nday_r)
    9999        WRITE(tapeout,*)" nday = ",nday_r
     100       
     101        ndynstep=-9999 ! default value
     102        call getin("ndynstep",ndynstep)
     103        if (ndynstep .gt. 0) then
     104          WRITE(tapeout,*) ""
     105          WRITE(tapeout,*) "Number of dynamical steps to run:"
     106          WRITE(tapeout,*) " ndynstep = ",ndynstep
     107          WRITE(tapeout,*) " nday value is now discarded "
     108        endif
    100109
    101110        WRITE(tapeout,*) ""
  • trunk/LMDZ.MARS/libf/dyn3d/gcm.F

    r799 r828  
    206206          iday = iday+1
    207207         ENDIF
    208       itaufin=nint(nday_r*day_step) ! nint() to avoid problematic roundoffs
     208      if (ndynstep .gt. 0) then
     209         itaufin = ndynstep
     210      else
     211         itaufin=nint(nday_r*day_step) ! nint() to avoid problematic roundoffs
     212      endif
    209213      ! check that this is compatible with call sequence dyn/phys/dissip
    210214      ! i.e. that itaufin is a multiple of iphysiq and idissip
    211215      if ((modulo(itaufin,iphysiq).ne.0).or.
    212216     &    (modulo(itaufin,idissip).ne.0)) then
    213         write(*,*) "gcm: Problem: incompatibility between nday=",nday_r,
     217        if (ndynstep .gt. 0) then
     218       write(*,'(A,I5)')
     219     &  "gcm: Problem: incompatibility between ndynstep=",ndynstep
     220        else
     221       write(*,'((A,F9.2),2(A,I5))')
     222     &  "gcm: Problem: incompatibility between nday=",nday_r,
    214223     &  " day_step=",day_step," which imply itaufin=",itaufin
    215         write(*,*) "  whereas iphysiq=",iphysiq," and idissip=",
     224        endif
     225        write(*,'(2(A,I5))')
     226     &   "  whereas iphysiq=",iphysiq," and idissip=",
    216227     &  idissip
    217228        stop
     
    223234      itaufinp1 = itaufin +1
    224235
    225       day_end = day_ini + floor(nday_r+time_0)
     236      if (ndynstep .gt. 0) then
     237        day_end = day_ini
     238     &          + floor(float(ndynstep)/float(day_step)+time_0)
     239      else
     240        day_end = day_ini + floor(nday_r+time_0)
     241      endif
    226242      PRINT 300, itau,itaufin,day_ini,day_end
    227243 300  FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x, 
Note: See TracChangeset for help on using the changeset viewer.