Changeset 4608 for LMDZ6


Ignore:
Timestamp:
Jul 5, 2023, 12:03:42 PM (17 months ago)
Author:
acozic
Message:

Add of an output file containing mass flow when offline parameter is to "yes"
this file will be on horizontal grid with vertical level klev
When LMDZ is coupled to Inca, we don't call anymore the routine phystoken if offline=y

Anne Cozic

Location:
LMDZ6/trunk
Files:
1 added
7 edited

Legend:

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

    r4477 r4608  
    2727  <file_definition src="./file_def_histstrataer_lmdz.xml"/>
    2828  <file_definition src="./file_def_histdaystrataer_lmdz.xml"/>
     29<!--  <file_definition src="./file_def_phystoke_lmdz.xml"/>-->
    2930
    3031  <!-- Define domains and groups of domains -->
  • LMDZ6/trunk/DefLists/field_def_lmdz.xml

    r4601 r4608  
    870870    </field_group>
    871871
     872
     873
     874    <field_group id="fields_phystokenc_3D" domain_ref="dom_glo" axis_ref="klev"   >
     875      <field id="t_stok"         long_name="Temperature" unit="K" />
     876      <field id="coefh_stok"     long_name="coeff de melange dans la couche limite" unit="-" />
     877      <field id="fm_th_stok"     long_name="Mass flux thermals" unit="kg m-2.s-1" />
     878      <field id="en_th_stok"     long_name="Thermal plume entrainment" unit="kg m-1.s-1" />
     879      <field id="da_stok"        long_name="adiabatic ascen" unit="kg m-2.s-1" />
     880      <field id="mp_stok"        long_name="precipitating downdraft mass flux under hydrostatic approximation" unit="kg m-2.s-1" />
     881      <field id="wght_stok"      long_name="weights of the layers feeding convection" unit="-" />
     882      <field id="upwd_stok"      long_name="saturated updraft mass flux" unit="kg m-2.s-1" />
     883      <field id="dnwd_stok"      long_name="saturated downdraft mass flux" unit="kg m-2.s-1" />
     884    </field_group>
     885   
     886    <field_group id="philev_grp" long_name="mass flow environmental mixing" unit="kg m-2 s-1" domain_ref="dom_glo" axis_ref="klev" operation="average"/>
     887
     888    <field_group id="fields_phystokenc_2D" grid_ref="grid_glo" >
     889      <field id="yu1_stok"       long_name="zonal surface wind" unit="m.s-1" />
     890      <field id="yv1_stok"       long_name="wind meridian surface" unit="m.s-1" />
     891    </field_group>
     892
     893
     894   
    872895    <field_group id="fields_trac_2D" grid_ref="grid_glo" >
    873896          <field id="cumRN"    long_name="Cumulated tracer  RNVL1"    unit="-" />
  • LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90

    r4519 r4608  
    2525  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
    2626                       alphax,alphay,taux,tauy
    27   USE temps_mod, ONLY: calend, year_len
     27  USE temps_mod, ONLY: calend, year_len, offline_time
    2828
    2929  IMPLICIT NONE
     
    628628
    629629     !Config  Key  = offline
    630      !Config  Desc = Nouvelle eau liquide
     630     !Config  Desc = ecriture des flux de masse
    631631     !Config  Def  = n
    632      !Config  Help = Permet de mettre en route la
    633      !Config         nouvelle parametrisation de l'eau liquide !
     632     !Config  Help = Permet de sortir les flux de masse sur la grille plev
    634633     offline = .FALSE.
    635634     CALL getin('offline',offline)
     635
     636     !Config Key  = offline_time
     637     !Config Desc =  Choix des frequences de stockage pour le offline
     638     !Config Def  = 8
     639     !Config Help = offline_time=12     ! stockage toutes les 2h=1jour/12
     640     !Config Help = offline_time=8      ! stockage toutes les 3h=1jour/8
     641     offline_time = 8
     642     CALL getin('offline_time',offline_time)
     643
    636644     IF (offline .AND. adjust) THEN
    637645        WRITE(lunout,*)  &
     
    722730     write(lunout,*)' tauyy = ', tauyy
    723731     write(lunout,*)' offline = ', offline
     732     write(lunout,*)' offline_time = ', offline_time
    724733     write(lunout,*)' type_trac = ', type_trac
    725734     write(lunout,*)' ok_dynzon = ', ok_dynzon
  • LMDZ6/trunk/libf/dyn3dmem/temps_mod.F90

    r3579 r4608  
    1919  REAL      start_time
    2020  CHARACTER (len=10) :: calend ! calendar type
     21  INTEGER   offline_time ! offline frequency storage
    2122
    2223  ! Additionnal Mars stuff:
  • LMDZ6/trunk/libf/misc/wxios.F90

    r4606 r4608  
    183183      IMPLICIT NONE
    184184
    185       TYPE(xios_fieldgroup) :: group_handle
     185      TYPE(xios_fieldgroup) :: group_handle, philev_hdl
    186186      TYPE(xios_field) :: child
    187187      INTEGER :: k, iq
    188       CHARACTER(len=12) :: nvar   
     188      CHARACTER(len=12) :: nvar, name_phi   
    189189      CHARACTER(LEN=maxlen) :: varname, dn
    190190      CHARACTER(LEN=maxlen) :: unt
     
    261261         CALL xios_add_child(group_handle, child, varname)
    262262         CALL xios_set_attr(child, name=varname, unit=unt)
     263      ENDDO
     264     
     265
     266      ! group create for offline mass flow variables
     267      CALL xios_get_handle("philev_grp", philev_hdl)
     268
     269      DO k=1,79
     270         IF (k<10) THEN
     271            WRITE(nvar,'(i1)') k
     272         ELSE IF (k<100) THEN
     273            WRITE(nvar,'(i2)') k
     274         ELSE
     275            WRITE(nvar,'(i3)') k
     276         END IF
     277         name_phi= "phi_lev"//TRIM(nvar)
     278         CALL xios_add_child(philev_hdl, child, "phi_lev"//TRIM(nvar))
     279         CALL xios_set_attr(child, name=trim(name_phi))
    263280      ENDDO
    264281
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r4606 r4608  
    1919       ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, ibs, ok_sync, &
    2020       ptconv, read_climoz, clevSTD, ptconvth, &
    21        d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc)
     21       d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)
    2222
    2323    ! This subroutine does the actual writing of diagnostics that were
     
    3131    USE time_phylmdz_mod, ONLY: day_step_phy, start_time, itau_phy
    3232    USE vertical_layers_mod, ONLY : ap, bp, aps, bps
     33    USE phystokenc_mod, ONLY: offline
    3334    USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
    3435         o_longitude, o_latitude, &
     
    360361         ep, epmax_diag, &  ! epmax_cape
    361362         p_tropopause, t_tropopause, z_tropopause, &
    362          zxfluxt,zxfluxq
    363 !FC
     363         zxfluxt,zxfluxq, &
     364! offline
     365         da, mp, phi, wght_cvfd
     366
    364367
    365368#ifdef CPP_StratAer
     
    458461    INTEGER :: flag_aerosol
    459462    LOGICAL :: ok_cdnc
     463    REAL, DIMENSION(klon,klev) :: t   ! output for phystoken - offline flux
     464    REAL, DIMENSION(klon) :: u1, v1   ! output for phystoken - offline flux
     465   
    460466    REAL, DIMENSION(3) :: freq_moyNMC
    461467
     
    482488#endif
    483489    REAL, PARAMETER :: un_jour=86400.
     490    CHARACTER(len=12) :: nvar   
    484491    INTEGER :: ISW, itr, ixt, it
    485492    CHARACTER*1 ch1
    486493    CHARACTER(LEN=maxlen) :: varname, dn
    487 
     494    REAL, DIMENSION(klon,klev) :: coefh_stok
     495   
     496   
    488497#ifdef CPP_StratAer
    489498    LOGICAL, PARAMETER :: debug_strataer=.FALSE.
     
    874883       CALL histwrite_phy(o_topl0, toplw0)
    875884
     885! offline
     886#ifdef CPP_XIOS
     887       IF (offline) THEN
     888
     889          coefh_stok(:,1)      = cdragh(:)
     890          coefh_stok(:,2:klev) = coefh(:,2:klev, is_ave)
     891         
     892          CALL histwrite_phy('upwd_stok', upwd)
     893          CALL histwrite_phy('t_stok', t)
     894          CALL histwrite_phy('fm_th_stok', fm_therm(:,1:klev))
     895          CALL histwrite_phy('en_th_stok', entr_therm)
     896          CALL histwrite_phy('da_stok',da )
     897          CALL histwrite_phy('mp_stok',mp )
     898          CALL histwrite_phy('dnwd_stok', dnwd)
     899          CALL histwrite_phy('wght_stok', wght_cvfd)
     900          CALL histwrite_phy('coefh_stok', coefh_stok)
     901          CALL histwrite_phy('yu1_stok', u1)
     902          CALL histwrite_phy('yv1_stok', v1)
     903
     904          DO k=1,klev
     905             IF (k<10) THEN
     906                WRITE(nvar,'(i1)') k
     907             ELSE IF (k<100) THEN
     908                WRITE(nvar,'(i2)') k
     909             ELSE
     910                WRITE(nvar,'(i3)') k
     911             END IF
     912             nvar='phi_lev'//trim(nvar)
     913             CALL histwrite_phy(nvar,phi(:,:,k))
     914          END DO
     915         
     916       ENDIF
     917#endif
     918
     919
     920
     921       
    876922       IF (vars_defined) THEN
    877923          zx_tmp_fi2d(:) = swup(:,klevp1)*swradcorr(:)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4601 r4608  
    18341834                              ptconv, read_climoz, clevSTD,                   &
    18351835                              ptconvth, d_u, d_t, qx, d_qx, zmasse,           &
    1836                               flag_aerosol, flag_aerosol_strat, ok_cdnc)
     1836                              flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1)
    18371837#endif
    18381838
     
    52135213    !ENDIF    ! (iflag_phytrac=1)
    52145214
     5215
     5216#ifndef INCA
    52155217    IF (offline) THEN
    52165218
     
    52285230
    52295231    ENDIF
    5230 
     5232#endif
    52315233    !
    52325234    ! Calculer le transport de l'eau et de l'energie (diagnostique)
     
    55475549         ok_sync, ptconv, read_climoz, clevSTD,          &
    55485550         ptconvth, d_u, d_t, qx, d_qx, zmasse,           &
    5549          flag_aerosol, flag_aerosol_strat, ok_cdnc)
     5551         flag_aerosol, flag_aerosol_strat, ok_cdnc, t, u1, v1 )
    55505552#endif
    55515553
Note: See TracChangeset for help on using the changeset viewer.