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