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

Last change on this file since 4660 was 4654, checked in by fhourdin, 15 months ago

Replayisation de lscp_mod et vdif_kcay.F90

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