source: LMDZ6/branches/LMDZ_ECRad/libf/phylmd/lmdz_lscp_ini.F90 @ 5450

Last change on this file since 5450 was 4727, checked in by idelkadi, 15 months ago

Merged trunk changes -r4488:4726 LMDZ_ECRad branch

File size: 11.5 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
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 :: lunout, prt_level            ! Logical unit number and level for standard output
15  !$OMP THREADPRIVATE(lunout,prt_level)
16
17  INTEGER, SAVE :: niter_lscp=5                 ! number of iterations to calculate autoconversion to precipitation
18  !$OMP THREADPRIVATE(niter_lscp)
19
20  INTEGER,SAVE :: 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 t_coup                                   ! temperature threshold which determines the phase
28  PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
29
30  REAL DDT0                                     ! iteration parameter
31  PARAMETER (DDT0=.01)
32
33  REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
34  PARAMETER (ztfondue=278.15)
35
36  REAL temp_nowater                             ! temperature below which liquid water no longer exists
37  PARAMETER (temp_nowater=233.15)
38
39  REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
40  !$OMP THREADPRIVATE(rain_int_min)
41
42  REAL, SAVE :: a_tr_sca(4)                     ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
43  !$OMP THREADPRIVATE(a_tr_sca)
44 
45  INTEGER, SAVE ::  iflag_mpc_bl=0              ! flag to activate boundary layer mixed phase cloud param
46  !$OMP THREADPRIVATE(iflag_mpc_bl)
47 
48  LOGICAL, SAVE :: ok_radocond_snow=.false.       ! take into account the mass of ice precip in the cloud ice content seen by radiation
49  !$OMP THREADPRIVATE(ok_radocond_snow)
50
51  REAL, SAVE :: t_glace_min=258.0                ! lower-bound temperature parameter for cloud phase determination
52  !$OMP THREADPRIVATE(t_glace_min)
53
54  REAL, SAVE :: t_glace_max=273.15               ! upper-bound temperature parameter for cloud phase determination
55  !$OMP THREADPRIVATE(t_glace_max)
56
57  REAL, SAVE :: exposant_glace=1.0               ! parameter for cloud phase determination
58  !$OMP THREADPRIVATE(exposant_glace)
59
60  INTEGER, SAVE :: iflag_vice=0                  ! which expression for ice crystall fall velocity
61  !$OMP THREADPRIVATE(iflag_vice)
62
63  INTEGER, SAVE :: iflag_t_glace=0               ! which expression for cloud phase partitioning
64  !$OMP THREADPRIVATE(iflag_t_glace)
65
66  INTEGER, SAVE :: iflag_cloudth_vert=0          ! option for determining cloud fraction and content in convective boundary layers
67  !$OMP THREADPRIVATE(iflag_cloudth_vert)
68
69  INTEGER, SAVE :: iflag_gammasat=0              ! which threshold for homogeneous nucleation below -40oC
70  !$OMP THREADPRIVATE(iflag_gammasat)
71
72  INTEGER, SAVE :: iflag_rain_incloud_vol=0      ! use of volume cloud fraction for rain autoconversion
73  !$OMP THREADPRIVATE(iflag_rain_incloud_vol)
74
75  INTEGER, SAVE :: iflag_bergeron=0              ! bergeron effect for liquid precipitation treatment 
76  !$OMP THREADPRIVATE(iflag_bergeron)
77
78  INTEGER, SAVE :: iflag_fisrtilp_qsat=0         ! qsat adjustment (iterative) during autoconversion
79  !$OMP THREADPRIVATE(iflag_fisrtilp_qsat)
80
81  INTEGER, SAVE :: iflag_pdf=0                   ! type of subgrid scale qtot pdf
82  !$OMP THREADPRIVATE(iflag_pdf)
83
84  INTEGER, SAVE :: iflag_autoconversion=0        ! autoconversion option
85  !$OMP THREADPRIVATE(iflag_autoconversion)
86
87  LOGICAL, SAVE :: reevap_ice=.false.            ! no liquid precip for T< threshold
88  !$OMP THREADPRIVATE(reevap_ice)
89
90  REAL, SAVE :: cld_lc_lsc=2.6e-4                ! liquid autoconversion coefficient, stratiform rain
91  !$OMP THREADPRIVATE(cld_lc_lsc)
92
93  REAL, SAVE :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
94  !$OMP THREADPRIVATE(cld_lc_con)
95
96  REAL, SAVE :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
97  !$OMP THREADPRIVATE(cld_tau_lsc)
98
99  REAL, SAVE :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
100  !$OMP THREADPRIVATE(cld_tau_con)
101
102  REAL, SAVE :: cld_expo_lsc=2.                  ! liquid autoconversion threshold exponent, stratiform rain
103  !$OMP THREADPRIVATE(cld_expo_lsc)
104
105  REAL, SAVE :: cld_expo_con=2.                  ! liquid autoconversion threshold exponent, convective rain
106  !$OMP THREADPRIVATE(cld_expo_con)
107
108  REAL, SAVE :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
109  !$OMP THREADPRIVATE(ffallv_lsc)
110
111  REAL, SAVE :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
112  !$OMP THREADPRIVATE(ffallv_con)
113
114  REAL, SAVE :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
115  !$OMP THREADPRIVATE(coef_eva)
116
117  REAL, SAVE :: coef_eva_i                       ! tuning coefficient ice precip sublimation
118  !$OMP THREADPRIVATE(coef_eva_i)
119
120  REAL cice_velo                                 ! factor in the ice fall velocity formulation
121  PARAMETER (cice_velo=1.645)
122
123  REAL dice_velo                                 ! exponent in the ice fall velocity formulation
124  PARAMETER (dice_velo=0.16)
125
126  REAL, SAVE :: dist_liq=300.                    ! typical deph of cloud-top liquid layer in mpcs
127  !$OMP THREADPRIVATE(dist_liq)
128
129  REAL, SAVE    :: tresh_cl=0.0                  ! cloud fraction threshold for cloud top search
130  !$OMP THREADPRIVATE(tresh_cl)
131
132! Two parameters used for lmdz_lscp_old only
133  INTEGER, SAVE :: iflag_oldbug_fisrtilp=0, fl_cor_ebil
134  !$OMP THREADPRIVATE(iflag_oldbug_fisrtilp,fl_cor_ebil)
135
136CONTAINS
137
138SUBROUTINE 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, &
139                    RVTMP2_in, RTT_in,RD_in,RG_in)
140
141
142   USE ioipsl_getin_p_mod, ONLY : getin_p
143   USE ice_sursat_mod, ONLY: ice_sursat_init
144   USE lmdz_cloudth_ini, ONLY : cloudth_ini
145
146   REAL, INTENT(IN)      :: dtime
147   INTEGER, INTENT(IN)   :: lunout_in,prt_level_in,iflag_ratqs,fl_cor_ebil_in
148   LOGICAL, INTENT(IN)   :: ok_ice_sursat
149
150   REAL, INTENT(IN)      :: RCPD_in, RLSTT_in, RLVTT_in, RLMLT_in
151   REAL, INTENT(IN)      ::  RVTMP2_in, RTT_in, RD_in, RG_in
152   character (len=20) :: modname='lscp_ini_mod'
153   character (len=80) :: abort_message
154
155
156    lunout=lunout_in
157    prt_level=prt_level_in
158    fl_cor_ebil=fl_cor_ebil_in
159
160    RG=RG_in
161    RD=RD_in
162    RCPD=RCPD_in
163    RLVTT=RLVTT_in
164    RLSTT=RLSTT_in
165    RLMLT=RLMLT_in
166    RTT=RTT_in
167    RG=RG_in
168    RVTMP2=RVTMP2_in
169
170
171
172    CALL getin_p('niter_lscp',niter_lscp)
173    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
174    CALL getin_p('seuil_neb',seuil_neb)
175    CALL getin_p('rain_int_min',rain_int_min)
176    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
177    CALL getin_p('ok_radocond_snow',ok_radocond_snow)
178    CALL getin_p('t_glace_max',t_glace_max)
179    CALL getin_p('t_glace_min',t_glace_min)
180    CALL getin_p('exposant_glace',exposant_glace)
181    CALL getin_p('iflag_vice',iflag_vice)
182    CALL getin_p('iflag_t_glace',iflag_t_glace)
183    CALL getin_p('iflag_cloudth_vert',iflag_cloudth_vert)
184    CALL getin_p('iflag_gammasat',iflag_gammasat)
185    CALL getin_p('iflag_rain_incloud_vol',iflag_rain_incloud_vol)
186    CALL getin_p('iflag_bergeron',iflag_bergeron)
187    CALL getin_p('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat)
188    CALL getin_p('iflag_pdf',iflag_pdf)
189    CALL getin_p('reevap_ice',reevap_ice)
190    CALL getin_p('cld_lc_lsc',cld_lc_lsc)
191    CALL getin_p('cld_lc_con',cld_lc_con)
192    CALL getin_p('cld_tau_lsc',cld_tau_lsc)
193    CALL getin_p('cld_tau_con',cld_tau_con)
194    CALL getin_p('cld_expo_lsc',cld_expo_lsc)
195    CALL getin_p('cld_expo_con',cld_expo_con)
196    CALL getin_p('ffallv_lsc',ffallv_lsc)
197    CALL getin_p('ffallv_lsc',ffallv_con)
198    CALL getin_p('coef_eva',coef_eva)
199    coef_eva_i=coef_eva
200    CALL getin_p('coef_eva_i',coef_eva_i)
201    CALL getin_p('iflag_autoconversion',iflag_autoconversion)
202    CALL getin_p('dist_liq',dist_liq)
203    CALL getin_p('tresh_cl',tresh_cl)
204    CALL getin_p('iflag_oldbug_fisrtilp',iflag_oldbug_fisrtilp)
205
206
207
208
209    WRITE(lunout,*) 'lscp_ini, niter_lscp:', niter_lscp
210    WRITE(lunout,*) 'lscp_ini, iflag_evap_prec:', iflag_evap_prec
211    WRITE(lunout,*) 'lscp_ini, seuil_neb:', seuil_neb
212    WRITE(lunout,*) 'lscp_ini, rain_int_min:', rain_int_min
213    WRITE(lunout,*) 'lscp_ini, iflag_mpc_bl:', iflag_mpc_bl
214    WRITE(lunout,*) 'lscp_ini, ok_radocond_snow:', ok_radocond_snow
215    WRITE(lunout,*) 'lscp_ini, t_glace_max:', t_glace_max
216    WRITE(lunout,*) 'lscp_ini, t_glace_min:', t_glace_min
217    WRITE(lunout,*) 'lscp_ini, exposant_glace:', exposant_glace
218    WRITE(lunout,*) 'lscp_ini, iflag_vice:', iflag_vice
219    WRITE(lunout,*) 'lscp_ini, iflag_t_glace:', iflag_t_glace
220    WRITE(lunout,*) 'lscp_ini, iflag_cloudth_vert:', iflag_cloudth_vert
221    WRITE(lunout,*) 'lscp_ini, iflag_gammasat:', iflag_gammasat
222    WRITE(lunout,*) 'lscp_ini, iflag_rain_incloud_vol:', iflag_rain_incloud_vol
223    WRITE(lunout,*) 'lscp_ini, iflag_bergeron:', iflag_bergeron
224    WRITE(lunout,*) 'lscp_ini, iflag_fisrtilp_qsat:', iflag_fisrtilp_qsat
225    WRITE(lunout,*) 'lscp_ini, iflag_pdf', iflag_pdf
226    WRITE(lunout,*) 'lscp_ini, reevap_ice', reevap_ice
227    WRITE(lunout,*) 'lscp_ini, cld_lc_lsc', cld_lc_lsc
228    WRITE(lunout,*) 'lscp_ini, cld_lc_con', cld_lc_con
229    WRITE(lunout,*) 'lscp_ini, cld_tau_lsc', cld_tau_lsc
230    WRITE(lunout,*) 'lscp_ini, cld_tau_con', cld_tau_con
231    WRITE(lunout,*) 'lscp_ini, cld_expo_lsc', cld_expo_lsc
232    WRITE(lunout,*) 'lscp_ini, cld_expo_con', cld_expo_con
233    WRITE(lunout,*) 'lscp_ini, ffallv_lsc', ffallv_lsc
234    WRITE(lunout,*) 'lscp_ini, ffallv_con', ffallv_con
235    WRITE(lunout,*) 'lscp_ini, coef_eva', coef_eva
236    WRITE(lunout,*) 'lscp_ini, coef_eva_i', coef_eva_i
237    WRITE(lunout,*) 'lscp_ini, iflag_autoconversion', iflag_autoconversion
238    WRITE(lunout,*) 'lscp_ini, dist_liq', dist_liq
239    WRITE(lunout,*) 'lscp_ini, tresh_cl', tresh_cl
240    WRITE(lunout,*) 'lscp_ini, iflag_oldbug_fisrtilp', iflag_oldbug_fisrtilp
241    WRITE(lunout,*) 'lscp_ini, fl_cor_ebil', fl_cor_ebil
242
243
244
245
246
247    ! check for precipitation sub-time steps
248    IF (ABS(dtime/REAL(niter_lscp)-360.0).GT.0.001) THEN
249        WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
250        WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
251    ENDIF
252
253    ! check consistency between numerical resolution of autoconversion
254    ! and other options
255   
256    IF (iflag_autoconversion .EQ. 2) THEN
257        IF ((iflag_vice .NE. 0) .OR. (niter_lscp .GT. 1)) THEN
258           abort_message = 'in lscp, iflag_autoconversion=2 requires iflag_vice=0 and niter_lscp=1'
259           CALL abort_physic (modname,abort_message,1)
260        ENDIF
261    ENDIF
262
263
264    !AA Temporary initialisation
265    a_tr_sca(1) = -0.5
266    a_tr_sca(2) = -0.5
267    a_tr_sca(3) = -0.5
268    a_tr_sca(4) = -0.5
269   
270    IF (ok_ice_sursat) CALL ice_sursat_init()
271
272    CALL cloudth_ini(iflag_cloudth_vert,iflag_ratqs)
273
274RETURN
275
276END SUBROUTINE lscp_ini
277
278END MODULE lmdz_lscp_ini
Note: See TracBrowser for help on using the repository browser.