| 1 | MODULE thermcell_mod |
|---|
| 2 | |
|---|
| 3 | IMPLICIT NONE |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | ! Flags for computations |
|---|
| 7 | ! default |
|---|
| 8 | INTEGER,PARAMETER :: iflag_thermals_optflux = 0 ! 0 |
|---|
| 9 | INTEGER,PARAMETER :: iflag_thermals_closure = 2 ! 2 |
|---|
| 10 | INTEGER,PARAMETER :: iflag_thermals = 18 ! 18 |
|---|
| 11 | |
|---|
| 12 | ! Flags for diagnoses |
|---|
| 13 | |
|---|
| 14 | LOGICAL,PARAMETER :: sorties = .false. ! false |
|---|
| 15 | INTEGER,PARAMETER :: iflag_trig_bl = 1 ! 1 |
|---|
| 16 | INTEGER,PARAMETER :: iflag_clos_bl = 1 ! 1 |
|---|
| 17 | INTEGER,PARAMETER :: iflag_coupl = 5 ! 5 |
|---|
| 18 | |
|---|
| 19 | ! Physical parameters |
|---|
| 20 | |
|---|
| 21 | REAL,PARAMETER :: fact_thermals_ed_dz = 0.007 ! 0.007 |
|---|
| 22 | REAL,PARAMETER :: r_aspect_thermals = 2.0 ! |
|---|
| 23 | REAL,PARAMETER :: tau_thermals = 0. ! 0. |
|---|
| 24 | REAL,PARAMETER :: betalpha = 0.9 ! 0.9 |
|---|
| 25 | REAL,PARAMETER :: afact = 2./3. ! 2./3. |
|---|
| 26 | REAL,PARAMETER :: fact_epsilon = 0.000 ! 0.002 |
|---|
| 27 | REAL,PARAMETER :: detr_q_power = 0.5 ! 0.5 |
|---|
| 28 | REAL,PARAMETER :: detr_q_coef = 0.012 ! 0.012 |
|---|
| 29 | REAL,PARAMETER :: mix0 = 0. ! 0. |
|---|
| 30 | REAL,PARAMETER :: detr_min = 1.d-5 ! 1.e-5 |
|---|
| 31 | REAL,PARAMETER :: entr_min = 1.d-5 ! 1.e-5 |
|---|
| 32 | REAL,PARAMETER :: alphamax = 0.7 ! |
|---|
| 33 | REAL,PARAMETER :: fomass_max = 0.5 ! |
|---|
| 34 | REAL,PARAMETER :: fact_shell = 1. ! 1. |
|---|
| 35 | REAL,PARAMETER :: pres_limit = 1.e5 ! 1.e5 |
|---|
| 36 | |
|---|
| 37 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 38 | ! AB : linf is used to set the lowest possible first level because we allow it |
|---|
| 39 | ! to begin higher than the surface. It is set to 2 in order to remove the |
|---|
| 40 | ! first layer for gas giant. |
|---|
| 41 | ! If there is a surface, it has to be set to 1. |
|---|
| 42 | ! If someone want to call more than once the thermal plume model in one |
|---|
| 43 | ! or more grid point, this variable must become a saved array of INTEGER |
|---|
| 44 | ! with size ngrid. |
|---|
| 45 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 46 | INTEGER,PARAMETER :: linf = 2 |
|---|
| 47 | |
|---|
| 48 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 49 | ! AB : d_temp is an artificial virtual potential temperature added in layer |
|---|
| 50 | ! linf which can be used to force convection to begin in it. |
|---|
| 51 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 52 | REAL,PARAMETER :: d_temp = 10. ! 0. |
|---|
| 53 | |
|---|
| 54 | ! Parameters for diagnoses |
|---|
| 55 | |
|---|
| 56 | REAL,PARAMETER :: alp_bl_k = 0.5 ! 0.5 |
|---|
| 57 | |
|---|
| 58 | ! Physical constants |
|---|
| 59 | |
|---|
| 60 | REAL,SAVE :: RTT |
|---|
| 61 | REAL,SAVE :: RG |
|---|
| 62 | REAL,SAVE :: RKAPPA |
|---|
| 63 | REAL,SAVE :: RPI |
|---|
| 64 | REAL,SAVE :: RD |
|---|
| 65 | |
|---|
| 66 | !$OMP THREADPRIVATE(RTT, RG, RKAPPA, RPI, RD) |
|---|
| 67 | |
|---|
| 68 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 69 | ! AB : Parameters needed only for a loop in thermcell_alp (diagnoses). |
|---|
| 70 | ! Maybe to be removed. |
|---|
| 71 | !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 72 | INTEGER,PARAMETER :: nbsrf = 1 |
|---|
| 73 | |
|---|
| 74 | |
|---|
| 75 | CONTAINS |
|---|
| 76 | |
|---|
| 77 | SUBROUTINE init_thermcell_mod(g, rcp, r, pi, T_h2o_ice_liq, RV) |
|---|
| 78 | |
|---|
| 79 | IMPLICIT NONE |
|---|
| 80 | |
|---|
| 81 | REAL g |
|---|
| 82 | REAL rcp |
|---|
| 83 | REAL r |
|---|
| 84 | REAL pi |
|---|
| 85 | REAL T_h2o_ice_liq |
|---|
| 86 | REAL RV |
|---|
| 87 | |
|---|
| 88 | RTT = T_h2o_ice_liq |
|---|
| 89 | RG = g |
|---|
| 90 | RKAPPA = rcp |
|---|
| 91 | RPI = pi |
|---|
| 92 | RD = r |
|---|
| 93 | |
|---|
| 94 | RETURN |
|---|
| 95 | END SUBROUTINE init_thermcell_mod |
|---|
| 96 | |
|---|
| 97 | END MODULE thermcell_mod |
|---|