source: trunk/LMDZ.GENERIC/libf/phystd/thermcell_mod.F90 @ 2066

Last change on this file since 2066 was 2066, checked in by aboissinot, 6 years ago

Fix f0 saving
Restore d_temp functionality. d_temp is set in thermcell_mod and used in thermcell_alim.
d_temp is a virtual potential temperature offset applied only in layer linf.
Remove a potential division by zero in thermcell_plume with variable zw2m.

File size: 3.7 KB
Line 
1MODULE thermcell_mod
2
3IMPLICIT NONE
4
5
6! Flags for computations
7                                                            !     default
8INTEGER,PARAMETER :: iflag_thermals_optflux     = 0         !     0
9INTEGER,PARAMETER :: iflag_thermals_closure     = 2         !     2
10INTEGER,PARAMETER :: iflag_thermals_alim        = 0         !     0
11INTEGER,PARAMETER :: iflag_thermals             = 18        !     18
12
13! Flags for diagnoses
14
15LOGICAL,PARAMETER :: sorties                    = .false.   !     false
16INTEGER,PARAMETER :: iflag_trig_bl              = 1         !     1
17INTEGER,PARAMETER :: iflag_clos_bl              = 1         !     1
18INTEGER,PARAMETER :: iflag_coupl                = 5         !     5
19
20! Physical parameters
21
22REAL,PARAMETER :: fact_thermals_ed_dz           = 0.007     !     0.007
23REAL,PARAMETER :: r_aspect_thermals             = 2.0       !     
24REAL,PARAMETER :: tau_thermals                  = 0.        !     0.
25REAL,PARAMETER :: betalpha                      = 0.9       !     0.9
26REAL,PARAMETER :: afact                         = 2./3.     !     2./3.
27REAL,PARAMETER :: fact_epsilon                  = 0.000     !     0.002
28REAL,PARAMETER :: detr_q_power                  = 0.5       !     0.5
29REAL,PARAMETER :: detr_q_coef                   = 0.012     !     0.012
30REAL,PARAMETER :: mix0                          = 0.        !     0.
31REAL,PARAMETER :: detr_min                      = 1.d-5     !     1.e-5
32REAL,PARAMETER :: entr_min                      = 1.d-5     !     1.e-5
33REAL,PARAMETER :: alphamax                      = 0.7       !     
34REAL,PARAMETER :: fomass_max                    = 0.5       !     
35REAL,PARAMETER :: fact_shell                    = 1.        !     1.
36REAL,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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47INTEGER,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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53REAL,PARAMETER :: d_temp                        = 10.       !     0.
54
55! Parameters for diagnoses
56
57REAL,PARAMETER :: alp_bl_k                      = 0.5       !     0.5
58
59! Physical constants
60
61REAL,SAVE :: RTT
62REAL,SAVE :: RG
63REAL,SAVE :: RKAPPA
64REAL,SAVE :: RPI
65REAL,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!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73INTEGER,PARAMETER :: nbsrf                      = 1
74
75
76CONTAINS
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
98END MODULE thermcell_mod
Note: See TracBrowser for help on using the repository browser.