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/libf/dyn3d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.