source: LMDZ6/trunk/libf/phylmd/lmdz_lscp_ini.F90 @ 4818

Last change on this file since 4818 was 4818, checked in by evignon, 3 months ago

modifications suite à l'atelier nuages du jour
le nouveau schema de precip est full operationnel!
(+ petite commentaire d'un print dans wake)

File size: 15.0 KB
Line 
1MODULE lmdz_lscp_ini
2
3IMPLICIT NONE
4
5  ! PARAMETERS for lscp:
6  !--------------------
7 
8  REAL RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI
9  !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RPI)
10
11  REAL, SAVE, PROTECTED :: seuil_neb=0.001      ! cloud fraction threshold: a cloud really exists when exceeded
12  !$OMP THREADPRIVATE(seuil_neb)
13
14  INTEGER, SAVE :: lunout, prt_level            ! Logical unit number and level for standard output
15  !$OMP THREADPRIVATE(lunout,prt_level)
16
17  INTEGER, SAVE, PROTECTED :: niter_lscp=5      ! number of iterations to calculate autoconversion to precipitation
18  !$OMP THREADPRIVATE(niter_lscp)
19
20  INTEGER, SAVE, PROTECTED :: iflag_evap_prec=1 ! precipitation evaporation flag. 0: nothing, 1: "old way",
21                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
22                                                ! >=4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
23                                                ! pay attention that iflag_evap_prec=4 may lead to unrealistic and overestimated
24                                                ! evaporation. Use 5 instead
25  !$OMP THREADPRIVATE(iflag_evap_prec)
26
27  REAL, SAVE, PROTECTED :: t_coup=234.0         ! temperature threshold which determines the phase
28                                                ! for which the saturation vapor pressure is calculated
29  !$OMP THREADPRIVATE(t_coup)
30  REAL, SAVE, PROTECTED :: DDT0=0.01            ! iteration parameter
31  !$OMP THREADPRIVATE(DDT0)
32
33  REAL, SAVE, PROTECTED :: ztfondue=278.15      ! parameter to calculate melting fraction of precipitation
34  !$OMP THREADPRIVATE(ztfondue)
35
36  REAL, SAVE, PROTECTED :: temp_nowater=233.15  ! temperature below which liquid water no longer exists
37  !$OMP THREADPRIVATE(temp_nowater)
38
39  REAL, SAVE, PROTECTED :: a_tr_sca(4)          ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
40  !$OMP THREADPRIVATE(a_tr_sca)
41 
42  INTEGER, SAVE, PROTECTED ::  iflag_mpc_bl=0   ! flag to activate boundary layer mixed phase cloud param
43  !$OMP THREADPRIVATE(iflag_mpc_bl)
44 
45  LOGICAL, SAVE, PROTECTED :: ok_radocond_snow=.false. ! take into account the mass of ice precip in the cloud ice content seen by radiation
46  !$OMP THREADPRIVATE(ok_radocond_snow)
47
48  REAL, SAVE, PROTECTED :: t_glace_min=258.0    ! lower-bound temperature parameter for cloud phase determination
49  !$OMP THREADPRIVATE(t_glace_min)
50
51  REAL, SAVE, PROTECTED :: t_glace_max=273.15   ! upper-bound temperature parameter for cloud phase determination
52  !$OMP THREADPRIVATE(t_glace_max)
53
54  REAL, SAVE, PROTECTED :: exposant_glace=1.0   ! parameter for cloud phase determination
55  !$OMP THREADPRIVATE(exposant_glace)
56
57  INTEGER, SAVE, PROTECTED :: iflag_vice=0      ! which expression for ice crystall fall velocity
58  !$OMP THREADPRIVATE(iflag_vice)
59
60  INTEGER, SAVE, PROTECTED :: iflag_t_glace=0   ! which expression for cloud phase partitioning
61  !$OMP THREADPRIVATE(iflag_t_glace)
62
63  INTEGER, SAVE, PROTECTED :: iflag_cloudth_vert=0         ! option for determining cloud fraction and content in convective boundary layers
64  !$OMP THREADPRIVATE(iflag_cloudth_vert)
65
66  INTEGER, SAVE, PROTECTED :: iflag_gammasat=0             ! which threshold for homogeneous nucleation below -40oC
67  !$OMP THREADPRIVATE(iflag_gammasat)
68
69  INTEGER, SAVE, PROTECTED :: iflag_rain_incloud_vol=0     ! use of volume cloud fraction for rain autoconversion
70  !$OMP THREADPRIVATE(iflag_rain_incloud_vol)
71
72  INTEGER, SAVE, PROTECTED :: iflag_bergeron=0             ! bergeron effect for liquid precipitation treatment 
73  !$OMP THREADPRIVATE(iflag_bergeron)
74
75  INTEGER, SAVE, PROTECTED :: iflag_fisrtilp_qsat=0        ! qsat adjustment (iterative) during autoconversion
76  !$OMP THREADPRIVATE(iflag_fisrtilp_qsat)
77
78  INTEGER, SAVE, PROTECTED :: iflag_pdf=0                  ! type of subgrid scale qtot pdf
79  !$OMP THREADPRIVATE(iflag_pdf)
80
81  INTEGER, SAVE, PROTECTED :: iflag_autoconversion=0       ! autoconversion option
82  !$OMP THREADPRIVATE(iflag_autoconversion)
83
84  LOGICAL, SAVE, PROTECTED :: reevap_ice=.false.           ! no liquid precip for T< threshold
85  !$OMP THREADPRIVATE(reevap_ice)
86
87  REAL, SAVE, PROTECTED :: cld_lc_lsc=2.6e-4               ! liquid autoconversion coefficient, stratiform rain
88  !$OMP THREADPRIVATE(cld_lc_lsc)
89
90  REAL, SAVE, PROTECTED :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
91  !$OMP THREADPRIVATE(cld_lc_con)
92
93  REAL, SAVE, PROTECTED :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
94  !$OMP THREADPRIVATE(cld_tau_lsc)
95
96  REAL, SAVE, PROTECTED :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
97  !$OMP THREADPRIVATE(cld_tau_con)
98
99  REAL, SAVE, PROTECTED :: cld_expo_lsc=2.                  ! liquid autoconversion threshold exponent, stratiform rain
100  !$OMP THREADPRIVATE(cld_expo_lsc)
101
102  REAL, SAVE, PROTECTED :: cld_expo_con=2.                  ! liquid autoconversion threshold exponent, convective rain
103  !$OMP THREADPRIVATE(cld_expo_con)
104
105  REAL, SAVE, PROTECTED :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
106  !$OMP THREADPRIVATE(ffallv_lsc)
107
108  REAL, SAVE, PROTECTED :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
109  !$OMP THREADPRIVATE(ffallv_con)
110
111  REAL, SAVE, PROTECTED :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
112  !$OMP THREADPRIVATE(coef_eva)
113
114  REAL, SAVE, PROTECTED :: coef_eva_i                       ! tuning coefficient ice precip sublimation
115  !$OMP THREADPRIVATE(coef_eva_i)
116
117  REAL, SAVE, PROTECTED :: expo_eva=0.5                     ! tuning coefficient liquid precip evaporation
118  !$OMP THREADPRIVATE(expo_eva)
119
120  REAL, SAVE, PROTECTED :: expo_eva_i                       ! tuning coefficient ice precip sublimation
121  !$OMP THREADPRIVATE(expo_eva_i)
122
123  REAL, SAVE, PROTECTED :: cice_velo=1.645                  ! factor in the ice fall velocity formulation
124  !$OMP THREADPRIVATE(cice_velo)
125
126  REAL, SAVE, PROTECTED ::  dice_velo=0.16                  ! exponent in the ice fall velocity formulation
127  !$OMP THREADPRIVATE(dice_velo)
128
129  REAL, SAVE, PROTECTED :: dist_liq=300.                    ! typical deph of cloud-top liquid layer in mpcs
130  !$OMP THREADPRIVATE(dist_liq)
131
132  REAL, SAVE, PROTECTED    :: tresh_cl=0.0                  ! cloud fraction threshold for cloud top search
133  !$OMP THREADPRIVATE(tresh_cl)
134
135  !--Parameters for poprecip
136  LOGICAL, SAVE, PROTECTED :: ok_poprecip=.FALSE.           ! use the processes-oriented formulation of precipitations
137  !$OMP THREADPRIVATE(ok_poprecip)
138
139  REAL, SAVE, PROTECTED :: rain_int_min=0.001               ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
140  !$OMP THREADPRIVATE(rain_int_min)
141
142  REAL, SAVE, PROTECTED :: thresh_precip_frac=1.E-6         ! precipitation fraction threshold TODO [-]
143  !$OMP THREADPRIVATE(thresh_precip_frac)
144
145  REAL, SAVE, PROTECTED :: gamma_col=1.                     ! A COMMENTER TODO [-]
146  !$OMP THREADPRIVATE(gamma_col)
147
148  REAL, SAVE, PROTECTED :: gamma_agg=1.                     ! A COMMENTER TODO [-]
149  !$OMP THREADPRIVATE(gamma_agg)
150
151  REAL, SAVE, PROTECTED :: gamma_rim=1.                     ! A COMMENTER TODO [-]
152  !$OMP THREADPRIVATE(gamma_rim)
153
154  REAL, SAVE, PROTECTED :: rho_rain=1000.                    ! A COMMENTER TODO [kg/m3]
155  !$OMP THREADPRIVATE(rho_rain)
156
157  REAL, SAVE, PROTECTED :: rho_snow=500.                   ! A COMMENTER TODO [kg/m3]
158  !$OMP THREADPRIVATE(rho_snow)
159
160  REAL, SAVE, PROTECTED :: r_rain=500.E-6                   ! A COMMENTER TODO [m]
161  !$OMP THREADPRIVATE(r_rain)
162
163  REAL, SAVE, PROTECTED :: r_snow=1.E-3                    ! A COMMENTER TODO [m]
164  !$OMP THREADPRIVATE(r_snow)
165
166  REAL, SAVE, PROTECTED :: tau_auto_snow_min=1800.          ! A COMMENTER TODO [s]
167  !$OMP THREADPRIVATE(tau_auto_snow_min)
168
169  REAL, SAVE, PROTECTED :: tau_auto_snow_max=7200.          ! A COMMENTER TODO [s]
170  !$OMP THREADPRIVATE(tau_auto_snow_max)
171
172  REAL, SAVE, PROTECTED :: eps=1.E-10                       ! A COMMENTER TODO [-]
173  !$OMP THREADPRIVATE(eps)
174
175  REAL, SAVE, PROTECTED :: air_thermal_conduct=2.4e-2      ! A COMMENTER TODO [-]
176  !$OMP THREADPRIVATE(air_thermal_conduct)
177
178  REAL, SAVE, PROTECTED :: coef_ventil=1.                   ! A COMMENTER TODO [-]
179  !$OMP THREADPRIVATE(coef_ventil)
180
181  REAL, SAVE, PROTECTED :: alpha_freez=4.                 ! A COMMENTER TODO [-]
182  !$OMP THREADPRIVATE(alpha_freez)
183
184  REAL, SAVE, PROTECTED :: gamma_freez=0.1               ! A COMMENTER TODO [m-3.s-1]
185  !$OMP THREADPRIVATE(gamma_freez)
186  !--End of the parameters for poprecip
187
188! Two parameters used for lmdz_lscp_old only
189  INTEGER, SAVE, PROTECTED :: iflag_oldbug_fisrtilp=0, fl_cor_ebil
190  !$OMP THREADPRIVATE(iflag_oldbug_fisrtilp,fl_cor_ebil)
191
192CONTAINS
193
194SUBROUTINE lscp_ini(dtime,lunout_in,prt_level_in,ok_ice_sursat, iflag_ratqs, fl_cor_ebil_in, RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in, &
195                    RVTMP2_in, RTT_in,RD_in,RG_in,RPI_in)
196
197
198   USE ioipsl_getin_p_mod, ONLY : getin_p
199   USE ice_sursat_mod, ONLY: ice_sursat_init
200   USE lmdz_cloudth_ini, ONLY : cloudth_ini
201
202   REAL, INTENT(IN)      :: dtime
203   INTEGER, INTENT(IN)   :: lunout_in,prt_level_in,iflag_ratqs,fl_cor_ebil_in
204   LOGICAL, INTENT(IN)   :: ok_ice_sursat
205
206   REAL, INTENT(IN)      :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in
207   REAL, INTENT(IN)      ::  RVTMP2_in, RTT_in, RD_in, RG_in, RPI_in
208   character (len=20) :: modname='lscp_ini_mod'
209   character (len=80) :: abort_message
210
211
212    lunout=lunout_in
213    prt_level=prt_level_in
214    fl_cor_ebil=fl_cor_ebil_in
215
216    RG=RG_in
217    RD=RD_in
218    RCPD=RCPD_in
219    RLVTT=RLVTT_in
220    RLSTT=RLSTT_in
221    RLMLT=RLMLT_in
222    RTT=RTT_in
223    RG=RG_in
224    RVTMP2=RVTMP2_in
225    RPI=RPI_in
226
227
228
229    CALL getin_p('niter_lscp',niter_lscp)
230    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
231    CALL getin_p('seuil_neb',seuil_neb)
232    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
233    CALL getin_p('ok_radocond_snow',ok_radocond_snow)
234    CALL getin_p('t_glace_max',t_glace_max)
235    CALL getin_p('t_glace_min',t_glace_min)
236    CALL getin_p('exposant_glace',exposant_glace)
237    CALL getin_p('iflag_vice',iflag_vice)
238    CALL getin_p('iflag_t_glace',iflag_t_glace)
239    CALL getin_p('iflag_cloudth_vert',iflag_cloudth_vert)
240    CALL getin_p('iflag_gammasat',iflag_gammasat)
241    CALL getin_p('iflag_rain_incloud_vol',iflag_rain_incloud_vol)
242    CALL getin_p('iflag_bergeron',iflag_bergeron)
243    CALL getin_p('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat)
244    CALL getin_p('iflag_pdf',iflag_pdf)
245    CALL getin_p('reevap_ice',reevap_ice)
246    CALL getin_p('cld_lc_lsc',cld_lc_lsc)
247    CALL getin_p('cld_lc_con',cld_lc_con)
248    CALL getin_p('cld_tau_lsc',cld_tau_lsc)
249    CALL getin_p('cld_tau_con',cld_tau_con)
250    CALL getin_p('cld_expo_lsc',cld_expo_lsc)
251    CALL getin_p('cld_expo_con',cld_expo_con)
252    CALL getin_p('ffallv_lsc',ffallv_lsc)
253    CALL getin_p('ffallv_lsc',ffallv_con)
254    CALL getin_p('coef_eva',coef_eva)
255    coef_eva_i=coef_eva
256    CALL getin_p('coef_eva_i',coef_eva_i)
257    CALL getin_p('expo_eva',expo_eva)
258    expo_eva_i=expo_eva
259    CALL getin_p('expo_eva_i',expo_eva_i)
260    CALL getin_p('iflag_autoconversion',iflag_autoconversion)
261    CALL getin_p('dist_liq',dist_liq)
262    CALL getin_p('tresh_cl',tresh_cl)
263    CALL getin_p('iflag_oldbug_fisrtilp',iflag_oldbug_fisrtilp)
264    CALL getin_p('ok_poprecip',ok_poprecip)
265    CALL getin_p('rain_int_min',rain_int_min)
266    CALL getin_p('gamma_agg',gamma_agg)
267    CALL getin_p('gamma_col',gamma_col)
268    CALL getin_p('gamma_rim',gamma_rim)
269
270
271
272    WRITE(lunout,*) 'lscp_ini, niter_lscp:', niter_lscp
273    WRITE(lunout,*) 'lscp_ini, iflag_evap_prec:', iflag_evap_prec
274    WRITE(lunout,*) 'lscp_ini, seuil_neb:', seuil_neb
275    WRITE(lunout,*) 'lscp_ini, iflag_mpc_bl:', iflag_mpc_bl
276    WRITE(lunout,*) 'lscp_ini, ok_radocond_snow:', ok_radocond_snow
277    WRITE(lunout,*) 'lscp_ini, t_glace_max:', t_glace_max
278    WRITE(lunout,*) 'lscp_ini, t_glace_min:', t_glace_min
279    WRITE(lunout,*) 'lscp_ini, exposant_glace:', exposant_glace
280    WRITE(lunout,*) 'lscp_ini, iflag_vice:', iflag_vice
281    WRITE(lunout,*) 'lscp_ini, iflag_t_glace:', iflag_t_glace
282    WRITE(lunout,*) 'lscp_ini, iflag_cloudth_vert:', iflag_cloudth_vert
283    WRITE(lunout,*) 'lscp_ini, iflag_gammasat:', iflag_gammasat
284    WRITE(lunout,*) 'lscp_ini, iflag_rain_incloud_vol:', iflag_rain_incloud_vol
285    WRITE(lunout,*) 'lscp_ini, iflag_bergeron:', iflag_bergeron
286    WRITE(lunout,*) 'lscp_ini, iflag_fisrtilp_qsat:', iflag_fisrtilp_qsat
287    WRITE(lunout,*) 'lscp_ini, iflag_pdf', iflag_pdf
288    WRITE(lunout,*) 'lscp_ini, reevap_ice', reevap_ice
289    WRITE(lunout,*) 'lscp_ini, cld_lc_lsc', cld_lc_lsc
290    WRITE(lunout,*) 'lscp_ini, cld_lc_con', cld_lc_con
291    WRITE(lunout,*) 'lscp_ini, cld_tau_lsc', cld_tau_lsc
292    WRITE(lunout,*) 'lscp_ini, cld_tau_con', cld_tau_con
293    WRITE(lunout,*) 'lscp_ini, cld_expo_lsc', cld_expo_lsc
294    WRITE(lunout,*) 'lscp_ini, cld_expo_con', cld_expo_con
295    WRITE(lunout,*) 'lscp_ini, ffallv_lsc', ffallv_lsc
296    WRITE(lunout,*) 'lscp_ini, ffallv_con', ffallv_con
297    WRITE(lunout,*) 'lscp_ini, coef_eva', coef_eva
298    WRITE(lunout,*) 'lscp_ini, coef_eva_i', coef_eva_i
299    WRITE(lunout,*) 'lscp_ini, expo_eva', expo_eva
300    WRITE(lunout,*) 'lscp_ini, expo_eva_i', expo_eva_i
301    WRITE(lunout,*) 'lscp_ini, iflag_autoconversion', iflag_autoconversion
302    WRITE(lunout,*) 'lscp_ini, dist_liq', dist_liq
303    WRITE(lunout,*) 'lscp_ini, tresh_cl', tresh_cl
304    WRITE(lunout,*) 'lscp_ini, iflag_oldbug_fisrtilp', iflag_oldbug_fisrtilp
305    WRITE(lunout,*) 'lscp_ini, fl_cor_ebil', fl_cor_ebil
306    WRITE(lunout,*) 'lscp_ini, ok_poprecip', ok_poprecip
307    WRITE(lunout,*) 'lscp_ini, rain_int_min:', rain_int_min
308    WRITE(lunout,*) 'lscp_ini, gamma_agg:', gamma_agg
309    WRITE(lunout,*) 'lscp_ini, gamma_col:', gamma_col
310    WRITE(lunout,*) 'lscp_ini, gamma_rim:', gamma_rim
311
312
313
314
315
316    ! check for precipitation sub-time steps
317    IF (ABS(dtime/REAL(niter_lscp)-360.0).GT.0.001) THEN
318        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
319        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
320    ENDIF
321
322    ! check consistency between numerical resolution of autoconversion
323    ! and other options
324   
325    IF (iflag_autoconversion .EQ. 2) THEN
326        IF ((iflag_vice .NE. 0) .OR. (niter_lscp .GT. 1)) THEN
327           abort_message = 'in lscp, iflag_autoconversion=2 requires iflag_vice=0 and niter_lscp=1'
328           CALL abort_physic (modname,abort_message,1)
329        ENDIF
330    ENDIF
331
332
333    ! check consistency between the use of the processes-oriented precipitation formulations
334    ! and other options
335   
336    IF (ok_poprecip) THEN
337        IF ((iflag_evap_prec .LT. 4) .OR. (niter_lscp .GT. 1)) THEN
338           abort_message = 'in lscp, ok_poprecip=y requires iflag_evap_prec >= 4 and niter_lscp=1'
339           CALL abort_physic (modname,abort_message,1)
340        ENDIF
341    ENDIF
342
343
344    !AA Temporary initialisation
345    a_tr_sca(1) = -0.5
346    a_tr_sca(2) = -0.5
347    a_tr_sca(3) = -0.5
348    a_tr_sca(4) = -0.5
349   
350    IF (ok_ice_sursat) CALL ice_sursat_init()
351
352    CALL cloudth_ini(iflag_cloudth_vert,iflag_ratqs)
353
354RETURN
355
356END SUBROUTINE lscp_ini
357
358END MODULE lmdz_lscp_ini
Note: See TracBrowser for help on using the repository browser.