Changeset 4742 for LMDZ6


Ignore:
Timestamp:
Oct 28, 2023, 4:47:32 PM (14 months ago)
Author:
oboucher
Message:

Introduction of a flag ok_conserv_d_q_con to conserve water when convection is called every second timestep.
The idea is to save d_q_con_zmasse from a timestep to the next rather than d_q_con. This is only as good as concvl for conserving water.

Location:
LMDZ6/trunk/libf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90

    r4737 r4742  
    3838      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
    3939      !$OMP THREADPRIVATE(d_tr_dyn)
    40       REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
    41       !$OMP THREADPRIVATE(d_t_con,d_q_con)
     40      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
     41      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
    4242      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
    4343      !$OMP THREADPRIVATE(d_u_con,d_v_con)
     
    640640      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
    641641      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
    642       ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
     642      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
    643643      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
    644644      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
     
    767767      ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon))
    768768
    769 
    770769! FH Ajout de celles necessaires au phys_output_write_mod
    771770
     
    987986      DEALLOCATE(d_u_dyn,d_v_dyn)
    988987      DEALLOCATE(d_tr_dyn)                      !RomP
    989       DEALLOCATE(d_t_con,d_q_con)
     988      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
    990989      DEALLOCATE(d_u_con,d_v_con)
    991990      DEALLOCATE(d_t_wake,d_q_wake)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4737 r4742  
    162162       d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, &
    163163       ! Physic tendencies
    164        d_t_con,d_q_con,d_u_con,d_v_con, &
     164       d_t_con,d_q_con,d_q_con_zmasse,d_u_con,d_v_con, &
    165165       d_tr, &                              !! to be removed?? (jyg)
    166166       d_t_wake,d_q_wake, &
     
    12561256    LOGICAL, PARAMETER :: mass_fixer=.FALSE.
    12571257    REAL qql1(klon),qql2(klon),corrqql
     1258
     1259    !--OB flag to activate better conservation of water tendency when convection is not called every timestep
     1260    LOGICAL, PARAMETER :: ok_conserv_d_q_con=.FALSE.
    12581261
    12591262    REAL, dimension(klon,klev) :: t_env,q_env
     
    33773380    ENDIF
    33783381
     3382    !--saving d_q_con * zmass for next timestep if convection is not called every timestep
     3383    IF (ok_conserv_d_q_con) THEN
     3384      d_q_con_zmasse(:,:) = d_q_con(:,:) * zmasse(:,:)
     3385    ENDIF
     3386
    33793387    !     CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri,
    33803388    !    .              d_u_con, d_v_con)
     
    34063414!!
    34073415!!
     3416
     3417    !--recompute d_q_con with zmasse from new timestep
     3418    IF (ok_conserv_d_q_con) THEN
     3419      d_q_con(:,:)=d_q_con_zmasse(:,:)/zmasse(:,:)
     3420    ENDIF
     3421
    34083422    CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, dqbs0, paprs, &
    34093423         'convection',abortphy,flag_inhib_tend,itap,0)
  • LMDZ6/trunk/libf/phylmdiso/phys_local_var_mod.F90

    r4737 r4742  
    3636      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
    3737      !$OMP THREADPRIVATE(d_tr_dyn)
    38       REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
    39       !$OMP THREADPRIVATE(d_t_con,d_q_con)
     38      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:)
     39      !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse)
    4040      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
    4141      !$OMP THREADPRIVATE(d_u_con,d_v_con)
     
    737737      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
    738738      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
    739       ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
     739      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))
    740740      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
    741741      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
     
    11391139      DEALLOCATE(d_u_dyn,d_v_dyn)
    11401140      DEALLOCATE(d_tr_dyn)                      !RomP
    1141       DEALLOCATE(d_t_con,d_q_con)
     1141      DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)
    11421142      DEALLOCATE(d_u_con,d_v_con)
    11431143      DEALLOCATE(d_t_wake,d_q_wake)
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4737 r4742  
    197197       d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, &
    198198       ! Physic tendencies
    199        d_t_con,d_q_con,d_u_con,d_v_con, &
     199       d_t_con,d_q_con,d_q_con_zmasse,d_u_con,d_v_con, &
    200200       d_tr, &                              !! to be removed?? (jyg)
    201201       d_t_wake,d_q_wake, &
     
    13321332    real xtql1(ntraciso,klon),xtql2(ntraciso,klon),corrxtql(ntraciso)
    13331333#endif
    1334    
     1334
     1335    !--OB flag to activate better conservation of water tendency when convection is not called every timestep
     1336    LOGICAL, PARAMETER :: ok_conserv_d_q_con=.FALSE.
    13351337
    13361338    REAL, dimension(klon,klev) :: t_env,q_env
     
    40424044    ENDIF
    40434045
     4046    !--saving d_q_con * zmass for next timestep if convection is not called every timestep
     4047    IF (ok_conserv_d_q_con) THEN
     4048      d_q_con_zmasse(:,:) = d_q_con(:,:) * zmasse(:,:)
     4049    ENDIF
     4050
    40444051    !     CALL homogene(paprs, q_seri, d_q_con, u_seri,v_seri,
    40454052    !    .              d_u_con, d_v_con)
     
    40714078!!
    40724079!!
     4080
     4081    !--recompute d_q_con with zmasse from new timestep
     4082    IF (ok_conserv_d_q_con) THEN
     4083      d_q_con(:,:)=d_q_con_zmasse(:,:)/zmasse(:,:)
     4084    ENDIF
     4085
    40734086    CALL add_phys_tend(d_u_con, d_v_con, d_t_con, d_q_con, dql0, dqi0, dqbs0, paprs, &
    40744087         'convection',abortphy,flag_inhib_tend,itap,0 &
Note: See TracChangeset for help on using the changeset viewer.