Changeset 3895 for trunk/LMDZ.VENUS/libf


Ignore:
Timestamp:
Aug 14, 2025, 10:31:03 AM (5 months ago)
Author:
emillour
Message:

Venus PCM:
Some cleanup in physiq with respect to IOIPSL outputs (depreciated),
and added comments in English.
EM

Location:
trunk/LMDZ.VENUS/libf/phyvenus
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/YOMCST_mod.F90

    r3884 r3895  
    44  ! A1.0 Fundamental constants
    55  REAL, SAVE :: RPI, RCLUM, RHPLA, RKBOL, RNAVO
     6!$OMP THREADPRIVATE(RPI, RCLUM, RHPLA, RKBOL, RNAVO)
     7
    68  ! A1.1 Astronomical constants
    79  REAL, SAVE :: RDAY, REA, REPSM, RSIYEA, RSIDAY, ROMEGA
     10!$OMP THREADPRIVATE(RDAY, REA, REPSM, RSIYEA, RSIDAY, ROMEGA)
     11
    812  ! A1.1.bis Constantes concernant l'orbite de la Terre:
    913  REAL, SAVE :: R_ecc, R_peri, R_incl
     14!$OMP THREADPRIVATE(R_ecc, R_peri, R_incl)
     15
    1016  ! A1.2 Geoide
    1117  REAL, SAVE :: RA, RG, R1SA
     18!$OMP THREADPRIVATE(RA, RG, R1SA)
     19
    1220  ! A1.3 Radiation
    1321  REAL, SAVE :: RSIGMA
     22!$OMP THREADPRIVATE(RSIGMA)
     23
    1424  ! A1.4 Thermodynamic gas phase
    1525  REAL, SAVE :: R, RMD, RMV, RD, RV, RCPD, RCPV, RCVD, RCVV
     26!$OMP THREADPRIVATE(R, RMD, RMV, RD, RV, RCPD, RCPV, RCVD, RCVV)
    1627  REAL, SAVE :: RKAPPA, RETV
     28!$OMP THREADPRIVATE(RKAPPA, RETV)
     29
    1730  ! A1.5,6 Thermodynamic liquid,solid phases
    1831  REAL, SAVE :: RCW, RCS
     32!$OMP THREADPRIVATE(RCW, RCS)
     33
    1934  ! A1.7 Thermodynamic transition of phase
    2035  REAL, SAVE :: RLVTT, RLSTT, RLMLT, RTT, RATM
     36!$OMP THREADPRIVATE(RLVTT, RLSTT, RLMLT, RTT, RATM)
     37
    2138  ! A1.8 Curve of saturation
    2239  REAL, SAVE :: RESTT, RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS
     40!$OMP THREADPRIVATE(RESTT, RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS)
    2341  REAL, SAVE :: RALPD, RBETD, RGAMD
     42!$OMP THREADPRIVATE(RALPD, RBETD, RGAMD)
    2443
    2544END MODULE YOMCST_mod
  • trunk/LMDZ.VENUS/libf/phyvenus/ini_histday.h

    r1530 r3895  
    88
    99         idayref = day_ref
    10          CALL ymds2ju(annee_ref, 1, idayref, zero, zjulian)
     10         CALL ymds2ju(annee_ref, 1, idayref, 0., zjulian)
    1111
    1212         call histbeg_phy("histday.nc",itau_phy,
  • trunk/LMDZ.VENUS/libf/phyvenus/ini_histins.h

    r1661 r3895  
    88
    99         idayref = day_ref
    10          CALL ymds2ju(annee_ref, 1, idayref, zero, zjulian)
     10         CALL ymds2ju(annee_ref, 1, idayref, 0., zjulian)
    1111
    1212         call histbeg_phy("histins.nc",itau_phy,
  • trunk/LMDZ.VENUS/libf/phyvenus/ini_histmth.h

    r3451 r3895  
    88
    99         idayref = day_ref
    10          CALL ymds2ju(annee_ref, 1, idayref, zero, zjulian)
     10         CALL ymds2ju(annee_ref, 1, idayref, 0., zjulian)
    1111
    1212         call histbeg_phy("histmth.nc",itau_phy,
  • trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F

    r3892 r3895  
    5959c d_ps----output-R-tendance physique de la pression au sol
    6060c======================================================================
    61       USE ioipsl
     61      USE ioipsl, only: ymds2ju, histvert, histdef, histend, histsync
    6262!      USE histcom ! not needed; histcom is included in ioipsl
    6363      use dimphy
     
    109109      IMPLICIT none
    110110c======================================================================
    111 c   CLEFS CPP POUR LES IO
    112 c   =====================
     111c   CPP flags for IOIPSL outputs (obsolete and not needed if using XIOS)
     112c   ===================================================================
    113113#ifndef MESOSCALE
    114 c#define histhf
     114#ifndef CPP_XIOS
    115115#define histday
    116116#define histmth
    117117#define histins
     118#endif
    118119#endif
    119120c======================================================================
     
    123124#include "hedin.h"
    124125c======================================================================
    125       LOGICAL, SAVE :: ok_journe ! sortir le fichier journalier
     126      LOGICAL, SAVE :: ok_journe ! flag to output IOIPSL file histday
    126127!$OMP THREADPRIVATE(ok_journe)
    127 c      PARAMETER (ok_journe=.true.)
    128 c
    129       LOGICAL, SAVE :: ok_mensuel ! sortir le fichier mensuel
     128
     129      LOGICAL, SAVE :: ok_mensuel ! flag to output IOIPSL file histmth
    130130!$OMP THREADPRIVATE(ok_mensuel)
    131131
    132 c      PARAMETER (ok_mensuel=.true.)
    133 c
    134       LOGICAL, SAVE :: ok_instan ! sortir le fichier instantane
     132      LOGICAL, SAVE :: ok_instan ! flag to output IOIPSL file histins
    135133!$OMP THREADPRIVATE(ok_instan)
    136 c      PARAMETER (ok_instan=.true.)
    137 c
     134
    138135c======================================================================
    139136c
     
    172169      REAL,INTENT(OUT) :: d_ps(klon)
    173170
    174       logical, save :: ok_hf
    175 !$OMP THREADPRIVATE(ok_hf)
    176       real, save :: ecrit_hf
    177 !$OMP THREADPRIVATE(ecrit_hf)
    178       integer, save :: nid_hf
    179 !$OMP THREADPRIVATE(nid_hf)
    180 
    181 #ifdef histhf
    182       data ok_hf,ecrit_hf/.true.,0.25/
    183 #else
    184       data ok_hf/.false./
    185 #endif
    186171
    187172c Variables propres a la physique
     
    189174      integer,save :: itap        ! physics counter
    190175!$OMP THREADPRIVATE(itap)
    191       REAL delp(klon,klev)        ! epaisseur d'une couche
    192       REAL omega(klon,klev)       ! vitesse verticale en Pa/s (+ downward)
    193       REAL vertwind(klon,klev)    ! vitesse verticale en m/s (+ upward)
     176      REAL delp(klon,klev)        ! thickness of atmospheric layers (in pressure)
     177      REAL omega(klon,klev)       ! vertical velocity in Pa/s (+ downward)
     178      REAL vertwind(klon,klev)    ! vertical velocity in m/s (+ upward)
    194179     
    195180      INTEGER igwd,idx(klon),itest(klon)
     
    266251      INTEGER i, k, iq, ig, j, ll, ilon, ilat, ilev, isoil
    267252c
    268       REAL zphi(klon,klev)
    269       REAL zzlev(klon,klev+1),zzlay(klon,klev),z1,z2
    270       REAL tlaymean ! valeur temporaire pour calculer zzlay
    271       real tsurf(klon)
     253      REAL zphi(klon,klev) ! absolute geopotential
     254      REAL zzlev(klon,klev+1) ! altitude (wrt surface) of atmospheric layer boundaries
     255      REAL zzlay(klon,klev) ! altitude (wrt surface) of atmospheric mid-layers
     256      REAL z1,z2
     257      REAL tlaymean ! temporairy variable to compute zzlay
     258      real tsurf(klon) ! surface temperature (K) ! Ehouarn: again? what about ftsol?
    272259
    273260c va avec nlte_tcool
     
    356343!$OMP THREADPRIVATE(nid_day,nid_mth,nid_ins)
    357344      INTEGER nhori, nvert, idayref
    358       REAL zsto, zout, zsto1, zsto2, zero
    359       parameter (zero=0.0e0)
     345      REAL zsto, zout, zsto1, zsto2
     346
    360347      real, save :: zjulian
    361348!$OMP THREADPRIVATE(zjulian)
     
    371358      character*20 varunits
    372359C     Variables liees au bilan d'energie et d'enthalpi
    373       REAL ztsol(klon)
     360      REAL ztsol(klon) ! surface temperature (K), updated by parametrizations
    374361      REAL, SAVE :: h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot
    375362!$OMP THREADPRIVATE(h_vcol_tot,h_dair_tot,h_qw_tot,h_ql_tot)
     
    402389      REAL :: dt_dyn(klev)
    403390#endif
    404 c Declaration des constantes et des fonctions thermodynamiques
    405 c
    406 c #include "YOMCST.h"
    407391
    408392c======================================================================
     
    665649         ENDIF
    666650       
    667 c Initialisation des sorties
    668 c===========================
    669 
     651c Initializations for IOIPSL outputs (obsolete if using XIOS)
     652c============================================================
    670653#ifdef CPP_IOIPSL
    671 
    672 #ifdef histhf
    673 #include "ini_histhf.h"
    674 #endif
    675654
    676655#ifdef histday
     
    872851c GEOP CORRECTION
    873852c
    874 c Ajouter le geopotentiel du sol:
     853c Add surface geopotential:
    875854c
    876855      DO k = 1, klev
     
    945924c====================================================================
    946925c
    947 c Verifier les temperatures
     926c Check input temperatures
    948927c
    949928      CALL hgardfou(t_seri,ftsol,'debutphy')
    950929
    951930c====================================================================
    952 c Orbite et eclairement
    953 c=======================
    954 
    955 c Pour VENUS, on fixe l'obliquite a 0 et l'eccentricite a 0.
    956 c donc pas de variations de Ls, ni de dist.
    957 c La seule chose qui compte, c'est la rotation de la planete devant
    958 c le Soleil...
     931c Orbit and sola zenith angle
     932c============================
     933
     934c For VENUS, we set an obliquity of 0 and an eccentricity of 0.
     935c so no Ls variation, nor for dist.
     936c the only important aspect is the planet rotation and the resulting
     937c position of the Sun above...
    959938     
    960939      zlongi = 0.0
    961       dist   = 0.72333  ! en UA
    962 
    963 c Si on veut remettre l'obliquite a 3 degres et/ou l'eccentricite
    964 c a sa valeur, et prendre en compte leur evolution,
    965 c il faudra refaire un orbite.F...
     940      dist   = 0.72333  ! in UA
     941
     942c To set obliquity to 3 degres and/or change eccentricity
     943c and account for the resulting orbital changes
     944c we would need to code an adequate orbite.F...
    966945c     CALL orbite(zlongi,dist)
    967946
    968947      IF (cycle_diurne) THEN
    969         zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s)
     948        zdtime=dtime*REAL(radpas) ! radiative time step (s)
    970949        CALL zenang(zlongi,gmtime,zdtime,latitude_deg,longitude_deg,
    971950     &              rmu0,fract)
     
    974953      ENDIF
    975954     
    976 !     print fraction of venus day
     955!     print fraction of venus day, i.e. time of day at longitude 0
    977956
    978957      if (is_master) then
     
    981960
    982961c======================================================================
    983 c FIN INITIALISATIONS
     962c END OF INITIALISATIONS
    984963c======================================================================
    985964c======================================================================
     
    12761255      ENDDO
    12771256
    1278 c Incrementer la temperature du sol
     1257c Update surface and subsurface temperatures
    12791258c
    12801259      DO i = 1, klon
     
    13941373C
    13951374c
    1396 c Incrementer la temperature du sol
     1375c Update surface temperature
    13971376c
    13981377      DO i = 1, klon
     
    14001379      ENDDO
    14011380
    1402 c Calculer la derive du flux infrarouge
     1381c Compute derivative of infrared flux
    14031382c
    14041383      DO i = 1, klon
     
    14161395
    14171396c===================================================================
    1418 c Convection seche
     1397c Dry Convection
    14191398c===================================================================
    14201399c
     
    14251404c
    14261405      IF(prt_level>9)WRITE(lunout,*)
    1427      .    'AVANT LA CONVECTION SECHE , iflag_ajs='
     1406     .    'BEFORE DRY CONVECTION , iflag_ajs='
    14281407     s   ,iflag_ajs
    14291408
     
    14311410c  Rien
    14321411c  ====
    1433          IF(prt_level>9)WRITE(lunout,*)'pas de convection'
     1412         IF(prt_level>9)WRITE(lunout,*)'no dry convection'
    14341413
    14351414      else if(iflag_ajs.eq.1) then
    14361415
    1437 Ajustement sec
    1438 c  ==============
     1416Dry convetive adjustement
     1417c  ========================
    14391418         IF(prt_level>9)WRITE(lunout,*)'ajsec'
    14401419
     
    14841463
    14851464c====================================================================
    1486 c RAYONNEMENT
     1465c RADIATION
    14871466c====================================================================
    14881467      if (mod(itap,radpas) == 0) then
    14891468
    1490       dtimerad = dtime*REAL(radpas)  ! pas de temps du rayonnement (s)
    1491 
    1492 ! update mmean
     1469      dtimerad = dtime*REAL(radpas)  ! radiative time step (s)
     1470
     1471! update mean molecular mass mmean
    14931472         if (ok_chem) then
    14941473            mmean(:,:) = 0.
     
    20862065#ifndef MESOSCALE       
    20872066#ifdef CPP_IOIPSL
    2088 
    2089 #ifdef histhf
    2090 #include "write_histhf.h"
    2091 #endif
    20922067
    20932068#ifdef histday
Note: See TracChangeset for help on using the changeset viewer.