Ignore:
Timestamp:
Apr 28, 2021, 1:00:13 PM (4 years ago)
Author:
romain.vande
Message:

For LMDZ MARS: Update of day_ini, time and hour_ini in restart and retstartfi.
Hour_ini is obsolete. If we write one restart file: day_ini is the last day
of the simulation and the remaining time is in Time (often=0), if we write
multiple restart nothing changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2501 r2507  
    8787      USE mod_phys_lmdz_omp_data, ONLY: is_omp_master
    8888#endif
     89      USE temps_mod, ONLY: day_end
    8990
    9091#ifdef CPP_XIOS     
     
    518519c  1.1   Initialisation only at first call
    519520c  ---------------------------------------
     521
    520522      IF (firstcall) THEN
    521523
     
    688690           if (callslope) call getslopes(ngrid,phisfi)
    689691           ! no need to create a restart file in 1d
    690            call physdem0("restartfi.nc",longitude,latitude,
     692         if (ecritstart.GT.0) then
     693             call physdem0("restartfi.nc",longitude,latitude,
    691694     &                   nsoilmx,ngrid,nlayer,nq,
    692695     &                   ptimestep,pday,time_phys,cell_area,
    693696     &                   albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe,
    694697     &                   hmons,summit,base)
     698          else
     699             call physdem0("restartfi.nc",longitude,latitude,
     700     &                   nsoilmx,ngrid,nlayer,nq,
     701     &                   ptimestep,float(day_end),time_phys,cell_area,
     702     &                   albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe,
     703     &                   hmons,summit,base)
     704          endif
    695705         endif
    696706
     
    22942304     .    .or. lastcall  ) THEN
    22952305         
    2296           ztime_fin = pday + ptime  + ptimestep/(float(iphysiq)*daysec)
    2297      .               - day_ini - time_phys
    2298           IF (grid_type==unstructured) THEN
     2306          IF (grid_type==unstructured) THEN !IF DYNAMICO
     2307
    22992308             ! When running Dynamico, no need to add a dynamics time step to ztime_fin
    23002309             IF (ptime.LE. 1.E-10) THEN
     
    23062315     .                  - day_ini - time_phys
    23072316             ENDIF
     2317
     2318          ELSE ! IF LMDZ
     2319
     2320          if (ecritstart.GT.0) then !IF MULTIPLE RESTARTS nothing change
     2321          ztime_fin = pday + ptime  + ptimestep/(float(iphysiq)*daysec)
     2322     .               - day_ini - time_phys
     2323          else !IF ONE RESTART final time in top of day_end
     2324          ztime_fin = pday + ptime  + ptimestep/(float(iphysiq)*daysec)
     2325     .               - day_ini - time_phys-(day_end-day_ini)
     2326          endif
     2327
    23082328          ENDIF
    23092329          write(*,'(A,I7,A,F12.5)')
     
    23112331     .          icount,' date=',ztime_fin
    23122332           
    2313 
    23142333          call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq,
    23152334     .                ptimestep,ztime_fin,
Note: See TracChangeset for help on using the changeset viewer.