Changeset 2507


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

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3d/gcm.F90

    r2478 r2507  
    2424                             raz_date,anneeref,starttime,dayref,    &
    2525                             ok_dyn_ins,ok_dyn_ave,iecri,periodav,  &
    26                              less1day,fractday,ndynstep,nsplit_phys
     26                             less1day,fractday,ndynstep,nsplit_phys,&
     27                             ecritstart
    2728  USE mod_const_mpi, ONLY: COMM_LMDZ
    2829  use cpdet_mod, only: ini_cpdet
     
    299300
    300301  !
    301   ! on remet le calendrier à zero si demande
     302  ! on remet le calendrier a zero si demande
    302303  !
    303304  IF (start_time /= starttime) then
    304305     WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le' &
    305      ,' fichier restart ne correspond pas à celle lue dans le run.def'
     306     ,' fichier restart ne correspond pas a celle lue dans le run.def'
    306307     IF (raz_date == 1) then
    307308        WRITE(lunout,*)'Je prends l''heure lue dans run.def'
     
    468469
    469470
     471! If we want to save multiple restart at different time (ecritstart.GT.0)
     472! We will write in restart the initial day of the simulation and put all
     473! the different time in the Time variable
     474! However, if we write only one restart, we save the last day of the
     475! simulation and put the remaining time (which is 0 if we do fulls days)
     476! in the Time variable
     477
    470478  if (planet_type=="mars") then
     479    if (ecritstart.GT.0) then
    471480    ! For Mars we transmit day_ini
    472     CALL dynredem0("restart.nc", day_ini, phis)
     481      CALL dynredem0("restart.nc", day_ini, phis)
     482    else
     483      CALL dynredem0("restart.nc", day_end, phis)
     484    endif
    473485  else
    474486    CALL dynredem0("restart.nc", day_end, phis)
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F

    r2380 r2507  
    3131     .                  statcl,conser,apdiss,purmats,tidal,ok_strato
    3232      USE temps_mod, ONLY: jD_ref,jH_ref,itaufin,day_ini,day_ref,
    33      .                  start_time,dt,hour_ini
     33     .                  start_time,dt,hour_ini,day_end
    3434
    3535      IMPLICIT NONE
     
    278278            abort_message = 'PK non strictement decroissante'
    279279            call abort_gcm(modname,abort_message,1)
    280 c           write(*,*) "ATTENTION, Test PK deconnecté..."
     280c           write(*,*) "ATTENTION, Test PK deconnecte..."
    281281          endif
    282282        enddo
     
    500500       IF ((planet_type.eq."titan").and.(tidal)) then
    501501c-----------------------------------------------------------------------
    502 c   Marées gravitationnelles causées par Saturne
     502c   Marees gravitationnelles causees par Saturne
    503503c   B. Charnay (28/10/2010)
    504504c   ----------------------------------------------------------
     
    579579c+jld
    580580
    581 c  Diagnostique de conservation de l'énergie : initialisation
     581c  Diagnostique de conservation de l'energie : initialisation
    582582         IF (ip_ebil_dyn.ge.1 ) THEN
    583583          ztit='bil dyn'
     
    635635         ENDIF
    636636
    637 c  Diagnostique de conservation de l'énergie : difference
     637c  Diagnostique de conservation de l'energie : difference
    638638         IF (ip_ebil_dyn.ge.1 ) THEN
    639639          ztit='bil phys'
     
    907907            IF (lrestart) THEN
    908908              if (planet_type=="mars") then
    909                 CALL dynredem1("restart.nc",REAL(itau)/REAL(day_step),
    910      &                         vcov,ucov,teta,q,masse,ps)
     909                if(ecritstart.GT.0) then
     910                 CALL dynredem1("restart.nc",
     911     &                        REAL(itau)/REAL(day_step),
     912     &                        vcov,ucov,teta,q,masse,ps)
     913                else
     914                 CALL dynredem1("restart.nc",
     915     &             REAL(itau)/REAL(day_step)-(day_end-day_ini),
     916     &                        vcov,ucov,teta,q,masse,ps)
     917                endif
    911918              else
    912919                CALL dynredem1("restart.nc",start_time,
     
    10531060              IF (lrestart) THEN
    10541061                if (planet_type=="mars") then
    1055                   CALL dynredem1("restart.nc",REAL(itau)/REAL(day_step),
     1062                  if(ecritstart.GT.0) then
     1063                        CALL dynredem1("restart.nc",
     1064     &                         REAL(itau)/REAL(day_step),
    10561065     &                         vcov,ucov,teta,q,masse,ps)
     1066                                  else
     1067                        CALL dynredem1("restart.nc",
     1068     &          REAL(itau)/REAL(day_step)-(day_end-day_ini),
     1069     &                         vcov,ucov,teta,q,masse,ps)
     1070                                  endif
    10571071                else
    10581072                  CALL dynredem1("restart.nc",start_time,
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F90

    r2426 r2507  
    146146
    147147  if (planet_type=="mars") then ! For Mars only
    148     tab_cntrl(29)=hour_ini
     148    !tab_cntrl(29)=hour_ini
     149    tab_cntrl(29)=0
    149150  endif
    150151
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F90

    r2426 r2507  
    147147
    148148  if (planet_type=="mars") then ! For Mars only
    149     tab_cntrl(29)=hour_ini
     149!    tab_cntrl(29)=hour_ini
     150    tab_cntrl(29)=0
    150151  endif
    151152
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F

    r2478 r2507  
    2424     &                       raz_date,anneeref,starttime,dayref,
    2525     &                       ok_dyn_ins,ok_dyn_ave,iecri,periodav,
    26      &                       less1day,fractday,ndynstep,nsplit_phys
     26     &                       less1day,fractday,ndynstep,nsplit_phys,
     27     &                       ecritstart
    2728      use cpdet_mod, only: ini_cpdet
    2829
     
    322323
    323324C
    324 C on remet le calendrier à zero si demande
     325C on remet le calendrier a zero si demande
    325326c
    326327      IF (start_time /= starttime) then
    327328        WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le'
    328      &,' fichier restart ne correspond pas à celle lue dans le run.def'
     329     &,' fichier restart ne correspond pas a celle lue dans le run.def'
    329330        IF (raz_date == 1) then
    330331          WRITE(lunout,*)'Je prends l''heure lue dans run.def'
     
    496497      if (planet_type=="mars") then
    497498         ! For Mars we transmit day_ini
    498         CALL dynredem0_p("restart.nc", day_ini, phis)
     499        !CALL dynredem0_p("restart.nc", day_ini, phis)
     500        if (ecritstart.GT.0) then
     501         CALL dynredem0_p("restart.nc", day_ini, phis)
     502        else
     503         CALL dynredem0_p("restart.nc", day_end, phis)
     504        endif
    499505      else
    500506        CALL dynredem0_p("restart.nc", day_end, phis)
  • TabularUnified trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F

    r2380 r2507  
    3939     .                  statcl,conser,apdiss,purmats,tidal,ok_strato
    4040       USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini,
    41      .                  day_ref,start_time,dt,hour_ini
     41     .                  day_ref,start_time,dt,hour_ini,day_end
    4242
    4343
     
    18131813c$OMP MASTER
    18141814              if (planet_type=="mars") then
    1815                 CALL dynredem1_p("restart.nc",REAL(itau)/REAL(day_step),
    1816      &                           vcov,ucov,teta,q,masse,ps)
     1815!                CALL dynredem1_p("restart.nc",REAL(itau)/REAL(day_step),
     1816!     &                           vcov,ucov,teta,q,masse,ps)
     1817                if(ecritstart.GT.0) then
     1818                 CALL dynredem1_p("restart.nc",
     1819     &                        REAL(itau)/REAL(day_step),
     1820     &                        vcov,ucov,teta,q,masse,ps)
     1821                else
     1822                 CALL dynredem1_p("restart.nc",
     1823     &             REAL(itau)/REAL(day_step)-(day_end-day_ini),
     1824     &                        vcov,ucov,teta,q,masse,ps)
     1825                endif
    18171826              else
    18181827                CALL dynredem1_p("restart.nc",start_time,
     
    20262035c$OMP MASTER
    20272036                if (planet_type=="mars") then
    2028                   CALL dynredem1_p("restart.nc",
    2029      &                              REAL(itau)/REAL(day_step),
    2030      &                               vcov,ucov,teta,q,masse,ps)
     2037!                  CALL dynredem1_p("restart.nc",
     2038!     &                              REAL(itau)/REAL(day_step),
     2039!     &                               vcov,ucov,teta,q,masse,ps)
     2040                if(ecritstart.GT.0) then
     2041                 CALL dynredem1_p("restart.nc",
     2042     &                        REAL(itau)/REAL(day_step),
     2043     &                        vcov,ucov,teta,q,masse,ps)
     2044                else
     2045                 CALL dynredem1_p("restart.nc",
     2046     &             REAL(itau)/REAL(day_step)-(day_end-day_ini),
     2047     &                        vcov,ucov,teta,q,masse,ps)
     2048                endif
    20312049                else
    20322050                  CALL dynredem1_p("restart.nc",start_time,
  • TabularUnified trunk/LMDZ.MARS/README

    r2505 r2507  
    33393339point to LMDZ.COMMON routines
    33403340
     3341== 27/04/2021 == RV
     3342- update of day_ini, time and hour_ini in restart and retstartfi.
     3343Hour_ini is obsolete. If we write one restart file: day_ini is the last day
     3344of the simulation and the remaining time is in Time (often=0), if we write
     3345multiple restart nothing changes
  • TabularUnified 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.