source: LMDZ6/trunk/libf/phylmd/lscp_ini_mod.F90 @ 4545

Last change on this file since 4545 was 4535, checked in by evignon, 14 months ago

poursuite de la replay-isation de lscp en vue de la session
de reecriture de lscp_mod en juin

File size: 8.7 KB
Line 
1module lscp_ini_mod
2
3implicit none
4
5  ! PARAMETERS for lscp:
6  !--------------------
7 
8  REAL RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
9  !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG)
10
11  REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
12  !$OMP THREADPRIVATE(seuil_neb)
13
14  INTEGER, SAVE :: ninter=5                     ! number of iterations to calculate autoconversion to precipitation
15  !$OMP THREADPRIVATE(ninter)
16
17  INTEGER,SAVE :: iflag_evap_prec=1             ! precipitation evaporation flag. 0: nothing, 1: "old way",
18                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
19                                                ! 4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
20  !$OMP THREADPRIVATE(iflag_evap_prec)
21
22  REAL t_coup                                   ! temperature threshold which determines the phase
23  PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
24
25  REAL DDT0                                     ! iteration parameter
26  PARAMETER (DDT0=.01)
27
28  REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
29  PARAMETER (ztfondue=278.15)
30
31  REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
32  !$OMP THREADPRIVATE(rain_int_min)
33
34  REAL, SAVE :: a_tr_sca(4)                     ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
35  !$OMP THREADPRIVATE(a_tr_sca)
36 
37  INTEGER, SAVE ::  iflag_mpc_bl=0              ! flag to activate boundary layer mixed phase cloud param
38  !$OMP THREADPRIVATE(iflag_mpc_bl)
39 
40  LOGICAL, SAVE :: ok_radocond_snow=.false.       ! take into account the mass of ice precip in the cloud ice content seen by radiation
41  !$OMP THREADPRIVATE(ok_radocond_snow)
42
43  LOGICAL, SAVE :: ok_debug_autoconversion=.true.   ! removes a bug in the autoconversion process
44  !$OMP THREADPRIVATE(ok_debug_autoconversion)
45
46  REAL, SAVE :: t_glace_min=258.0                ! lower-bound temperature parameter for cloud phase determination
47  !$OMP THREADPRIVATE(t_glace_min)
48
49  REAL, SAVE :: t_glace_max=273.15               ! upper-bound temperature parameter for cloud phase determination
50  !$OMP THREADPRIVATE(t_glace_max)
51
52  REAL, SAVE :: exposant_glace=1.0               ! parameter for cloud phase determination
53  !$OMP THREADPRIVATE(exposant_glace)
54
55  INTEGER, SAVE :: iflag_vice=0                  ! which expression for ice crystall fall velocity
56  !$OMP THREADPRIVATE(iflag_vice)
57
58  INTEGER, SAVE :: iflag_t_glace=0               ! which expression for cloud phase partitioning
59  !$OMP THREADPRIVATE(iflag_t_glace)
60
61  INTEGER, SAVE :: iflag_cloudth_vert=0          ! option for determining cloud fraction and content in convective boundary layers
62  !$OMP THREADPRIVATE(iflag_cloudth_vert)
63
64  INTEGER, SAVE :: iflag_gammasat=0              ! which threshold for homogeneous nucleation below -40oC
65  !$OMP THREADPRIVATE(iflag_gammasat)
66
67  INTEGER, SAVE :: iflag_rain_incloud_vol=0      ! use of volume cloud fraction for rain autoconversion
68  !$OMP THREADPRIVATE(iflag_rain_incloud_vol)
69
70  INTEGER, SAVE :: iflag_bergeron=0              ! bergeron effect for liquid precipitation treatment 
71  !$OMP THREADPRIVATE(iflag_bergeron)
72
73  INTEGER, SAVE :: iflag_fisrtilp_qsat=0         ! qsat adjustment (iterative) during autoconversion
74  !$OMP THREADPRIVATE(iflag_fisrtilp_qsat)
75
76  INTEGER, SAVE :: iflag_pdf=0                   ! type of subgrid scale qtot pdf
77  !$OMP THREADPRIVATE(iflag_pdf)
78
79  LOGICAL, SAVE :: reevap_ice=.false.            ! no liquid precip for T< threshold
80  !$OMP THREADPRIVATE(reevap_ice)
81
82  REAL, SAVE :: cld_lc_lsc=2.6e-4                ! liquid autoconversion coefficient, stratiform rain
83  !$OMP THREADPRIVATE(cld_lc_lsc)
84
85  REAL, SAVE :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
86  !$OMP THREADPRIVATE(cld_lc_con)
87
88  REAL, SAVE :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
89  !$OMP THREADPRIVATE(cld_tau_lsc)
90
91  REAL, SAVE :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
92  !$OMP THREADPRIVATE(cld_tau_con)
93
94  REAL, SAVE :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
95  !$OMP THREADPRIVATE(ffallv_lsc)
96
97  REAL, SAVE :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
98  !$OMP THREADPRIVATE(ffallv_con)
99
100  REAL, SAVE :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
101  !$OMP THREADPRIVATE(coef_eva)
102
103  REAL, SAVE :: coef_eva_i                       ! tuning coefficient ice precip sublimation
104  !$OMP THREADPRIVATE(coef_eva_i)
105
106
107
108
109CONTAINS
110
111SUBROUTINE lscp_ini(dtime,ok_ice_sursat, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, &
112                    RVTMP2_in, RTT_in,RD_in,RG_in)
113
114
115   USE ioipsl_getin_p_mod, ONLY : getin_p
116   USE print_control_mod, ONLY: prt_level, lunout
117   USE ice_sursat_mod, ONLY: ice_sursat_init
118
119   REAL, INTENT(IN)      :: dtime
120   LOGICAL, INTENT(IN)   :: ok_ice_sursat 
121
122   REAL, INTENT(IN)      :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in
123   REAL, INTENT(IN)      ::  RVTMP2_in, RTT_in, RD_in, RG_in
124
125
126    RG=RG_in
127    RD=RD_in
128    RCPD=RCPD_in
129    RLVTT=RLVTT_in
130    RLSTT=RLSTT_in
131    RLMLT=RLMLT_in
132    RTT=RTT_in
133    RG=RG_in
134    RVTMP2=RVTMP2_in
135
136
137
138    CALL getin_p('ninter',ninter)
139    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
140    CALL getin_p('seuil_neb',seuil_neb)
141    CALL getin_p('rain_int_min',rain_int_min)
142    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
143    CALL getin_p('ok_radocond_snow',ok_radocond_snow)
144    CALL getin_p('ok_debug_autoconversion',ok_debug_autoconversion)   
145    CALL getin_p('t_glace_max',t_glace_max)
146    CALL getin_p('t_glace_min',t_glace_min)
147    CALL getin_p('exposant_glace',exposant_glace)
148    CALL getin_p('iflag_vice',iflag_vice)
149    CALL getin_p('iflag_t_glace',iflag_t_glace)
150    CALL getin_p('iflag_cloudth_vert',iflag_cloudth_vert)
151    CALL getin_p('iflag_gammasat',iflag_gammasat)
152    CALL getin_p('iflag_rain_incloud_vol',iflag_rain_incloud_vol)
153    CALL getin_p('iflag_bergeron',iflag_bergeron)
154    CALL getin_p('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat)
155    CALL getin_p('iflag_pdf',iflag_pdf)
156    CALL getin_p('reevap_ice',reevap_ice)
157    CALL getin_p('cld_lc_lsc',cld_lc_lsc)
158    CALL getin_p('cld_lc_con',cld_lc_con)
159    CALL getin_p('cld_tau_lsc',cld_tau_lsc)
160    CALL getin_p('cld_tau_con',cld_tau_con)
161    CALL getin_p('ffallv_lsc',ffallv_lsc)
162    CALL getin_p('ffallv_lsc',ffallv_con)
163    CALL getin_p('coef_eva',coef_eva)
164    coef_eva_i=coef_eva
165    CALL getin_p('coef_eva_i',coef_eva_i)
166
167
168
169
170    WRITE(lunout,*) 'lscp, ninter:', ninter
171    WRITE(lunout,*) 'lscp, iflag_evap_prec:', iflag_evap_prec
172    WRITE(lunout,*) 'lscp, seuil_neb:', seuil_neb
173    WRITE(lunout,*) 'lscp, rain_int_min:', rain_int_min
174    WRITE(lunout,*) 'lscp, iflag_mpc_bl:', iflag_mpc_bl
175    WRITE(lunout,*) 'lscp, ok_radocond_snow:', ok_radocond_snow
176    WRITE(lunout,*) 'lscp, ok_debug_autoconversion:', ok_debug_autoconversion
177    WRITE(lunout,*) 'lscp, t_glace_max:', t_glace_max
178    WRITE(lunout,*) 'lscp, t_glace_min:', t_glace_min
179    WRITE(lunout,*) 'lscp, exposant_glace:', exposant_glace
180    WRITE(lunout,*) 'lscp, iflag_vice:', iflag_vice
181    WRITE(lunout,*) 'lscp, iflag_t_glace:', iflag_t_glace
182    WRITE(lunout,*) 'lscp, iflag_cloudth_vert:', iflag_cloudth_vert
183    WRITE(lunout,*) 'lscp, iflag_gammasat:', iflag_gammasat
184    WRITE(lunout,*) 'lscp, iflag_rain_incloud_vol:', iflag_rain_incloud_vol
185    WRITE(lunout,*) 'lscp, iflag_bergeron:', iflag_bergeron
186    WRITE(lunout,*) 'lscp, iflag_fisrtilp_qsat:', iflag_fisrtilp_qsat
187    WRITE(lunout,*) 'lscp, iflag_pdf', iflag_pdf
188    WRITE(lunout,*) 'lscp, reevap_ice', reevap_ice
189    WRITE(lunout,*) 'lscp, cld_lc_lsc', cld_lc_lsc
190    WRITE(lunout,*) 'lscp, cld_lc_con', cld_lc_con
191    WRITE(lunout,*) 'lscp, cld_tau_lsc', cld_tau_lsc
192    WRITE(lunout,*) 'lscp, cld_tau_con', cld_tau_con
193    WRITE(lunout,*) 'lscp, ffallv_lsc', ffallv_lsc
194    WRITE(lunout,*) 'lscp, ffallv_con', ffallv_con
195    WRITE(lunout,*) 'lscp, coef_eva', coef_eva
196    WRITE(lunout,*) 'lscp, coef_eva_i', coef_eva_i
197
198
199
200
201
202    ! check for precipitation sub-time steps
203    IF (ABS(dtime/REAL(ninter)-360.0).GT.0.001) THEN
204        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
205        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
206    ENDIF
207
208
209    !AA Temporary initialisation
210    a_tr_sca(1) = -0.5
211    a_tr_sca(2) = -0.5
212    a_tr_sca(3) = -0.5
213    a_tr_sca(4) = -0.5
214   
215    IF (ok_ice_sursat) CALL ice_sursat_init()
216
217
218
219end subroutine lscp_ini
220
221end module lscp_ini_mod
Note: See TracBrowser for help on using the repository browser.