Ignore:
Timestamp:
Sep 17, 2023, 1:16:26 PM (10 months ago)
Author:
fhourdin
Message:

Preparation/test de convergence num en temps

File:
1 edited

Legend:

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

    r4664 r4690  
    55save
    66
    7    integer :: dvdq=1,dqimpl=-1,prt_level=0,lunout
    8    real    :: RG,RD,RCPD,RKAPPA,RLVTT,RLvCp,RETV
    9    real    :: r_aspect_thermals,tau_thermals,fact_thermals_ed_dz
    10    integer :: iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure
    11    integer :: iflag_thermals_down
    12    real    :: fact_thermals_down
     7
     8integer, protected :: dvdq=1,dqimpl=-1,prt_level=0,lunout
     9real   , protected :: RG,RD,RCPD,RKAPPA,RLVTT,RLvCp,RETV
    1310
    1411!$OMP THREADPRIVATE(dvdq,dqimpl,prt_level,lunout)
    1512!$OMP THREADPRIVATE(RG,RD,RCPD,RKAPPA,RLVTT,RLvCp)
     13
     14
     15! Parameters that can be modified directly by a getin call
     16real,    protected :: r_aspect_thermals=2.       ! Aspect ratio for thermal celles
     17real,    protected :: tau_thermals = 0.          ! relaxation time constant
     18real,    protected :: fact_thermals_ed_dz = 0.1  ! bouyancy computed with a delta
     19real,    protected :: betalpha=0.9               !
     20real,    protected :: afact=2./3.                !
     21real,    protected :: fact_shell=1.              !
     22real,    protected :: detr_min=1.e-5             !
     23real,    protected :: entr_min=1.e-5             !
     24real,    protected :: detr_q_coef=0.012          !
     25real,    protected :: detr_q_power=0.5           !
     26real,    protected :: mix0=0.                    !
     27integer, protected :: iflag_thermals_ed = 0      !
     28integer, protected :: iflag_thermals_optflux = 0 !
     29integer, protected :: iflag_thermals_closure = 1 !
     30integer, protected :: iflag_thermals_down = 0    !
     31integer, protected :: fact_thermals_down = 0.5   !
     32integer, protected :: thermals_flag_alim=0       !
     33integer, protected :: iflag_thermals_tenv=0      !
     34
     35   ! WARNING !!! fact_epsilon is not protected. It can be modified in thermcell_plume*
     36   ! depending on other flags.
     37
     38   real               :: fact_epsilon=0.002
     39
    1640!$OMP THREADPRIVATE(r_aspect_thermals,tau_thermals,fact_thermals_ed_dz)
    1741!$OMP THREADPRIVATE(iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure)
    1842!$OMP THREADPRIVATE(iflag_thermals_down)
    1943!$OMP THREADPRIVATE(fact_thermals_down)
    20 
    21 
    22    REAL, SAVE :: fact_epsilon=0.002
    23    REAL, SAVE :: betalpha=0.9
    24    REAL, SAVE :: afact=2./3.
    25    REAL, SAVE :: fact_shell=1.
    26    REAL,SAVE :: detr_min=1.e-5
    27    REAL,SAVE :: entr_min=1.e-5
    28    REAL,SAVE :: detr_q_coef=0.012
    29    REAL,SAVE :: detr_q_power=0.5
    30    REAL,SAVE :: mix0=0.
    31    INTEGER,SAVE :: thermals_flag_alim=0
    32 
    3344!$OMP THREADPRIVATE(fact_epsilon, betalpha, afact, fact_shell)
    3445!$OMP THREADPRIVATE(detr_min, entr_min, detr_q_coef, detr_q_power)
    3546!$OMP THREADPRIVATE( mix0, thermals_flag_alim)
     47!$OMP THREADPRIVATE(iflag_thermals_tenv)
    3648
    3749
     
    7082!=====================================================================
    7183
    72    r_aspect_thermals=2.
    7384   CALL getin_p('r_aspect_thermals',r_aspect_thermals)
    74    
    75    tau_thermals = 0.
    7685   CALL getin_p('tau_thermals',tau_thermals)
    77    
    78    fact_thermals_ed_dz = 0.1
    7986   CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
    80    
    81    fact_thermals_ed_dz = 0.1
    82    CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
    83    
    84    iflag_thermals_ed = 0
    8587   CALL getin_p('iflag_thermals_ed',iflag_thermals_ed)
    86    
    87    iflag_thermals_optflux = 0
    8888   CALL getin_p('iflag_thermals_optflux',iflag_thermals_optflux)
    89    
    90    iflag_thermals_closure = 1
    9189   CALL getin_p('iflag_thermals_closure',iflag_thermals_closure)
    92 
    93    iflag_thermals_down = 0
    9490   CALL getin_p('iflag_thermals_down',iflag_thermals_down)
    95 
    96    fact_thermals_down = 0.5
    9791   CALL getin_p('fact_thermals_down',fact_thermals_down)
    98 
    99      CALL getin_p('thermals_fact_epsilon',fact_epsilon)
    100      CALL getin_p('thermals_betalpha',betalpha)
    101      CALL getin_p('thermals_afact',afact)
    102      CALL getin_p('thermals_fact_shell',fact_shell)
    103      CALL getin_p('thermals_detr_min',detr_min)
    104      CALL getin_p('thermals_entr_min',entr_min)
    105      CALL getin_p('thermals_detr_q_coef',detr_q_coef)
    106      CALL getin_p('thermals_detr_q_power',detr_q_power)
    107      CALL getin_p('thermals_mix0',mix0)
    108      CALL getin_p('thermals_flag_alim',thermals_flag_alim)
     92   CALL getin_p('thermals_fact_epsilon',fact_epsilon)
     93   CALL getin_p('thermals_betalpha',betalpha)
     94   CALL getin_p('thermals_afact',afact)
     95   CALL getin_p('thermals_fact_shell',fact_shell)
     96   CALL getin_p('thermals_detr_min',detr_min)
     97   CALL getin_p('thermals_entr_min',entr_min)
     98   CALL getin_p('thermals_detr_q_coef',detr_q_coef)
     99   CALL getin_p('thermals_detr_q_power',detr_q_power)
     100   CALL getin_p('thermals_mix0',mix0)
     101   CALL getin_p('thermals_flag_alim',thermals_flag_alim)
     102   CALL getin_p('iflag_thermals_tenv',iflag_thermals_tenv)
    109103
    110104
     
    139133write(lunout,*) 'thermcell_ini ,mix0                     =',  mix0                   
    140134write(lunout,*) 'thermcell_ini ,thermals_flag_alim       =',  thermals_flag_alim
     135write(lunout,*) 'thermcell_ini ,iflag_thermals_tenv      =',  iflag_thermals_tenv
    141136
    142137 RETURN
Note: See TracChangeset for help on using the changeset viewer.