Changeset 3615 for trunk


Ignore:
Timestamp:
Feb 10, 2025, 8:42:03 AM (23 hours ago)
Author:
emillour
Message:

Venus PCM: Corrections to enable 1+1=2

  • store correctly the time_of_day in restart.nc to enable proper restart
  • enforce recomputation of CP in the physics at all time steps (otherwise when without thermosphere the value was only computed at first step and kept unchanged afterwards).

EM

Location:
trunk
Files:
10 edited

Legend:

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

    r2859 r3615  
    176176!Config  Help = Heure de depart de la simulation
    177177!Config         en jour
    178   starttime = 0
    179   CALL getin('starttime',starttime)
    180      
     178  if (raz_date/=0) then ! should only be used when manually reseting dates
     179    starttime = 0
     180    CALL getin('starttime',starttime)
     181  endif
     182 
    181183  ! Mars: time of start for run in "start.nc" (when there are multiple time
    182184  !       steps stored in the file)
  • trunk/LMDZ.COMMON/libf/dyn3d/gcm.F90

    r3574 r3615  
    315315  IF(dtvr.NE.zdtvr) THEN
    316316     WRITE(lunout,*) &
    317           'WARNING!!! changement de pas de temps',dtvr,'>',zdtvr
     317          'WARNING!!! time step change: ',dtvr,'>',zdtvr
    318318  ENDIF
    319319  dtvr=zdtvr
    320320
    321321  !
    322   ! on remet le calendrier a zero si demande
    323   !
    324   IF (start_time /= starttime) then
    325      WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le' &
    326      ,' fichier restart ne correspond pas a celle lue dans le run.def'
    327      IF (raz_date == 1) then
    328         WRITE(lunout,*)'Je prends l''heure lue dans run.def'
    329         start_time = starttime
    330      ELSE
    331         call abort_gcm("gcm", "'Je m''arrete'", 1)
    332      ENDIF
     322  ! reset calendar if requested
     323  !
     324  IF (raz_date == 1) then
     325    WRITE(lunout,*)'Reinitializing to start time from run.def'
     326    start_time = starttime
    333327  ENDIF
     328
    334329  IF (raz_date == 1) THEN
    335330     annee_ref = anneeref
  • trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F

    r2544 r3615  
    919919                endif
    920920              else
    921                 CALL dynredem1("restart.nc",start_time,
     921                CALL dynredem1("restart.nc",JH_cur,
    922922     &                         vcov,ucov,teta,q,masse,ps)
    923923              endif
     
    10721072                                  endif
    10731073                else
    1074                   CALL dynredem1("restart.nc",start_time,
     1074                  CALL dynredem1("restart.nc",JH_cur,
    10751075     &                         vcov,ucov,teta,q,masse,ps)
    10761076                endif
  • trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F90

    r3510 r3615  
    410410  if (start_file_type=="earth") then
    411411    tab_cntrl(31) = REAL(itau_dyn + itaufin)
     412    tab_cntrl(32) = time
    412413  else
    413414    tab_cntrl(31) = 0
  • trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F90

    r2135 r3615  
    198198!Config  Help = Heure de depart de la simulation
    199199!Config         en jour
    200   starttime = 0
    201   CALL getin('starttime',starttime)
     200  if (raz_date/=0) then ! should only be used when manually reseting dates
     201    starttime = 0
     202    CALL getin('starttime',starttime)
     203  endif
    202204
    203205  ! Mars: time of start for run in "start.nc" (when there are multiple time
  • trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F90

    r3510 r3615  
    427427  if (start_file_type=="earth") then
    428428    tab_cntrl(31) = REAL(itau_dyn + itaufin)
     429    tab_cntrl(32) = time
    429430  else
    430431    tab_cntrl(31) = 0
  • trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F

    r3604 r3615  
    334334        IF(dtvr.NE.zdtvr) THEN
    335335         WRITE(lunout,*)
    336      .    'WARNING!!! changement de pas de temps',dtvr,'>',zdtvr
     336     .    'WARNING!!! time step change: ',dtvr,'>',zdtvr
    337337        ENDIF
    338338      dtvr=zdtvr
    339339
    340340C
    341 C on remet le calendrier a zero si demande
    342 c
    343       IF (start_time /= starttime) then
    344         WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le'
    345      &,' fichier restart ne correspond pas a celle lue dans le run.def'
    346         IF (raz_date == 1) then
    347           WRITE(lunout,*)'Je prends l''heure lue dans run.def'
    348           start_time = starttime
    349         ELSE
    350           call abort_gcm("gcm", "'Je m''arrete'", 1)
    351         ENDIF
     341C reset calendar if requested
     342c
     343      IF (raz_date == 1) then
     344        WRITE(lunout,*)'Reinitializing to start time from run.def'
     345        start_time = starttime
    352346      ENDIF
     347
    353348      IF (raz_date == 1) THEN
    354349        annee_ref = anneeref
  • trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F

    r2549 r3615  
    18311831                endif
    18321832              else
    1833                 CALL dynredem1_p("restart.nc",start_time,
     1833                CALL dynredem1_p("restart.nc",JH_cur,
    18341834     &                           vcov,ucov,teta,q,masse,ps)
    18351835              endif
     
    20542054                endif
    20552055                else
    2056                   CALL dynredem1_p("restart.nc",start_time,
     2056                  CALL dynredem1_p("restart.nc",JH_cur,
    20572057     &                               vcov,ucov,teta,q,masse,ps)
    20582058                endif
  • trunk/LMDZ.VENUS/deftank/field_def_physics.xml

    r3451 r3615  
    194194                   long_name="Mean molecular mass"
    195195                   unit="g/mol" />
     196            <field id="Cp"
     197                   long_name="Specific heat"
     198                   unit="J/K/kg" />
    196199            <field id="rho"
    197200                   long_name="Atmospheric density"
  • trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F

    r3535 r3615  
    135135c Variables argument:
    136136c
    137       INTEGER nlon
    138       INTEGER nlev
    139       INTEGER nqmax
    140       REAL rjourvrai
    141       REAL gmtime
    142       REAL pdtphys
    143       LOGICAL debut, lafin
    144       REAL paprs(klon,klev+1)
    145       REAL pplay(klon,klev)
    146       REAL pphi(klon,klev)
    147       REAL pphis(klon)
    148       REAL presnivs(klev)
     137      INTEGER,INTENT(IN) :: nlon
     138      INTEGER,INTENT(IN) :: nlev
     139      INTEGER,INTENT(IN) :: nqmax
     140      REAL,INTENT(IN) :: rjourvrai
     141      REAL,INTENT(IN) :: gmtime
     142      REAL,INTENT(IN) :: pdtphys
     143      LOGICAL,INTENT(IN) :: debut, lafin
     144      REAL,INTENT(IN) :: paprs(klon,klev+1)
     145      REAL,INTENT(IN) :: pplay(klon,klev)
     146      REAL,INTENT(IN) :: pphi(klon,klev)
     147      REAL,INTENT(IN) :: pphis(klon)
     148      REAL,INTENT(IN) :: presnivs(klev)
    149149
    150150! ADAPTATION GCM POUR CP(T)
    151151      REAL ppk(klon,klev)
    152152
    153       REAL u(klon,klev)
    154       REAL v(klon,klev)
    155       REAL t(klon,klev)
    156       REAL qx(klon,klev,nqmax)
     153      REAL,INTENT(IN) :: u(klon,klev)
     154      REAL,INTENT(IN) :: v(klon,klev)
     155      REAL,INTENT(IN) :: t(klon,klev)
     156      REAL,INTENT(IN) :: qx(klon,klev,nqmax)
    157157
    158158      REAL d_u_dyn(klon,klev)
    159159      REAL d_t_dyn(klon,klev)
    160160
    161       REAL flxmw(klon,klev)
    162 
    163       REAL d_u(klon,klev)
    164       REAL d_v(klon,klev)
    165       REAL d_t(klon,klev)
    166       REAL d_qx(klon,klev,nqmax)
    167       REAL d_ps(klon)
     161      REAL,INTENT(IN) :: flxmw(klon,klev)
     162
     163      REAL,INTENT(OUT) :: d_u(klon,klev)
     164      REAL,INTENT(OUT) :: d_v(klon,klev)
     165      REAL,INTENT(OUT) :: d_t(klon,klev)
     166      REAL,INTENT(OUT) :: d_qx(klon,klev,nqmax)
     167      REAL,INTENT(OUT) :: d_ps(klon)
    168168
    169169      logical ok_hf
     
    10361036      if(callthermos) then
    10371037         call concentrations2(pplay,t_seri,tr_seri, nqmax)
     1038      else
     1039        ! one still needs to recompute cp and rho which depend on temperature
     1040        ! (rnew, mmean and akknew remain already initialized constants)
     1041        do ig=1,klon
     1042          do j=1,klev
     1043            cpnew(ig,j)=cpdet(t(ig,j))
     1044            rho(ig,j)=pplay(ig,j)/(rnew(ig,j)*t(ig,j))
     1045          enddo
     1046        enddo
    10381047      endif
    10391048
     
    21452154      CALL send_xios_field("Kz",ycoefh)
    21462155      CALL send_xios_field("mmean",mmean)
     2156      CALL send_xios_field("Cp",cpnew)
    21472157      CALL send_xios_field("rho",rho)
    21482158      CALL send_xios_field("BV2",zn2)
Note: See TracChangeset for help on using the changeset viewer.