MODULE thermcell_mod IMPLICIT NONE ! Flags for computations ! default INTEGER,PARAMETER :: iflag_thermals_optflux = 0 ! 0 INTEGER,PARAMETER :: iflag_thermals_closure = 2 ! 2 INTEGER,PARAMETER :: iflag_thermals = 18 ! 18 ! Flags for diagnoses LOGICAL,PARAMETER :: sorties = .false. ! false INTEGER,PARAMETER :: iflag_trig_bl = 1 ! 1 INTEGER,PARAMETER :: iflag_clos_bl = 1 ! 1 INTEGER,PARAMETER :: iflag_coupl = 5 ! 5 ! Physical parameters REAL,PARAMETER :: fact_thermals_ed_dz = 0.007 ! 0.007 REAL,PARAMETER :: r_aspect_thermals = 2.0 ! REAL,PARAMETER :: tau_thermals = 0. ! 0. REAL,PARAMETER :: betalpha = 0.9 ! 0.9 REAL,PARAMETER :: afact = 2./3. ! 2./3. REAL,PARAMETER :: fact_epsilon = 0.000 ! 0.002 REAL,PARAMETER :: detr_q_power = 0.5 ! 0.5 REAL,PARAMETER :: detr_q_coef = 0.012 ! 0.012 REAL,PARAMETER :: mix0 = 0. ! 0. REAL,PARAMETER :: detr_min = 1.d-5 ! 1.e-5 REAL,PARAMETER :: entr_min = 1.d-5 ! 1.e-5 REAL,PARAMETER :: alphamax = 0.7 ! REAL,PARAMETER :: fomass_max = 0.5 ! REAL,PARAMETER :: fact_shell = 1. ! 1. REAL,PARAMETER :: pres_limit = 1.e5 ! 1.e5 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! AB : linf is used to set the lowest possible first level because we allow it ! to begin higher than the surface. It is set to 2 in order to remove the ! first layer for gas giant. ! If there is a surface, it has to be set to 1. ! If someone want to call more than once the thermal plume model in one ! or more grid point, this variable must become a saved array of INTEGER ! with size ngrid. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTEGER,PARAMETER :: linf = 2 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! AB : d_temp is an artificial virtual potential temperature added in layer ! linf which can be used to force convection to begin in it. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ REAL,PARAMETER :: d_temp = 10. ! 0. ! Parameters for diagnoses REAL,PARAMETER :: alp_bl_k = 0.5 ! 0.5 ! Physical constants REAL,SAVE :: RTT REAL,SAVE :: RG REAL,SAVE :: RKAPPA REAL,SAVE :: RPI REAL,SAVE :: RD !$OMP THREADPRIVATE(RTT, RG, RKAPPA, RPI, RD) !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! AB : Parameters needed only for a loop in thermcell_alp (diagnoses). ! Maybe to be removed. !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTEGER,PARAMETER :: nbsrf = 1 CONTAINS SUBROUTINE init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV) IMPLICIT NONE REAL g REAL rcp REAL r REAL pi REAL T_h2o_ice_liq REAL RV RTT = T_h2o_ice_liq RG = g RKAPPA = rcp RPI = pi RD = r RETURN END SUBROUTINE init_thermcell_mod END MODULE thermcell_mod