Changeset 4228


Ignore:
Timestamp:
Jul 26, 2022, 3:36:45 PM (2 years ago)
Author:
Laurent Fairhead
Message:

Modifications to code to introduce a new vertical axis on llm+1 levels so that fluxes can
be output on their proper levels as per the CMIP6 DataRequest??
Actually is r3853 from the IPSL-CM6A-MR branch
LF

Location:
LMDZ6/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/DefLists/context_lmdz.xml

    r4145 r4228  
    6363    <axis id="time_year" unit="day" />
    6464    <axis id="presnivs" standard_name="Vertical levels" unit="Pa"/>
     65    <axis id="presinter" standard_name="Pressure at interface of vertical levels" unit="Pa"/>
    6566    <axis id="Ahyb" standard_name="Ahyb comp of Hyb Cord" unit="Pa"/>
    6667    <axis id="Bhyb" standard_name="Bhyb comp of Hyb Cord" unit=""/>
     
    119120     </grid>
    120121
     122     <grid id="grid_glo_presinter">
     123        <domain domain_ref="dom_glo" />
     124        <axis axis_ref="presinter" />
     125     </grid>
     126     <grid id="grid_out_presinter">
     127        <domain domain_ref="dom_out" />
     128        <axis axis_ref="presinter" />
     129     </grid>
     130
    121131     <grid id="grid_out_plev17">
    122132        <domain id="dom_out" />
  • LMDZ6/trunk/libf/dyn3d_common/comvert_mod.F90

    r2602 r4228  
    1010
    1111PUBLIC :: ap,bp,presnivs,dpres,sig,ds,pa,preff,nivsigs,nivsig, &
    12           aps,bps,scaleheight,pseudoalt,disvert_type, pressure_exner
     12          aps,bps,scaleheight,pseudoalt,disvert_type, pressure_exner, &
     13          presinter
    1314
    1415REAL ap(llm+1) ! hybrid pressure contribution at interlayers
    1516REAL bp (llm+1) ! hybrid sigma contribution at interlayer
    1617REAL presnivs(llm) ! (reference) pressure at mid-layers
     18REAL presinter(llm+1) ! (reference) pressure at interlayers
    1719REAL dpres(llm)
    1820REAL sig(llm+1)
  • LMDZ6/trunk/libf/dyn3d_common/disvert.F90

    r2786 r4228  
    1111  use assert_m, only: assert
    1212  USE comvert_mod, ONLY: ap, bp, aps, bps, nivsigs, nivsig, dpres, presnivs, &
    13                          pseudoalt, pa, preff, scaleheight
     13                         pseudoalt, pa, preff, scaleheight, presinter
    1414  USE logic_mod, ONLY: ok_strato
    1515
     
    3535! dpres(llm)                 !--- PRESSURE DIFFERENCE FOR EACH LAYER
    3636! presnivs(llm)              !--- PRESSURE AT EACH MID-LAYER
     37! presinter(llm+1)           !--- PRESSURE AT EACH INTERFACE
    3738! scaleheight                !--- VERTICAL SCALE HEIGHT            (Earth: 8kms)
    3839! nivsig(llm+1)              !--- SIGMA INDEX OF EACH LAYER INTERFACE
     
    355356          max(ap(l+1)+bp(l+1)*preff, 1.e-10))
    356357  ENDDO
     358  DO l=1, llmp1
     359     presinter(l)= ( ap(l)+bp(l)*preff)
     360     write(lunout, *)'PRESINTER(', l, ')=', presinter(l)
     361  ENDDO
    357362
    358363  write(lunout, *) trim(modname),': PRESNIVS '
  • LMDZ6/trunk/libf/dynphy_lonlat/inigeomphy_mod.F90

    r3895 r4228  
    2525  USE nrtype, ONLY: pi
    2626  USE comvert_mod, ONLY: preff, ap, bp, aps, bps, presnivs, &
    27                          scaleheight, pseudoalt
     27                         scaleheight, pseudoalt, presinter
    2828  USE vertical_layers_mod, ONLY: init_vertical_layers
    2929  IMPLICIT NONE
     
    233233  ! copy over preff , ap(), bp(), etc
    234234  CALL init_vertical_layers(nlayer,preff,scaleheight, &
    235                             ap,bp,aps,bps,presnivs,pseudoalt)
     235                            ap,bp,aps,bps,presnivs,presinter,pseudoalt)
    236236
    237237!$OMP END PARALLEL
  • LMDZ6/trunk/libf/phy_common/vertical_layers_mod.F90

    r2786 r4228  
    1515   REAL,SAVE,ALLOCATABLE :: presnivs(:) ! reference pressure at mid-layer (Pa),
    1616                                        ! based on preff, ap and bp
     17   REAL,SAVE,ALLOCATABLE :: presinter(:) ! reference pressure at interface (Pa),
     18                                        ! based on preff, ap and bp
    1719   REAL,SAVE,ALLOCATABLE :: pseudoalt(:) ! pseudo-altitude of model layers (km),
    1820                                         ! based on preff and scaleheight
    1921   
    20 !$OMP THREADPRIVATE(preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt)
     22!$OMP THREADPRIVATE(preff,scaleheight,ap,bp,aps,bps,presnivs,presinter,pseudoalt)
    2123
    2224
     
    2426
    2527  SUBROUTINE init_vertical_layers(nlayer,preff_,scaleheight_,ap_,bp_,&
    26                                  aps_,bps_,presnivs_, pseudoalt_)
     28                                 aps_,bps_,presnivs_, presinter_, pseudoalt_)
    2729    IMPLICIT NONE
    2830    INTEGER,INTENT(IN) :: nlayer ! number of atmospheric layers
     
    3436    REAL,INTENT(IN)    :: bps_(nlayer) ! hybrid coordinate at mid-layer
    3537    REAL,INTENT(IN)    :: presnivs_(nlayer) ! Appproximative pressure of atm. layers (Pa)
     38    REAL,INTENT(IN)    :: presinter_(nlayer+1) ! Appproximative pressure of atm. layers (Pa)
    3639    REAL,INTENT(IN)    :: pseudoalt_(nlayer) ! pseudo-altitude of atm. layers (km)
    3740 
     
    4144    ALLOCATE(bps(nlayer))
    4245    ALLOCATE(presnivs(nlayer))
     46    ALLOCATE(presinter(nlayer+1))
    4347    ALLOCATE(pseudoalt(nlayer))
    4448 
     
    5054    bps(:) = bps_(:)
    5155    presnivs(:) = presnivs_(:)
     56    presinter(:) = presinter_(:)
    5257    pseudoalt(:) = pseudoalt_(:)
    5358
  • LMDZ6/trunk/libf/phylmd/iophy.F90

    • Property svn:keywords changed from Author Date Id Revision to Id
    r4103 r4228  
    12491249
    12501250    nlev=SIZE(field,2)
    1251     IF (nlev.EQ.klev+1) THEN
    1252         nlevx=klev
    1253     ELSE
    1254         nlevx=nlev
    1255     ENDIF
     1251    nlevx=nlev
     1252!    IF (nlev.EQ.klev+1) THEN
     1253!        nlevx=klev
     1254!    ELSE
     1255!        nlevx=nlev
     1256!    ENDIF
    12561257
    12571258    IF (SIZE(field,1) == klon) then
  • LMDZ6/trunk/libf/phylmd/phys_output_mod.F90

    • Property svn:keywords changed from Author Date Id Revision to Id
    r4170 r4228  
    4545    USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat
    4646    USE print_control_mod, ONLY: prt_level,lunout
    47     USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs, aps, bps, pseudoalt
     47    USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs, aps, bps, pseudoalt, presinter
    4848    USE time_phylmdz_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref
    4949#ifdef CPP_XIOS
     
    347347    CALL wxios_add_vaxis("presnivs", &
    348348            levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff)))
     349    CALL wxios_add_vaxis("presinter", &
     350            klev + 1, presinter(1:klev+1))
    349351    CALL wxios_add_vaxis("Ahyb", &
    350352            levmax(iff) - levmin(iff) + 1, aps(levmin(iff):levmax(iff)), positif='down', &
Note: See TracChangeset for help on using the changeset viewer.