Ignore:
Timestamp:
Jun 3, 2025, 3:59:23 PM (4 weeks ago)
Author:
mmaurice
Message:

Generic PCM

Add flag read_time_from_start1D to read start day and time from
start1D.nc's controle tab when restarting a 1D simulation. Default
behavior is to read start day and time from rcm1d.def file, but it is
convenient for chained simulations to read them from start1D.nc.

MM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F

    r3753 r3787  
    8585      INTEGER ilayer,ilevel,isoil,idt,iq
    8686      LOGICAl firstcall,lastcall
    87       LOGICAL restart
     87      LOGICAL restart, read_time_from_start1D
    8888      INTEGER nid_restart1D, nid_restartfi
    8989      INTEGER controleid, uid, vid, tempid, tsurfid, did, tid
     
    526526        endif
    527527        psurf = controle1D(1)
    528         PRINT *,"In restart1D.nc, day0=",controle1D(2),
    529      &          " and time=",controle1D(3)
    530         PRINT*,"(These values are NOT used, ",
    531      &         "those given in rcm1d.def are used)"
    532528      else ! restart
    533529        psurf = -99999.
     
    574570
    575571      !else
     572      call getin("read_time_from_start1D",read_time_from_start1D)
     573      if (restart .and. read_time_from_start1D) then
     574            PRINT *,"In restart1D.nc, day0=",controle1D(2),
     575     &              " and time=",controle1D(3)
     576            day0 = controle1D(2)
     577            time = controle1D(3)
     578      else
    576579        day0 = 0 ! default value for day0
    577580        write(*,*) 'Initial date (in martian sols ; =0 at Ls=0)?'
     
    585588        write(*,*)" time = ",time
    586589        time=time/24.E+0 ! convert time (hours) to fraction of sol
     590      end if
    587591      !endif
    588592
Note: See TracChangeset for help on using the changeset viewer.