Changeset 3284


Ignore:
Timestamp:
Mar 17, 2018, 9:58:45 AM (6 years ago)
Author:
Laurent Fairhead
Message:

Adding proper hybrid coordinates coefficients as per rhe CMIP6 data request

Location:
LMDZ6/branches/IPSLCM6.0.15
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/context_lmdz.xml

    r3271 r3284  
    5959    <axis id="plev" standard_name="model_level_number" unit="Pa">
    6060    </axis>
    61     <axis id="klev"  prec="8" long_name = "hybrid sigma pressure coordinate"
    62           standard_name ="atmosphere_hybrid_sigma_pressure_coordinate" unit="1">
     61    <axis id="klev"  prec="8" long_name = "number of layers"
     62          standard_name ="number of layers" unit="1">
     63    </axis>
     64    <axis id="klevp1"  prec="8" long_name = "number of layer interfaces"
     65          standard_name ="number of layer interfaces" unit="1">
    6366    </axis>
    6467    <axis id="bnds" standard_name="bounds" unit="1" >
     
    100103
    101104    <grid id="klev_bnds"> <axis axis_ref="klev" /> <axis axis_ref="bnds" /> </grid>
     105    <grid id="klevp1_bnds"> <axis axis_ref="klevp1" /> <axis axis_ref="bnds" /> </grid>
    102106
    103107     <grid id="grid_glo">
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/field_def_lmdz.xml

    r3271 r3284  
    1313
    1414    <field_group id="coord_hyb">
    15         <field id="Ahyb"      axis_ref="klev" />
    16         <field id="Ahyb_inter" grid_ref="klev_bnds" />
    17         <field id="Bhyb"       axis_ref="klev"  />
    18         <field id="Bhyb_inter"  grid_ref="klev_bnds" />
     15        <field id="Ahyb" long_name="Ahyb at level interface"     axis_ref="klevp1" />
     16        <field id="Ahyb_bounds" long_name="" grid_ref="klevp1_bnds" />
     17        <field id="Bhyb" long_name="Bhyb at level interface"       axis_ref="klevp1"  />
     18        <field id="Bhyb_bounds" long_name=""  grid_ref="klevp1_bnds" />
     19        <field id="Ahyb_mid" long_name="Ahyb at the middle of the level"      axis_ref="klev" />
     20        <field id="Ahyb_mid_bounds" long_name="" grid_ref="klev_bnds" />
     21        <field id="Bhyb_mid" long_name="Bhyb at the middle of the level"       axis_ref="klev"  />
     22        <field id="Bhyb_mid_bounds" long_name=""  grid_ref="klev_bnds" />
    1923    </field_group>
    2024   
  • LMDZ6/branches/IPSLCM6.0.15/DefLists/file_def_histmth_lmdz.xml

    r3250 r3284  
    1414              <field field_ref="io_lat" level="1" />
    1515              <field field_ref="Ahyb" level="1" />
    16               <field field_ref="Ahyb_inter" level="1" />
     16              <field field_ref="Ahyb_bounds" level="1" />
    1717              <field field_ref="Bhyb" level="1" />
    18               <field field_ref="Bhyb_inter" level="1" />
     18              <field field_ref="Bhyb_bounds" level="1" />
     19              <field field_ref="Ahyb_mid" level="1" />
     20              <field field_ref="Ahyb_mid_bounds" level="1" />
     21              <field field_ref="Bhyb_mid" level="1" />
     22              <field field_ref="Bhyb_mid_bounds" level="1" />
    1923            </field_group>
    2024
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/iophy.F90

    r3107 r3284  
    996996
    997997    !Et sinon on.... écrit
    998     IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon/klev',1)   
     998    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev .AND. SIZE(field)/=klev+1) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon/klev',1)   
    999999    IF (prt_level >= 10) THEn
    10001000      WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", trim(var%name)
     
    11541154    !Et sinon on.... écrit
    11551155
    1156     IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
     1156    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev .AND. SIZE(field,1)/=klev+1) CALL abort_physic('iophy::histwrite3d_phy','Field first DIMENSION not equal to klon/klev',1)
    11571157
    11581158    nlev=SIZE(field,2)
     
    12871287
    12881288    !Et sinon on.... écrit
    1289     IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
    1290    
    1291     IF (SIZE(field) == klev) then
     1289    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev .AND. SIZE(field)/=klev+1) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
     1290   
     1291    IF (SIZE(field) == klev .OR. SIZE(field) == klev+1) then
    12921292!$OMP MASTER
    12931293        CALL xios_send_field(field_name,field)
     
    13621362
    13631363    !Et on.... écrit
    1364     IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
    1365    
    1366     IF (SIZE(field,1) == klev) then
     1364    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev .AND. SIZE(field,1)/=klev+1) then
     1365      write(lunout,*)' histrwrite3d_xios ', field_name, SIZE(field)
     1366      CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
     1367    ENDIF
     1368   
     1369    IF (SIZE(field,1) == klev .OR. SIZE(field,1) == klev+1) then
    13671370!$OMP MASTER
    13681371        CALL xios_send_field(field_name,field)
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_ctrlout_mod.F90

    r3250 r3284  
    2626    'io_lat', '', '', (/ ('once', i=1, 10) /))
    2727
    28 !!! Comosantes de la coordonnee sigma-hybride
     28!!! Composantes de la coordonnee sigma-hybride
    2929!!! Ap et Bp et interfaces
    3030  TYPE(ctrl_out), SAVE :: o_Ahyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    31     'Ahyb', '', '', (/ ('once', i=1, 10) /))
     31    'Ahyb', 'Ahyb at level interface', '', (/ ('once', i=1, 10) /))
    3232  TYPE(ctrl_out), SAVE :: o_Bhyb = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    33     'Bhyb', '', '', (/ ('once', i=1, 10) /))
    34   TYPE(ctrl_out), SAVE :: o_Ahyb_inter = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    35     'Ahyb_inter', '', '', (/ ('once', i=1, 10) /))
    36   TYPE(ctrl_out), SAVE :: o_Bhyb_inter = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    37     'Bhyb_inter', '', '', (/ ('once', i=1, 10) /))
     33    'Bhyb', 'Bhyb at level interface', '', (/ ('once', i=1, 10) /))
     34  TYPE(ctrl_out), SAVE :: o_Ahyb_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     35    'Ahyb_bounds', '', '', (/ ('once', i=1, 10) /))
     36  TYPE(ctrl_out), SAVE :: o_Bhyb_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     37    'Bhyb_bounds', '', '', (/ ('once', i=1, 10) /))
     38!!! Composantes de la coordonnee sigma-hybride  au milieu des couches
     39!!! Aps et Bps et interfaces
     40  TYPE(ctrl_out), SAVE :: o_Ahyb_mid = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     41    'Ahyb_mid', 'Ahyb at the middle of the level', '', (/ ('once', i=1, 10) /))
     42  TYPE(ctrl_out), SAVE :: o_Bhyb_mid = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     43    'Bhyb_mid', 'Bhyb at the middle of the level', '', (/ ('once', i=1, 10) /))
     44  TYPE(ctrl_out), SAVE :: o_Ahyb_mid_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     45    'Ahyb_mid_bounds', '', '', (/ ('once', i=1, 10) /))
     46  TYPE(ctrl_out), SAVE :: o_Bhyb_mid_bounds = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
     47    'Bhyb_mid_bounds', '', '', (/ ('once', i=1, 10) /))
     48
    3849  TYPE(ctrl_out), SAVE :: o_Alt = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    3950    'Alt', '', '', (/ ('', i=1, 10) /))
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_mod.F90

    r3125 r3284  
    131131                                                                       90.,   90.,   90.,   90.,   90. /)
    132132    REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds
    133     REAL, DIMENSION(klev)   :: lev_index
     133    REAL, DIMENSION(klev+1)   :: lev_index
    134134               
    135135#ifdef CPP_XIOS
     
    156156      lev_index(ilev) = REAL(ilev)
    157157    END DO
     158      lev_index(klev+1) = REAL(klev+1)
    158159
    159160    IF (.NOT. ALLOCATED(o_trac)) ALLOCATE(o_trac(nqtot))
     
    361362    CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, &
    362363                          lev_index(levmin(iff):levmax(iff)))
     364    CALL wxios_add_vaxis("klevp1", klev+1, &
     365                          lev_index(1:klev+1))
    363366    CALL wxios_add_vaxis("bnds", 2, (/1.,2./))
    364367
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90

    r3250 r3284  
    3232    USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
    3333         o_longitude, o_latitude, &
    34          o_Ahyb, o_Bhyb,o_Ahyb_inter, o_Bhyb_inter, &
     34         o_Ahyb, o_Bhyb,o_Ahyb_bounds, o_Bhyb_bounds, &
     35         o_Ahyb_mid, o_Bhyb_mid,o_Ahyb_mid_bounds, o_Bhyb_mid_bounds, &
    3536         is_ave, is_sic, o_contfracATM, o_contfracOR, &
    3637         o_aireTER, o_flat, o_slp, o_ptstar, o_pt0, o_tsol, &
     
    413414    REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
    414415!   REAL, PARAMETER :: missing_val=nf90_fill_real
    415     REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds
     416    REAL, DIMENSION(klev+1,2) :: Ahyb_bounds, Bhyb_bounds
     417    REAL, DIMENSION(klev,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds
    416418    INTEGER :: ilev
    417419#ifndef CPP_XIOS
     
    442444    ENDIF
    443445
    444     DO ilev=1,klev
    445       Ahyb_bounds(ilev,1) = ap(ilev)
    446       Ahyb_bounds(ilev,2) = ap(ilev+1)
    447       Bhyb_bounds(ilev,1) = bp(ilev)
    448       Bhyb_bounds(ilev,2) = bp(ilev+1)
     446    Ahyb_bounds(1,1) = 0.
     447    Ahyb_bounds(1,2) = aps(1)
     448    Bhyb_bounds(1,1) = 1.
     449    Bhyb_bounds(1,2) = bps(1)   
     450    DO ilev=2,klev
     451      Ahyb_bounds(ilev,1) = aps(ilev-1)
     452      Ahyb_bounds(ilev,2) = aps(ilev)
     453      Bhyb_bounds(ilev,1) = bps(ilev-1)
     454      Bhyb_bounds(ilev,2) = bps(ilev)
     455    ENDDO
     456     Ahyb_bounds(klev+1,1) = aps(klev)
     457     Ahyb_bounds(klev+1,2) = 0.
     458     Bhyb_bounds(klev+1,1) = bps(klev)
     459     Bhyb_bounds(klev+1,2) = 0.
     460
     461    DO ilev=1, klev
     462      Ahyb_mid_bounds(ilev,1) = ap(ilev)
     463      Ahyb_mid_bounds(ilev,2) = ap(ilev+1)
     464      Bhyb_mid_bounds(ilev,1) = bp(ilev)
     465      Bhyb_mid_bounds(ilev,2) = bp(ilev+1)
    449466    END DO
    450467
     
    561578       CALL histwrite_phy("R_incl",R_incl)
    562579       CALL histwrite_phy("solaire",solaire)
    563        CALL histwrite_phy(o_Ahyb, aps)
    564        CALL histwrite_phy(o_Bhyb, bps)
    565        CALL histwrite_phy(o_Ahyb_inter, Ahyb_bounds)
    566        CALL histwrite_phy(o_Bhyb_inter, Bhyb_bounds)
     580       CALL histwrite_phy(o_Ahyb, ap)
     581       CALL histwrite_phy(o_Bhyb, bp)
     582       CALL histwrite_phy(o_Ahyb_bounds, Ahyb_bounds)
     583       CALL histwrite_phy(o_Bhyb_bounds, Bhyb_bounds)
     584       CALL histwrite_phy(o_Ahyb_mid, aps)
     585       CALL histwrite_phy(o_Bhyb_mid, bps)
     586       CALL histwrite_phy(o_Ahyb_mid_bounds, Ahyb_mid_bounds)
     587       CALL histwrite_phy(o_Bhyb_mid_bounds, Bhyb_mid_bounds)
    567588       CALL histwrite_phy(o_longitude, longitude_deg)
    568589       CALL histwrite_phy(o_latitude, latitude_deg)
Note: See TracChangeset for help on using the changeset viewer.