PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_ini_rain_ice.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1995-2025 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! ######spl
8IMPLICIT NONE
9CONTAINS
10 SUBROUTINE ini_rain_ice (D, HPROGRAM, KLUOUT, PTSTEP, PDZMIN, KSPLITR, HCLOUD, ICE_T_PARAMETERS )
11! ###########################################################
12!
13!!**** *INI_RAIN_ICE * - initialize the constants necessary for the warm and
14!! cold microphysical schemes.
15!!
16!! PURPOSE
17!! -------
18!! The purpose of this routine is to initialize the constants used to
19!! resolve the mixed phase microphysical scheme. The collection kernels of
20!! the precipitating particles are recomputed if necessary if some parameters
21!! defining the ice categories have been modified. The number of small
22!! time steps leading to stable scheme for the rain, ice, snow and ggraupeln
23!! sedimentation is also computed (time-splitting technique).
24!!
25!!** METHOD
26!! ------
27!! The constants are initialized to their numerical values and the number
28!! of small time step is computed by dividing the 2* Deltat time interval of
29!! the Leap-frog scheme so that the stability criterion for the rain
30!! sedimentation is fulfilled for a Raindrop maximal fall velocity equal
31!! VTRMAX. The parameters defining the collection kernels are read and are
32!! checked against the new ones. If any change occurs, these kernels are
33!! recomputed and their numerical values are written in the output listing.
34!!
35!! EXTERNAL
36!! --------
37!! GAMMA : gamma function
38!!
39!!
40!! IMPLICIT ARGUMENTS
41!! ------------------
42!! Module MODD_CST
43!! XPI !
44!! XRD ! Gaz constant for dry air
45!! XRV
46!! XRHOLW ! Liquid water density
47!! XALPW
48!! XBETAW
49!! XGAMW
50!! XG
51!! Module MODD_REF
52!! XTHVREFZ ! Reference virtual pot.temp. without orography
53!! Module MODD_RAIN_ICE_DESCR
54!! Module MODD_RAIN_ICE_PARAM
55!!
56!! REFERENCE
57!! ---------
58!! Book2 of documentation ( routine INI_RAIN_ICE )
59!!
60!! AUTHOR
61!! ------
62!! J.-P. Pinty * Laboratoire d'Aerologie*
63!!
64!! MODIFICATIONS
65!! -------------
66!! Original 04/12/95
67!! J.-P. Pinty 05/04/96 Add automatic control and regeneration of the
68!! collection kernels
69!! J.-P. Pinty 10/05/96 Correction of ZRATE and computations of RIM
70!! J.-P. Pinty 24/11/97 Sedimentation of ice made for Columns and bug for XAG
71!! J.-P. Lafore 23/11/98 Back to Lin et al. 83 formulation for RIAUTS
72!! with a Critical ice content set to .5 g/Kg
73!! N. Asencio 13/08/98 parallel code: PDZMIN is computed outside in ini_modeln
74!! J.-P. Lafore 12/8/98 In case of nesting microphysics constants of
75!! MODD_RAIN_ICE_PARAM are computed only once.
76!! Only KSPLTR is computed for each model.
77!! J. Stein 20/04/99 remove 2 unused local variables
78!! G Molinie 21/05/99 Bug in XEXRCFRI and XRCFRI
79!! J.-P. Pinty 24/06/00 Bug in RCRIMS
80!! J.-P. Pinty 24/12/00 Update hail case
81!! J.-P. Chaboureau & J.-P. Pinty
82!! 24/03/01 Update XCRIAUTI for cirrus cases
83!! J.-P. Pinty 24/11/01 Update ICE3/ICE4 options
84!! S. Riette 2016-11: new ICE3/ICE4 options
85!! P. Wautelet 22/01/2019 bug correction: incorrect write
86!! P. Wautelet 26/04/2019: replace non-standard FLOAT function by REAL function
87!! S. Riette 2022-03: use of RAIN_ICE_PARAM structure for some variables
88!! to reproduce results on belenos. The reason why
89!! those variables must have a specifi treatment was
90!! not understood
91!! J. Wurtz 03/2022: New snow characteristics with LSNOW_T
92!! B.J.K. Engdahl 03/2023: ICE-T
93!
94!-------------------------------------------------------------------------------
95!
96!* 0. DECLARATIONS
97! ------------
98!
99USE modd_cst, ONLY: xalpw, xbetaw, xg, xgamw, xp00, xpi, xrd, xrholw, xrv
105 xbh, xbi, xbr, xbs, xc1g, xc1h, xc1i, xc1r, xc1s, xcc, xccg, xcch, &
107 xcr, xcs, xcxg, xcxh, xcxs, xc_i, xdc, xdg, xdh, xdi, xdr, xds, xf0g, &
114 nkpk, nkmk, &
126 xgac, xgc, xgac2, xgc2, &
135USE modd_precision, ONLY: mnhreal64
136!
137USE modi_gamma_inc, ONLY: gamma_inc
138USE mode_rrcolss, ONLY: rrcolss
139USE mode_rzcolx, ONLY: rzcolx
140USE mode_rscolrg, ONLY: rscolrg
147!
154USE modd_icet_param, ONLY: nbc, nbr, nbs
155
156USE modd_dimphyex, ONLY: dimphyex_t
157
158USE yomhook , ONLY : lhook, dr_hook, jphook
159
160IMPLICIT NONE
161!
162!* 0.1 Declarations of dummy arguments :
163!
164!
165TYPE(dimphyex_t), INTENT(IN) :: D ! Dimensions of the physical domain
166CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! Current program
167INTEGER, INTENT(IN) :: KLUOUT ! Logical unit number for prints
168INTEGER, INTENT(OUT) :: KSPLITR ! Number of small time step
169 ! integration for rain
170 ! sedimendation
171!
172REAL, INTENT(IN) :: PTSTEP ! Effective Time step
173!
174REAL, INTENT(IN) :: PDZMIN ! minimun vertical mesh size
175!
176CHARACTER(LEN=4), INTENT(IN) :: HCLOUD ! Indicator of the cloud scheme
177!
178TYPE(icet_param_t), INTENT(INOUT) :: ICE_T_PARAMETERS
179!
180!
181!* 0.2 Declarations of local variables :
182!
183INTEGER :: J1,J2 ! Internal loop indexes
184REAL :: ZT ! Work variable
185REAL :: ZVTRMAX ! Raindrop maximal fall velocity
186REAL :: ZRHO00 ! Surface reference air density
187REAL :: ZRHO00_SNOW
188REAL :: ZE, ZRV ! Work array for ZRHO00 computation
189REAL :: ZRATE ! Geometrical growth of Lbda in the tabulated
190 ! functions and kernels
191REAL :: ZBOUND ! XDCSLIM*Lbda_s: upper bound for the partial
192 ! integration of the riming rate of the aggregates
193REAL :: ZEGS, ZEGR, ZEHS, & ! Bulk collection efficiencies
194 & ZEHG, ZEHR
195!
196INTEGER :: IND ! Number of interval to integrate the kernels
197REAL :: ZESR ! Mean efficiency of rain-aggregate collection
198REAL :: ZFDINFTY ! Factor used to define the "infinite" diameter
199!
200!
201!
202!
203LOGICAL :: GFLAG ! Logical flag for printing the constatnts on the output
204 ! listing
205REAL :: ZCONC_MAX ! Maximal concentration for snow
206REAL :: ZGAMC,ZGAMC2 ! parameters
207 ! involving various moments of the generalized gamma law
208REAL :: ZFACT_NUCL! Amplification factor for the minimal ice concentration
209REAL :: ZXR ! Value of x_r in N_r = C_r lambda_r ** x_r
210!
211INTEGER :: KND
212INTEGER :: KACCLBDAS,KACCLBDAR,KDRYLBDAG,KDRYLBDAS,KDRYLBDAR
213INTEGER :: KWETLBDAS,KWETLBDAG,KWETLBDAR,KWETLBDAH
214REAL :: PALPHAR,PALPHAS,PALPHAG,PALPHAH
215REAL :: PNUR,PNUS,PNUG,PNUH
216REAL :: PBR,PBS,PBG
217REAL :: PCR,PCS,PCG,PCH
218REAL :: PDR,PDS,PFVELOS,PDG,PDH
219REAL :: PESR,PEGS,PEGR,PEHS,PEHG,PEHR
220REAL :: PFDINFTY
221REAL :: PACCLBDAS_MAX,PACCLBDAR_MAX,PACCLBDAS_MIN,PACCLBDAR_MIN
222REAL :: PDRYLBDAG_MAX,PDRYLBDAS_MAX,PDRYLBDAG_MIN,PDRYLBDAS_MIN
223REAL :: PDRYLBDAR_MAX,PDRYLBDAR_MIN
224REAL :: PWETLBDAS_MAX,PWETLBDAG_MAX,PWETLBDAS_MIN,PWETLBDAG_MIN
225REAL :: PWETLBDAR_MAX,PWETLBDAH_MAX,PWETLBDAR_MIN,PWETLBDAH_MIN
226!
227LOGICAL :: LUPDATE_SNOW
228REAL(KIND=jphook) :: zhook_handle
229!-------------------------------------------------------------------------------
230IF (lhook) CALL dr_hook('INI_RAIN_ICE',0,zhook_handle)
231!
232!
233!
234!
235!* 0. FUNCTION STATEMENTS
236! -------------------
237!
238!
239!* 0.1 p_moment of the Generalized GAMMA function
240!
241!
242!
243! 1.0.1 Constants for possible modifying some processes related to
244! graupeln in XFRMIN(1:8), IN - concentration in XFRMIN(9) and Kogan
245! autoconversion in XFRMIN(10:11). May be used for e.g. ensemble spread
247lupdate_snow=xfrmin(16) > 0.
248!
249! 1.0.2 Processes can be written two different ways: the OLD one only compatible
250! with the LSNOW_T=F, and the NEW one compatible with both LSNOW_T values.
251! Code rain_ice_old (LREF=F) in Meso-NH is written using the NEW way, except sedimentation
252! Code rain_ice_old (LRED=F) for other models is written using the OLD way
253! Code rain_ice (LRED=T) contains both formulation but the one used must be
254! in accordance with the computation of some coefficients done here.
255! The LNEWCOEFF controls this behaviour.
256IF(.NOT. lred) THEN
257 ! This cannot be done any other way
258 lnewcoeff=hprogram=='MESONH'
259ELSE
260 ! LSNOW_T=T only available with NEW formulation
261 ! Use conservative choice reproducing old behaviour when LSNOW_T=F
262 lnewcoeff=lsnow_t .OR. hprogram=='MESONH'
263ENDIF
264!
265! 1. COMPUTE KSPLTR FOR EACH MODEL, AND NKPK, NKMK
266! ---------------------------------------------------------
267!
268!* 1.1 Set the hailstones maximum fall velocity
269!
270IF (csedim == 'SPLI' .AND. .NOT. lred) THEN
271 IF (hcloud == 'ICE4' .OR. hcloud=='LIMA') THEN
272 zvtrmax = 40.
273 ELSE IF (hcloud == 'ICE3') THEN
274 zvtrmax = 10.
275 END IF
276END IF
277!
278!* 1.2 Compute the number of small time step integration
279!
280ksplitr = 1
281IF (csedim == 'SPLI' .AND. .NOT. lred) THEN
282 split : DO
283 zt = ptstep / real(ksplitr)
284 IF ( zt * zvtrmax / pdzmin .LT. 1.) EXIT split
285 ksplitr = ksplitr + 1
286 END DO split
287END IF
288!
289IF (hcloud == 'ICE4' .OR. hcloud=='LIMA') THEN
291ELSE IF (hcloud == 'ICE3') THEN
293END IF
294!
295xrtmin(1) = 1.0e-20
296xrtmin(2) = 1.0e-20
297xrtmin(3) = 1.0e-20
298xrtmin(4) = 1.0e-20
299xrtmin(5) = 1.0e-15
300xrtmin(6) = 1.0e-15
301IF (hcloud == 'ICE4' .OR. hcloud=='LIMA') xrtmin(7) = 1.0e-15
302!$acc enter data copyin(XRTMIN)
303
304IF (lice_t) THEN
305 CALL ice_t_parameters%ALLOC()
306ENDIF
307!
308!* 1.3 Vertical index arrays used in condensation
309!
310!Precompute the JK+IKL and JK-IKL indices (clamped to [NKTB,NKTE]) used in the
311!condensation routine, so that they are not recomputed at each time step.
312!The arrays are only meaningful for JK in [NKTB,NKTE], other values are set
313!for completeness.
314!
315IF( .NOT.ASSOCIATED(nkpk) ) THEN
316 CALL rain_ice_param_allocate('NKPK', d%NKT)
317END IF
318IF( .NOT.ASSOCIATED(nkmk) ) THEN
319 CALL rain_ice_param_allocate('NKMK', d%NKT)
320END IF
321DO j1=1, d%NKT
322 nkpk(j1) = max(min(j1+d%NKL, d%NKTE), d%NKTB)
323 nkmk(j1) = max(min(j1-d%NKL, d%NKTE), d%NKTB)
324END DO
325!
326!-------------------------------------------------------------------------------
327!
328!* 2. CHARACTERISTICS OF THE SPECIES
329! ------------------------------
330!
331!
332!* 2.1 Cloud droplet and Raindrop characteristics
333!
334xac = (xpi/6.0)*xrholw
335xbc = 3.0
336xcc = xrholw*xg/(18.0*1.7e-5) ! Stokes flow (Pruppacher p 322 for T=273K)
337xdc = 2.0
338!
339!
340xar = (xpi/6.0)*xrholw
341xbr = 3.0
342xcr = 842.
343xdr = 0.8
344!
345xccr = 8.e6 ! N0_r = XCXR * lambda_r ** ZXR
346xccr2 = 8.e8
347zxr = -1. !
348!
349xf0r = 1.00
350xf1r = 0.26
351!
352xc1r = 1./2.
353!
354! Berry and Reinhardt autoconversion+++
355IF (lice_t) THEN
356 ice_t_parameters%XOBMR = 1./xbc
357 ice_t_parameters%XAM_G = xpi*xrho_g/6.0
358 ice_t_parameters%XAM_I = xpi*xrho_i/6.0
359 ice_t_parameters%XAM_R = xpi*xrholw/6.0
360ENDIF
361!
362!
363!* 2.2 Ice crystal characteristics
364!
365!
366SELECT CASE (cpristine_ice)
367 CASE('PLAT')
368 xai = 0.82 ! Plates
369 xbi = 2.5 ! Plates
370 xc_i = 800. ! Plates
371 xdi = 1.0 ! Plates
372 xc1i = 1./xpi ! Plates
373 CASE('COLU')
374 xai = 2.14e-3 ! Columns
375 xbi = 1.7 ! Columns
376 xc_i = 2.1e5 ! Columns
377 xdi = 1.585 ! Columns
378 xc1i = 0.8 ! Columns
379 CASE('BURO')
380 xai = 44.0 ! Bullet rosettes
381 xbi = 3.0 ! Bullet rosettes
382 xc_i = 4.3e5 ! Bullet rosettes
383 xdi = 1.663 ! Bullet rosettes
384 xc1i = 0.5 ! Bullet rosettes
385END SELECT
386!
387! Note that XCCI=N_i (a locally predicted value) and XCXI=0.0, implicitly
388!
389xf0i = 1.00
390xf2i = 0.14
391!
392!
393!* 2.3 Snowflakes/aggregates characteristics
394!
395!
396IF (lice_t) THEN
397 ! set the snow coefficients to Thompson et al. 2008
398 xas = 0.069
399 xbs = 2
400 xcs = 40.
401 xds = 0.55
402ELSEIF(lsnow_t) THEN
403 !Cas Gamma generalisee
404 xas = 0.02
405 xbs = 1.9
406 xcs = 11.52
407 xds = 0.39
408 xfvelos =0.097
409ELSE
410 xas = 0.02
411 xbs = 1.9
412 xcs = 5.1
413 xds = 0.27
414 xfvelos = 0.
415END IF
416!
417xccs = 5.0
418xcxs = 1.0
419IF(lupdate_snow)THEN
420 xccs = xfrmin(16)
421 xcxs = xfrmin(17)
422ENDIF
423!
424xf0s = 0.86
425xf1s = 0.28
426!
427xc1s = 1./xpi
428!
429!
430!* 2.4 Graupel/Frozen drop characteristics
431!
432!
433xag = 19.6 ! Lump graupel case
434xbg = 2.8 ! Lump graupel case
435IF (lice_t) THEN
436 xcg = 442. ! Thompson values
437 xdg = 0.89 ! Thompson values
438ELSE
439 xcg = 124. ! Lump graupel case
440 xdg = 0.66 ! Lump graupel case
441ENDIF
442!
443xccg = 5.e5
444xcxg = -0.5
445! XCCG = 4.E4 ! Test of Ziegler (1988)
446! XCXG = -1.0 ! Test of Ziegler (1988)
447!
448xf0g = 0.86
449xf1g = 0.28
450!
451xc1g = 1./2.
452!
453!
454!* 2.5 Hailstone characteristics
455!
456!
457xah = 470.
458xbh = 3.0
459xch = 207.
460xdh = 0.64
461!
462!XCCH = 5.E-4
463!XCXH = 2.0
464!!!!!!!!!!!!
465 xcch = 4.e4 ! Test of Ziegler (1988)
466 xcxh = -1.0 ! Test of Ziegler (1988)
467!!! XCCH = 5.E5 ! Graupel_like
468!!! XCXH = -0.5 ! Graupel_like
469!!!!!!!!!!!!
470!
471xf0h = 0.86
472xf1h = 0.28
473!
474xc1h = 1./2.
475!
476!-------------------------------------------------------------------------------
477!
478!* 3. DIMENSIONAL DISTRIBUTIONS OF THE SPECIES
479! ----------------------------------------
480!
481!
482! 3.1 Cloud droplet distribution
483!
484! Over land
485xalphac = 1.0 ! Gamma law of the Cloud droplet (here volume-like distribution)
486xnuc = 3.0 ! Gamma law with little dispersion
487!
488!
489! Over sea
490xalphac2 = 3.0 ! Gamma law of the Cloud droplet (here volume-like distribution)
491xnuc2 = 1.0 ! Gamma law with little dispersion
492!
493!* 3.2 Raindrops distribution
494!
495xalphar = 1.0 ! Exponential law
496xnur = 1.0 ! Exponential law
497!
498!* 3.3 Ice crystal distribution
499!
500xalphai = 3.0 ! Gamma law for the ice crystal volume
501xnui = 3.0 ! Gamma law with little dispersion
502!
503IF (lsnow_t) THEN
504!Cas GAMMAGEN
505! XALPHAS = .214 ! Generalized gamma law
506! XNUS = 43.7 ! Generalized gamma law
507 xalphas = 1. ! Generalized gamma law
508 xnus = 1.3 ! Generalized gamma law
509 xtrans_mp_gammas = sqrt( ( gamma_dble(xnus + 2._mnhreal64/xalphas)*gamma_dble(xnus + 4._mnhreal64/xalphas) ) / &
510 ( 8._mnhreal64* gamma_dble(xnus + 1._mnhreal64/xalphas)*gamma_dble(xnus + 3._mnhreal64/xalphas) ) )
511ELSE
512 xalphas = 1.0 ! Exponential law
513 xnus = 1.0 ! Exponential law
515END IF
516!
517xalphag = 1.0 ! Exponential law
518xnug = 1.0 ! Exponential law
519!
520xalphah = 1.0 ! Gamma law
521xnuh = 8.0 ! Gamma law with little dispersion
522!
523!* 3.4 Constants for shape parameter
524!
525zgamc = momg(xalphac,xnuc,3.)
526zgamc2 = momg(xalphac2,xnuc2,3.)
527xlbc(1) = xar*zgamc
528xlbc(2) = xar*zgamc2
529xlbexc = 1.0/xbc
530!
531xlbexr = 1.0/(-1.0-xbr)
533!
534xlbexi = 1.0/(-xbi)
535xlbi = ( xai*momg(xalphai,xnui,xbi) )**(-xlbexi)
536!
537IF(lnewcoeff) THEN
538 xns = 1.0/(xas*momg(xalphas,xnus,xbs))
539ENDIF
540xlbexs = 1.0/(xcxs-xbs)
542!
543xlbexg = 1.0/(xcxg-xbg)
545!
546xlbexh = 1.0/(xcxh-xbh)
548!
549!* 3.5 Minimal values allowed for the mixing ratios
550!
551xlbdar_max = 100000.0
552xlbdas_max = 100000.0
553xlbdag_max = 100000.0
554!
555zconc_max = 1.e6 ! Maximal concentration for falling particules set to 1 per cc
556IF(xccs>0. .AND. xcxs>0. )xlbdas_max = ( zconc_max/xccs )**(1./xcxs)
557IF(lnewcoeff) THEN
558 IF (lsnow_t) xlbdas_max = 1.e6
559 xlbdas_min = 1.e-10
560ENDIF
561!
562xconc_sea=1e8 ! 100/cm3
563xconc_land=3e8 ! 300/cm3
564xconc_urban=5e8 ! 500/cm3
565!
566!-------------------------------------------------------------------------------
567!
568!* 4. CONSTANTS FOR THE SEDIMENTATION
569! -------------------------------
570!
571!
572!* 4.1 Exponent of the fall-speed air density correction
573!
574xcexvt = 0.4
575!
576!According to Foote and Du Toit (1969) and List (1958), ZRHO00 must be computed for Hu=50%, P=101325Pa and T=293.15K
577ze = (50./100.) * exp(xalpw-xbetaw/293.15-xgamw*log(293.15))
578zrv = (xrd/xrv) * ze / (101325.-ze)
579zrho00 = 101325.*(1.+zrv)/(xrd+zrv*xrv)/293.15
580xrho00 = zrho00
581IF(lupdate_snow)THEN
582 zrho00_snow = xp00/(xrd*300.0)
583ELSE
584 zrho00_snow = zrho00
585ENDIF
586!
587!* 4.2 Constants for sedimentation
588!
589xfsedc(1) = gamma(xnuc+(xdc+3.)/xalphac)/gamma(xnuc+3./xalphac)* &
590 (zrho00)**xcexvt
592 (zrho00)**xcexvt
593!
594! Gamma functions of the cloud droplet distributions (mean radius of the droplets)
595xgac = gamma(xnuc+1.0/xalphac)
596xgc = gamma(xnuc)
599!
600xexsedr = (xbr+xdr+1.0)/(xbr+1.0)
602 (xar*xccr*momg(xalphar,xnur,xbr))**(-xexsedr)*(zrho00)**xcexvt
603!
605xexcsedi = 1.0-xexrsedi
606xfsedi = (4.*xpi*900.)**(-xexcsedi) * &
608 ((xai*momg(xalphai,xnui,xbi)))**(-xexrsedi) * &
609 (zrho00)**xcexvt
610!When we do not use computations for columns, I think we must uncomment line just below
611!XEXCSEDI = XEXCSEDI * 3. to be checked
612!
613! Computations made for Columns
614!
615xexrsedi = 1.9324
616xexcsedi =-0.9324
617xfsedi = 3.89745e11*momg(xalphai,xnui,3.285)* &
618 momg(xalphai,xnui,1.7)**(-xexrsedi)*(zrho00)**xcexvt
619xexcsedi =-0.9324*3.0
620WRITE (kluout,fmt=*)' PRISTINE ICE SEDIMENTATION for columns XFSEDI =',xfsedi
621!
622!
623IF((.NOT. lnewcoeff) .OR. (hprogram=='MESONH' .AND. .NOT. lred)) THEN
624 xexseds = (xbs+xds-xcxs)/(xbs-xcxs)
626 (xas*xccs*momg(xalphas,xnus,xbs))**(-xexseds)*(zrho00_snow)**xcexvt
627ELSE
628 xexseds = -xds-xbs
630 *(zrho00_snow)**xcexvt
631END IF
632!
635 (xag*xccg*momg(xalphag,xnug,xbg))**(-xexsedg)*(zrho00)**xcexvt
636!
639 (xah*xcch*momg(xalphah,xnuh,xbh))**(-xexsedh)*(zrho00)**xcexvt
640!
641!
642!-------------------------------------------------------------------------------
643!
644!* 5. CONSTANTS FOR THE SLOW COLD PROCESSES
645! -------------------------------------
646!
647!
648!* 5.1 Constants for ice nucleation
649!
650SELECT CASE (cpristine_ice)
651 CASE('PLAT')
652 zfact_nucl = 1.0 ! Plates
653 CASE('COLU')
654 zfact_nucl = 25.0 ! Columns
655 CASE('BURO')
656 zfact_nucl = 17.0 ! Bullet rosettes
657END SELECT
658!
659xnu10 = 50.*zfact_nucl
660xalpha1 = 4.5
661xbeta1 = 0.6
662!
663xnu20 = 1000.*zfact_nucl
664xalpha2 = 12.96
665xbeta2 = 0.639
666!
667xmnu0 = 6.88e-13
668!
669gflag = .true.
670IF (gflag) THEN
671 WRITE(unit=kluout,fmt='(" Heterogeneous nucleation")')
672 WRITE(unit=kluout,fmt='(" NU10=",E13.6," ALPHA1=",E13.6," BETA1=",E13.6)') &
674 WRITE(unit=kluout,fmt='(" NU20=",E13.6," ALPHA2=",E13.6," BETA2=",E13.6)') &
676 WRITE(unit=kluout,fmt='(" mass of embryo XMNU0=",E13.6)') xmnu0
677END IF
678!
679xalpha3 = -3.075
680xbeta3 = 81.00356
681xhon = (xpi/6.)*((2.0*3.0*4.0*5.0*6.0)/(2.0*3.0))*(1.1e5)**(-3.0) !
682 ! Pi/6 * (G_c(6)/G_c(3)) * (1/Lbda_c**3)
683 ! avec Lbda_c=1.1E5 m^-1
684 ! the formula is equivalent to
685 ! rho_dref * r_c G(6)
686 ! Pi/6 * -------------- * ---------
687 ! rho_lw * N_c G(3)*G(3)
688!
689gflag = .true.
690IF (gflag) THEN
691 WRITE(unit=kluout,fmt='(" Homogeneous nucleation")')
692 WRITE(unit=kluout,fmt='(" ALPHA3=",E13.6," BETA3=",E13.6)') xalpha3,xbeta3
693 WRITE(unit=kluout,fmt='(" constant XHON=",E13.6)') xhon
694END IF
695!
696!
697!* 5.2 Constants for vapor deposition on ice
698!
699xscfac = (0.63**(1./3.))*sqrt((zrho00)**xcexvt) ! One assumes Sc=0.63
700!
701x0depi = (4.0*xpi)*xc1i*xf0i*momg(xalphai,xnui,1.)
703!
704IF(.NOT. lnewcoeff) THEN
705 x0deps = (4.0*xpi)*xccs*xc1s*xf0s*momg(xalphas,xnus,1.)
706 x1deps = (4.0*xpi)*xccs*xc1s*xf1s*sqrt(xcs)*momg(xalphas,xnus,0.5*xds+1.5)
707 xex0deps = xcxs-1.0
708 xex1deps = xcxs-0.5*(xds+3.0)
709ELSE
710 x0deps = xns*(4.0*xpi)*xc1s*xf0s*momg(xalphas,xnus,1.)
711 x1deps = xns*(4.0*xpi)*xc1s*xf1s*sqrt(xcs)*momg(xalphas,xnus,0.5*xds+1.5)
712 xex0deps = -1.0
713 xex1deps = -0.5*(xds+3.0)
714ENDIF
716!
718x1depg = (4.0*xpi)*xccg*xc1g*xf1g*sqrt(xcg)*momg(xalphag,xnug,0.5*xdg+1.5)
719xex0depg = xcxg-1.0
720xex1depg = xcxg-0.5*(xdg+3.0)
722!
724x1deph = (4.0*xpi)*xcch*xc1h*xf1h*sqrt(xch)*momg(xalphah,xnuh,0.5*xdh+1.5)
725xex0deph = xcxh-1.0
726xex1deph = xcxh-0.5*(xdh+3.0)
727
728gflag = .true.
729IF (gflag) THEN
730 WRITE(unit=kluout,fmt='(" factors sublimation snow/groupel")')
731 WRITE(unit=kluout,fmt='(" mod sublim snow =",E13.6)') xrdepsred
732 WRITE(unit=kluout,fmt='(" mod sublim graupel =",E13.6)') xrdepgred
733END IF
734
735!
736!* 5.3 Constants for pristine ice autoconversion
737!
738xtimauti = 1.e-3 ! Time constant at T=T_t
739xtexauti = 0.015 ! Temperature factor of the I+I collection efficiency
741IF(lcriauti) THEN
744ELSE
747 xt0criauti=(log10(xcriauti)-xbcriauti)/0.06
748ENDIF
749!
750gflag = .true.
751IF (gflag) THEN
752 WRITE(unit=kluout,fmt='(" pristine ice autoconversion")')
753 WRITE(unit=kluout,fmt='(" Time constant XTIMAUTI=",E13.6)') xtimauti
754 WRITE(unit=kluout,fmt='(" Temp. factor XTEXAUTI=",E13.6)') xtexauti
755 WRITE(unit=kluout,fmt='(" Crit. ice cont. XCRIAUTI=",E13.6)') xcriauti
756 WRITE(unit=kluout,fmt='(" A Coef. for cirrus law XACRIAUTI=",E13.6)')xacriauti
757 WRITE(unit=kluout,fmt='(" B Coef. for cirrus law XBCRIAUTI=",E13.6)')xbcriauti
758 WRITE(unit=kluout,fmt='(" Temp degC at which cirrus law starts to be used=",E13.6)') xt0criauti
759END IF
760!
761!
762!* 5.4 Constants for snow aggregation
763!
764xcolis = 0.25 ! Collection efficiency of I+S
765xcolexis = 0.05 ! Temperature factor of the I+S collection efficiency
766IF(.NOT. lnewcoeff) THEN
767 xfiaggs = (xpi/4.0)*xcolis*xccs*xcs*(zrho00_snow**xcexvt)*momg(xalphas,xnus,xds+2.0)
768 xexiaggs = xcxs-xds-2.0
769ELSE
770 xfiaggs = xns*(xpi/4.0)*xcolis*xcs*(zrho00**xcexvt)*momg(xalphas,xnus,xds+2.0)
771 xexiaggs = -xds - 2.0 ! GAMMGEN LH_EXTENDED
772ENDIF
773!
774gflag = .true.
775IF (gflag) THEN
776 WRITE(unit=kluout,fmt='(" snow aggregation")')
777 WRITE(unit=kluout,fmt='(" Coll. efficiency XCOLIS=",E13.6)') xcolis
778 WRITE(unit=kluout,fmt='(" Temp. factor XCOLEXIS=",E13.6)') xcolexis
779END IF
780!
781!
782!-------------------------------------------------------------------------------
783!
784!* 6. CONSTANTS FOR THE SLOW WARM PROCESSES
785! -------------------------------------
786!
787!
788!* 6.1 Constants for the cloud droplets autoconversion
789!
790xtimautc = 1.e-3
792!
793gflag = .true.
794IF (gflag) THEN
795 WRITE(unit=kluout,fmt='(" cloud droplets autoconversion")')
796 WRITE(unit=kluout,fmt='(" Time constant XTIMAUTC=",E13.6)') xtimautc
797 WRITE(unit=kluout,fmt='(" Crit. ice cont. XCRIAUTC=",E13.6)') xcriautc
798END IF
799!
800!* 6.2 Constants for the accretion of cloud droplets by raindrops
801!
802xfcaccr = (xpi/4.0)*xccr*xcr*(zrho00**xcexvt)*momg(xalphar,xnur,xdr+2.0)
803xexcaccr = -xdr-3.0
804!
805!
806IF (lice_t) THEN
807 ice_t_parameters%XODTS = 1./ptstep
808
809 ! These constants are various exponents and gamma functions
810 ! associated with cloud, rain, snow, and graupel.
811 DO j1 = 1, 15
812 ice_t_parameters%XCC_EX(1,j1) = j1 + 1.
813 ice_t_parameters%XCC_EX(2,j1) = xbc + j1 + 1.
814 ice_t_parameters%XCC_EX(3,j1) = xbc + j1 + 4.
815 ice_t_parameters%XCC_EX(4,j1) = j1 + xbv_c + 1.
816 ice_t_parameters%XCC_EX(5,j1) = xbc + j1 + xbv_c + 1.
817 ice_t_parameters%XCC_GM(1,j1) = gamma(ice_t_parameters%XCC_EX(1,j1))
818 ice_t_parameters%XCC_GM(2,j1) = gamma(ice_t_parameters%XCC_EX(2,j1))
819 ice_t_parameters%XCC_GM(3,j1) = gamma(ice_t_parameters%XCC_EX(3,j1))
820 ice_t_parameters%XCC_GM(4,j1) = gamma(ice_t_parameters%XCC_EX(4,j1))
821 ice_t_parameters%XCC_GM(5,j1) = gamma(ice_t_parameters%XCC_EX(5,j1))
822 ice_t_parameters%XOCG1(j1) = 1./ice_t_parameters%XCC_GM(1,j1)
823 ice_t_parameters%XOCG2(j1) = 1./ice_t_parameters%XCC_GM(2,j1)
824 ENDDO
825
826 ! ICE-T accretion
827 ! Create bins of cloud water (from min diameter up to 100 microns).
828 ice_t_parameters%XITDC(1) = xd0c*1.0d0
829 ice_t_parameters%XITDTC(1) = xd0c*1.0d0
830 DO j1 = 2, nbc
831 ice_t_parameters%XITDC(j1) = ice_t_parameters%XITDC(j1-1) + 1.0d-6
832 ice_t_parameters%XITDTC(j1) = (ice_t_parameters%XITDC(j1) - ice_t_parameters%XITDC(j1-1))
833 ENDDO
834
835 ! Create bins of cloud droplet number concentration (1 to 3000 per cc).
836 ! For Bigg freezing
837 ice_t_parameters%XDX(1) = 1.0d0
838 ice_t_parameters%XDX(nbc+1) = 3000.0d0
839 DO j1 = 2, nbc
840 ice_t_parameters%XDX(j1) = exp(dfloat(j1-1)/dfloat(nbc) &
841 *log(ice_t_parameters%XDX(nbc+1)/ice_t_parameters%XDX(1)) +log(ice_t_parameters%XDX(1)))
842 ENDDO
843 DO j1 = 1, nbc
844 ice_t_parameters%XT_NC(j1) = sqrt(ice_t_parameters%XDX(j1)*ice_t_parameters%XDX(j1+1)) * 1.d6
845 ENDDO
846 ice_t_parameters%NIC1 = log(ice_t_parameters%XT_NC(nbc)/ice_t_parameters%XT_NC(1))
847
848 ! Create bins of rain (from min diameter up to 5 mm).
849 ice_t_parameters%XDX(1) = xd0r*1.0d0
850 ice_t_parameters%XDX(nbr+1) = 0.005d0
851 DO j1 = 2, nbr
852 ice_t_parameters%XDX(j1) = exp(dfloat(j1-1)/dfloat(nbr) &
853 *log(ice_t_parameters%XDX(nbr+1)/ice_t_parameters%XDX(1)) +log(ice_t_parameters%XDX(1)))
854 ENDDO
855 DO j1 = 1, nbr
856 ice_t_parameters%XITDR(j1) = sqrt(ice_t_parameters%XDX(j1)*ice_t_parameters%XDX(j1+1))
857 ice_t_parameters%XITDTR(j1) = ice_t_parameters%XDX(j1+1) - ice_t_parameters%XDX(j1)
858 ENDDO
859 DO j2 = 1, nbc
860 DO j1 = 1, nbr
861 ice_t_parameters%XT_EFRW(j1,j2)=1.
862 ENDDO
863 ENDDO
864 CALL ini_icet_table_efrw(ice_t_parameters)
865
866 !****************** constants for Bigg freezing****************
867 ! Compute min ice diam from mass, min snow/graupel mass from diam.
868 ! xm0s = am_s * XD0S**bm_s
869 ice_t_parameters%XM0G = ice_t_parameters%XAM_G * xd0g**xbm_g
870
871 ! Constants for helping find lookup table indexes.
872 ice_t_parameters%NIC2 = nint(log10(xr_c(1)))
873 ice_t_parameters%NIR2 = nint(log10(xr_r(1)))
874 ice_t_parameters%NIR3 = nint(log10(xn0r_exp(1)))
875 ice_t_parameters%NIIN2 = nint(log10(xnt_in(1)))
876
877 ice_t_parameters%XCR_EX(1) = xbr + 1.
878 ice_t_parameters%XCR_EX(2) = xmu_r + 1.
879 ice_t_parameters%XCR_EX(3) = xbr + xmu_r + 1.
880 ice_t_parameters%XCR_EX(4) = xbr*2. + xmu_r + 1.
881 ice_t_parameters%XCR_EX(5) = xmu_r + xbv_r + 1.
882 ice_t_parameters%XCR_EX(6) = xbr + xmu_r + xbv_r + 1.
883 ice_t_parameters%XCR_EX(7) = xbr*0.5 + xmu_r + xbv_r + 1.
884 ice_t_parameters%XCR_EX(8) = xbr + xmu_r + xbv_r + 3.
885 ice_t_parameters%XCR_EX(9) = xmu_r + xbv_r + 3.
886 ice_t_parameters%XCR_EX(10) = xmu_r + 2.
887 ice_t_parameters%XCR_EX(11) = 0.5*(xbv_r + 5. + 2.*xmu_r)
888 ice_t_parameters%XCR_EX(12) = xbr*0.5 + xmu_r + 1.
889 ice_t_parameters%XCR_EX(13) = xbr*2. + xmu_r + xbv_r + 1.
890 DO j1 = 1, 13
891 ice_t_parameters%XCR_GM(j1) = gamma(ice_t_parameters%XCR_EX(j1))
892 ENDDO
893 ice_t_parameters%XORE1 = 1./ice_t_parameters%XCR_EX(1)
894 ice_t_parameters%XORG1 = 1./ice_t_parameters%XCR_GM(1)
895 ice_t_parameters%XORG2 = 1./ice_t_parameters%XCR_GM(2)
896
897 CALL ini_icet_freezeh2o(ice_t_parameters, rain_ice_descrn)
898
899 !****************** Constants for graupel collecting cloud water ***************
900 ice_t_parameters%XCG_E(1) = xbm_g + 1.
901 ice_t_parameters%XCG_E(2) = xmu_g + 1.
902 ice_t_parameters%XCG_E(3) = xbm_g + xmu_g + 1.
903 ice_t_parameters%XCG_E(4) = xbm_g*2. + xmu_g + 1.
904 ice_t_parameters%XCG_E(5) = xbm_g*2. + xmu_g + xdg + 1.
905 ice_t_parameters%XCG_E(6) = xbm_g + xmu_g + xdg + 1.
906 ice_t_parameters%XCG_E(7) = xbm_g + xmu_g + xdg + 2.
907 ice_t_parameters%XCG_E(8) = xbm_g + xmu_g + xdg + 3.
908 ice_t_parameters%XCG_E(9) = xmu_g + xdg + 3.
909 ice_t_parameters%XCG_E(10) = xmu_g + 2.
910 ice_t_parameters%XCG_E(11) = 0.5*(xdg + 5. + 2.*xmu_g)
911 ice_t_parameters%XCG_E(12) = 0.5*(xdg + 5.) + xmu_g
912 DO j1 = 1, 12
913 ice_t_parameters%XCG_G(j1) = gamma(ice_t_parameters%XCG_E(j1))
914 ENDDO
915 ice_t_parameters%XOBMG = 1./xbm_g
916 ice_t_parameters%XOGE1 = 1./ice_t_parameters%XCG_E(1)
917 ice_t_parameters%XOGG1 = 1./ice_t_parameters%XCG_G(1)
918 ice_t_parameters%XOGG2 = 1./ice_t_parameters%XCG_G(2)
919
920 ! Graupel collecting cloud water
921 ice_t_parameters%XT1_QG_QC = xpi*.25*xcg * ice_t_parameters%XCG_G(9)
922
923 !********** Constants for vapor deposition and sublimation of cloud ice *******
924 ice_t_parameters%XCI_EX(1) = xmu_i + 1.
925 ice_t_parameters%XCI_EX(2) = xbm_i + xmu_i + 1.
926 ice_t_parameters%XCI_EX(3) = xbm_i + xmu_i + xbv_i + 1.
927 ice_t_parameters%XCI_EX(4) = xmu_i + xbv_i + 1.
928 ice_t_parameters%XCI_EX(5) = xmu_i + 2.
929 ice_t_parameters%XCI_EX(6) = xbm_i*0.5 + xmu_i + xbv_i + 1.
930 ice_t_parameters%XCI_EX(7) = xbm_i*0.5 + xmu_i + 1.
931 ice_t_parameters%XCI_GM(1) = gamma(ice_t_parameters%XCI_EX(1))
932 ice_t_parameters%XCI_GM(2) = gamma(ice_t_parameters%XCI_EX(2))
933 ice_t_parameters%XCI_GM(3) = gamma(ice_t_parameters%XCI_EX(3))
934 ice_t_parameters%XCI_GM(4) = gamma(ice_t_parameters%XCI_EX(4))
935 ice_t_parameters%XCI_GM(5) = gamma(ice_t_parameters%XCI_EX(5))
936 ice_t_parameters%XCI_GM(6) = gamma(ice_t_parameters%XCI_EX(6))
937 ice_t_parameters%XCI_GM(7) = gamma(ice_t_parameters%XCI_EX(7))
938
939 !****************** Constants for snow collecting cloud water ***************
940 DO j2 = 1, nbc
941 DO j1 = 1, nbs
942 ice_t_parameters%XT_EFSW(j1,j2) = 0.0
943 ENDDO
944 ENDDO
945
946 DO j1 = 1, nbs
947 ice_t_parameters%XITDS(j1) = sqrt(ice_t_parameters%XDX(j1)*ice_t_parameters%XDX(j1+1))
948 ENDDO
949
950 ice_t_parameters%XCS_EX(1) = xbs + 1.
951 ice_t_parameters%XCS_EX(2) = xbs + 2.
952 ice_t_parameters%XCS_EX(3) = xbs*2.
953 ice_t_parameters%XCS_EX(4) = xbs + xds + 1.
954 ice_t_parameters%XCS_EX(5) = xbs*2. + xds + 1.
955 ice_t_parameters%XCS_EX(6) = xbs*2. + 1.
956 ice_t_parameters%XCS_EX(7) = xbs + xmu_s + 1.
957 ice_t_parameters%XCS_EX(8) = xbs + xmu_s + 2.
958 ice_t_parameters%XCS_EX(9) = xbs + xmu_s + 3.
959 ice_t_parameters%XCS_EX(10) = xbs + xmu_s + xds + 1.
960 ice_t_parameters%XCS_EX(11) = xbs*2. + xmu_s + xds + 1.
961 ice_t_parameters%XCS_EX(12) = xbs*2. + xmu_s + 1.
962 ice_t_parameters%XCS_EX(13) = xds + 2.
963 ice_t_parameters%XCS_EX(14) = xbs + xds
964 ice_t_parameters%XCS_EX(15) = xmu_s + 1.
965 ice_t_parameters%XCS_EX(16) = 1.0 + (1.0 + xds)/2.
966 ice_t_parameters%XCS_EX(17) = ice_t_parameters%XCS_EX(16) + xmu_s + 1.
967 ice_t_parameters%XCS_EX(18) = xds + xmu_s + 3.
968 DO j1 = 1, 18
969 ice_t_parameters%XCS_GM(j1) = gamma(ice_t_parameters%XCS_EX(j1))
970 ENDDO
971 ice_t_parameters%XOAMS = 1./xas
972
973 ! Snow collecting cloud water
974 ice_t_parameters%XT1_QS_QC = xpi*.25*xcs
975
976 CALL ini_icet_table_efsw(ice_t_parameters, rain_ice_descrn)
977
978ENDIF ! ICE-T out
979!
980!* 6.3 Constants for the evaporation of the raindrops
981!
983x1evar = (4.0*xpi)*xccr*xc1r*xf1r*sqrt(xcr)*momg(xalphar,xnur,0.5*xdr+1.5)
984xex0evar = -2.0
985xex1evar = -1.0-0.5*(xdr+3.0)
986!
987!
988!-------------------------------------------------------------------------------
989!
990!* 7. CONSTANTS FOR THE FAST COLD PROCESSES FOR THE AGGREGATES
991! --------------------------------------------------------
992!
993!
994!* 7.1 Constants for the riming of the aggregates
995!
996xdcslim = 0.007 ! D_cs^lim = 7 mm as suggested by Farley et al. (1989)
997xcolcs = 1.0
998IF(.NOT. lnewcoeff) THEN
999 xexcrimss= xcxs-xds-2.0
1000 xcrimss = (xpi/4.0)*xcolcs*xccs*xcs*(zrho00_snow**xcexvt)*momg(xalphas,xnus,xds+2.0)
1001ELSE
1002 xexcrimss= -xds-2.0
1003 xcrimss = xns * (xpi/4.0)*xcolcs*xcs*(zrho00_snow**xcexvt)*momg(xalphas,xnus,xds+2.0)
1004ENDIF
1007IF(.NOT. lnewcoeff) THEN
1013ELSE
1015 xexsrimcg = -xbs
1019ENDIF
1020!
1021gflag = .true.
1022IF (gflag) THEN
1023 WRITE(unit=kluout,fmt='(" riming of the aggregates")')
1024 WRITE(unit=kluout,fmt='(" D_cs^lim (Farley et al.) XDCSLIM=",E13.6)') xdcslim
1025 WRITE(unit=kluout,fmt='(" Coll. efficiency XCOLCS=",E13.6)') xcolcs
1026END IF
1027!
1028rain_ice_paramn%NGAMINC = 80
1029rain_ice_paramn%XGAMINC_BOUND_MIN = 1.0e-1 ! Minimal value of (Lbda * D_cs^lim)**alpha
1030rain_ice_paramn%XGAMINC_BOUND_MAX = 1.0e7 ! Maximal value of (Lbda * D_cs^lim)**alpha
1031IF (lsnow_t) THEN
1032 rain_ice_paramn%XGAMINC_BOUND_MIN = (1000.*xtrans_mp_gammas*xdcslim)**xalphas
1033 rain_ice_paramn%XGAMINC_BOUND_MAX = (50000.*xtrans_mp_gammas*xdcslim)**xalphas
1034END IF
1035zrate = exp(log(rain_ice_paramn%XGAMINC_BOUND_MAX/rain_ice_paramn%XGAMINC_BOUND_MIN)/real(rain_ice_paramn%NGAMINC-1))
1036!
1037IF( .NOT.ASSOCIATED(xgaminc_rim1) ) THEN
1038 CALL rain_ice_param_allocate('XGAMINC_RIM1', rain_ice_paramn%NGAMINC)
1039 !$acc enter data create (XGAMINC_RIM1)
1040END IF
1041IF( .NOT.ASSOCIATED(xgaminc_rim2) ) THEN
1042 CALL rain_ice_param_allocate('XGAMINC_RIM2', rain_ice_paramn%NGAMINC)
1043 !$acc enter data create (XGAMINC_RIM2)
1044END IF
1045IF( .NOT.ASSOCIATED(xgaminc_rim4) ) THEN
1046 CALL rain_ice_param_allocate('XGAMINC_RIM4', rain_ice_paramn%NGAMINC)
1047 !$acc enter data create (XGAMINC_RIM4)
1048END IF
1049!
1050DO j1=1,rain_ice_paramn%NGAMINC
1051 zbound = rain_ice_paramn%XGAMINC_BOUND_MIN*zrate**(j1-1)
1052 xgaminc_rim1(j1) = gamma_inc(xnus+(2.0+xds)/xalphas,zbound)
1053 xgaminc_rim2(j1) = gamma_inc(xnus+xbs/xalphas ,zbound)
1054 xgaminc_rim4(j1) = gamma_inc(xnus+xbg/xalphas ,zbound)
1055END DO
1056!
1057!$acc update device (XGAMINC_RIM1,XGAMINC_RIM2,XGAMINC_RIM4)
1058rain_ice_paramn%XRIMINTP1 = xalphas / log(zrate)
1059rain_ice_paramn%XRIMINTP2 = 1.0 + rain_ice_paramn%XRIMINTP1*log( xdcslim/(rain_ice_paramn%XGAMINC_BOUND_MIN)**(1.0/xalphas) )
1060!
1061!* 7.2 Constants for the accretion of raindrops onto aggregates
1062!
1063IF(.NOT. lnewcoeff) THEN
1064 xfraccss = ((xpi**2)/24.0)*xccs*xccr*xrholw*(zrho00_snow**xcexvt)
1065ELSE
1066 xfraccss = xns*((xpi**2)/24.0)*xccr*xrholw*(zrho00_snow**xcexvt)
1067ENDIF
1068!
1072!
1073IF(.NOT. lnewcoeff) THEN
1074 xfsaccrg = (xpi/4.0)*xas*xccs*xccr*(zrho00_snow**xcexvt)
1075ELSE
1076 xfsaccrg = xns*(xpi/4.0)*xas*xccr*(zrho00_snow**xcexvt)
1077ENDIF
1078!
1082!
1083!* 7.2.1 Defining the ranges for the computation of the kernels
1084!
1085! Notice: One magnitude of lambda discretized over 10 points for rain
1086! Notice: One magnitude of lambda discretized over 10 points for snow
1087!
1088rain_ice_paramn%NACCLBDAS = 40
1089rain_ice_paramn%XACCLBDAS_MIN = 5.0e1 ! Minimal value of Lbda_s to tabulate XKER_RACCS
1090rain_ice_paramn%XACCLBDAS_MAX = 5.0e5 ! Maximal value of Lbda_s to tabulate XKER_RACCS
1091zrate = log(rain_ice_paramn%XACCLBDAS_MAX/rain_ice_paramn%XACCLBDAS_MIN)/real(rain_ice_paramn%NACCLBDAS-1)
1092rain_ice_paramn%XACCINTP1S = 1.0 / zrate
1093rain_ice_paramn%XACCINTP2S = 1.0 - log( rain_ice_paramn%XACCLBDAS_MIN ) / zrate
1094rain_ice_paramn%NACCLBDAR = 40
1095rain_ice_paramn%XACCLBDAR_MIN = 1.0e3 ! Minimal value of Lbda_r to tabulate XKER_RACCS
1096rain_ice_paramn%XACCLBDAR_MAX = 1.0e7 ! Maximal value of Lbda_r to tabulate XKER_RACCS
1097zrate = log(rain_ice_paramn%XACCLBDAR_MAX/rain_ice_paramn%XACCLBDAR_MIN)/real(rain_ice_paramn%NACCLBDAR-1)
1098rain_ice_paramn%XACCINTP1R = 1.0 / zrate
1099rain_ice_paramn%XACCINTP2R = 1.0 - log( rain_ice_paramn%XACCLBDAR_MIN ) / zrate
1100!
1101!* 7.2.2 Computations of the tabulated normalized kernels
1102!
1103ind = 50 ! Interval number, collection efficiency and infinite diameter
1104zesr = 1.0 ! factor used to integrate the dimensional distributions when
1105zfdinfty = 20.0 ! computing the kernels XKER_RACCSS, XKER_RACCS and XKER_SACCRG
1106!
1107IF( .NOT.ASSOCIATED(xker_raccss) ) THEN
1108 CALL rain_ice_param_allocate('XKER_RACCSS', rain_ice_paramn%NACCLBDAS,rain_ice_paramn%NACCLBDAR)
1109 !$acc enter data create(XKER_RACCSS)
1110END IF
1111IF( .NOT.ASSOCIATED(xker_raccs ) ) THEN
1112 CALL rain_ice_param_allocate('XKER_RACCS', rain_ice_paramn%NACCLBDAS,rain_ice_paramn%NACCLBDAR)
1113 !$acc enter data create(XKER_RACCS)
1114END IF
1115IF( .NOT.ASSOCIATED(xker_saccrg) ) THEN
1116 CALL rain_ice_param_allocate('XKER_SACCRG', rain_ice_paramn%NACCLBDAR,rain_ice_paramn%NACCLBDAS)
1117 !$acc enter data create(XKER_SACCRG)
1118END IF
1119!
1120CALL read_xker_raccs (kacclbdas,kacclbdar,knd, &
1121 palphas,pnus,palphar,pnur,pesr,pbs,pbr,pcs,pds,pfvelos,pcr,pdr, &
1122 pacclbdas_max,pacclbdar_max,pacclbdas_min,pacclbdar_min, &
1123 pfdinfty )
1124IF( (kacclbdas/=rain_ice_paramn%NACCLBDAS) .OR. (kacclbdar/=rain_ice_paramn%NACCLBDAR) .OR. (knd/=ind) .OR. &
1125 (palphas/=xalphas) .OR. (pnus/=xnus) .OR. &
1126 (palphar/=xalphar) .OR. (pnur/=xnur) .OR. &
1127 (pesr/=zesr) .OR. (pbs/=xbs) .OR. (pbr/=xbr) .OR. &
1128 (pcs/=xcs) .OR. (pds/=xds) .OR. (pfvelos/=xfvelos) .OR. (pcr/=xcr) .OR. (pdr/=xdr) .OR. &
1129 (pacclbdas_max/=rain_ice_paramn%XACCLBDAS_MAX) .OR. (pacclbdar_max/=rain_ice_paramn%XACCLBDAR_MAX) .OR. &
1130 (pacclbdas_min/=rain_ice_paramn%XACCLBDAS_MIN) .OR. (pacclbdar_min/=rain_ice_paramn%XACCLBDAR_MIN) .OR. &
1131 (pfdinfty/=zfdinfty) ) THEN
1132 CALL rrcolss ( ind, xalphas, xnus, xalphar, xnur, &
1133 zesr, xbr, xcs, xds, xfvelos, xcr, xdr, &
1134 rain_ice_paramn%XACCLBDAS_MAX, rain_ice_paramn%XACCLBDAR_MAX, &
1135 rain_ice_paramn%XACCLBDAS_MIN, rain_ice_paramn%XACCLBDAR_MIN, &
1136 zfdinfty, xker_raccss, xag, xbs, xas )
1137 CALL rzcolx ( ind, xalphas, xnus, xalphar, xnur, &
1138 zesr, xbr, xcs, xds, xfvelos, xcr, xdr, 0., &
1139 rain_ice_paramn%XACCLBDAS_MAX, rain_ice_paramn%XACCLBDAR_MAX, &
1140 rain_ice_paramn%XACCLBDAS_MIN, rain_ice_paramn%XACCLBDAR_MIN, &
1141 zfdinfty, xker_raccs )
1142 CALL rscolrg ( ind, xalphas, xnus, xalphar, xnur, &
1143 zesr, xbs, xcs, xds, xfvelos, xcr, xdr, &
1144 rain_ice_paramn%XACCLBDAS_MAX, rain_ice_paramn%XACCLBDAR_MAX, &
1145 rain_ice_paramn%XACCLBDAS_MIN, rain_ice_paramn%XACCLBDAR_MIN, &
1146 zfdinfty, xker_saccrg, xag, xbs, xas )
1147 !$acc update device(XKER_RACCSS,XKER_RACCS,XKER_SACCRG)
1148 !
1149 WRITE(unit=kluout,fmt='("*****************************************")')
1150 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF RACSS KERNELS ****")')
1151 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF RACS KERNELS ****")')
1152 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF SACRG KERNELS ****")')
1153 WRITE(unit=kluout,fmt='("*****************************************")')
1154 WRITE(unit=kluout,fmt='("!")')
1155 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1156 WRITE(unit=kluout,fmt='("KACCLBDAS=",I3)') rain_ice_paramn%NACCLBDAS
1157 WRITE(unit=kluout,fmt='("KACCLBDAR=",I3)') rain_ice_paramn%NACCLBDAR
1158 WRITE(unit=kluout,fmt='("PALPHAS=",E13.6)') xalphas
1159 WRITE(unit=kluout,fmt='("PNUS=",E13.6)') xnus
1160 WRITE(unit=kluout,fmt='("PALPHAR=",E13.6)') xalphar
1161 WRITE(unit=kluout,fmt='("PNUR=",E13.6)') xnur
1162 WRITE(unit=kluout,fmt='("PESR=",E13.6)') zesr
1163 WRITE(unit=kluout,fmt='("PBS=",E13.6)') xbs
1164 WRITE(unit=kluout,fmt='("PBR=",E13.6)') xbr
1165 WRITE(unit=kluout,fmt='("PCS=",E13.6)') xcs
1166 WRITE(unit=kluout,fmt='("PDS=",E13.6)') xds
1167 WRITE(unit=kluout,fmt='("PFVELOS=",E13.6)') xfvelos
1168 WRITE(unit=kluout,fmt='("PCR=",E13.6)') xcr
1169 WRITE(unit=kluout,fmt='("PDR=",E13.6)') xdr
1170 WRITE(unit=kluout,fmt='("PACCLBDAS_MAX=",E13.6)') &
1171 rain_ice_paramn%XACCLBDAS_MAX
1172 WRITE(unit=kluout,fmt='("PACCLBDAR_MAX=",E13.6)') &
1173 rain_ice_paramn%XACCLBDAR_MAX
1174 WRITE(unit=kluout,fmt='("PACCLBDAS_MIN=",E13.6)') &
1175 rain_ice_paramn%XACCLBDAS_MIN
1176 WRITE(unit=kluout,fmt='("PACCLBDAR_MIN=",E13.6)') &
1177 rain_ice_paramn%XACCLBDAR_MIN
1178 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1179 WRITE(unit=kluout,fmt='("!")')
1180 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_RACCSS) ) THEN")')
1181 DO j1 = 1 , rain_ice_paramn%NACCLBDAS
1182 DO j2 = 1 , rain_ice_paramn%NACCLBDAR
1183 WRITE(unit=kluout,fmt='(" PKER_RACCSS(",I3,",",I3,") = ",E13.6)') &
1184 j1,j2,xker_raccss(j1,j2)
1185 END DO
1186 END DO
1187 WRITE(unit=kluout,fmt='("END IF")')
1188 WRITE(unit=kluout,fmt='("!")')
1189 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_RACCS ) ) THEN")')
1190 DO j1 = 1 , rain_ice_paramn%NACCLBDAS
1191 DO j2 = 1 , rain_ice_paramn%NACCLBDAR
1192 WRITE(unit=kluout,fmt='(" PKER_RACCS (",I3,",",I3,") = ",E13.6)') &
1193 j1,j2,xker_raccs(j1,j2)
1194 END DO
1195 END DO
1196 WRITE(unit=kluout,fmt='("END IF")')
1197 WRITE(unit=kluout,fmt='("!")')
1198 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_SACCRG) ) THEN")')
1199 DO j1 = 1 , rain_ice_paramn%NACCLBDAR
1200 DO j2 = 1 , rain_ice_paramn%NACCLBDAS
1201 WRITE(unit=kluout,fmt='(" PKER_SACCRG(",I3,",",I3,") = ",E13.6)') &
1202 j1,j2,xker_saccrg(j1,j2)
1203 END DO
1204 END DO
1205 WRITE(unit=kluout,fmt='("END IF")')
1206 ELSE
1207 CALL read_xker_raccs (kacclbdas,kacclbdar,knd, &
1208 palphas,pnus,palphar,pnur,pesr,pbs,pbr,pcs,pds,pfvelos,pcr,pdr, &
1209 pacclbdas_max,pacclbdar_max,pacclbdas_min,pacclbdar_min, &
1211 !
1212 !$acc update device(XKER_RACCSS,XKER_RACCS,XKER_SACCRG)
1213 !
1214 WRITE(unit=kluout,fmt='(" Read XKER_RACCSS")')
1215 WRITE(unit=kluout,fmt='(" Read XKER_RACCS ")')
1216 WRITE(unit=kluout,fmt='(" Read XKER_SACCRG")')
1217END IF
1218!
1219!* 7.3 Constant for the conversion-melting rate
1220!
1221xfscvmg = 2.0
1222!
1223gflag = .true.
1224IF (gflag) THEN
1225 WRITE(unit=kluout,fmt='(" conversion-melting of the aggregates")')
1226 WRITE(unit=kluout,fmt='(" Conv. factor XFSCVMG=",E13.6)') xfscvmg
1227END IF
1228!
1229!
1230!-------------------------------------------------------------------------------
1231!
1232!* 8. CONSTANTS FOR THE FAST COLD PROCESSES FOR THE GRAUPELN
1233! ------------------------------------------------------
1234!
1235!
1236!* 8.1 Constants for the rain contact freezing
1237!
1238xcolir = 1.0
1239!
1240xexrcfri = -xdr-5.0+zxr
1241xrcfri = ((xpi**2)/24.0)*xccr*xrholw*xcolir*xcr*(zrho00**xcexvt) &
1242 *momg(xalphar,xnur,xdr+5.0)
1243xexicfrr = -xdr-2.0+zxr
1244xicfrr = (xpi/4.0)*xcolir*xcr*(zrho00**xcexvt) &
1245 *xccr*momg(xalphar,xnur,xdr+2.0)
1246!
1247gflag = .true.
1248IF (gflag) THEN
1249 WRITE(unit=kluout,fmt='(" rain contact freezing")')
1250 WRITE(unit=kluout,fmt='(" Coll. efficiency XCOLIR=",E13.6)') xcolir
1251END IF
1252!
1253!
1254!* 8.2 Constants for the dry growth of the graupeln
1255!
1256!* 8.2.1 Constants for the cloud droplet collection by the graupeln
1257!
1258xfcdryg = (xpi/4.0)*xccg*xcg*(zrho00**xcexvt)*momg(xalphag,xnug,xdg+2.0)
1259!
1260!* 8.2.2 Constants for the cloud ice collection by the graupeln
1261!
1262IF(lice_t) THEN
1263 xcolig = 0.000001 ! Collection efficiency of I+G
1264ELSE
1265 xcolig = 0.01 ! Collection efficiency of I+G
1266ENDIF
1267xcolexig = 0.1 ! Temperature factor of the I+G collection efficiency
1268WRITE (kluout, fmt=*) ' NEW Constants for the cloud ice collection by the graupeln'
1269WRITE (kluout, fmt=*) ' XCOLIG, XCOLEXIG = ',xcolig,xcolexig
1270xfidryg = (xpi/4.0)*xcolig*xccg*xcg*(zrho00**xcexvt)*momg(xalphag,xnug,xdg+2.0)
1271xexfidryg=(xcxg-xdg-2.)/(xcxg-xbg)
1273!
1274gflag = .true.
1275IF (gflag) THEN
1276 WRITE(unit=kluout,fmt='(" cloud ice collection by the graupeln")')
1277 WRITE(unit=kluout,fmt='(" Coll. efficiency XCOLIG=",E13.6)') xcolig
1278 WRITE(unit=kluout,fmt='(" Temp. factor XCOLEXIG=",E13.6)') xcolexig
1279END IF
1280!
1281!* 8.2.3 Constants for the aggregate collection by the graupeln
1282!
1283IF(lice_t) THEN
1284 xcolsg = 0.000001 ! Collection efficiency of S+G
1285ELSE
1286 xcolsg = 0.01 ! Collection efficiency of S+G
1287END IF
1288xcolexsg = 0.1 ! Temperature factor of the S+G collection efficiency
1289WRITE (kluout, fmt=*) ' NEW Constants for the aggregate collection by the graupeln'
1290WRITE (kluout, fmt=*) ' XCOLSG, XCOLEXSG = ',xcolsg,xcolexsg
1291IF(.NOT. lnewcoeff) THEN
1292 xfsdryg = (xpi/4.0)*xcolsg*xccg*xccs*xas*(zrho00_snow**xcexvt)
1293ELSE
1294 xfsdryg = xns*(xpi/4.0)*xcolsg*xccg*xas*(zrho00_snow**xcexvt)
1295ENDIF
1296!
1300!
1301gflag = .true.
1302IF (gflag) THEN
1303 WRITE(unit=kluout,fmt='(" aggregate collection by the graupeln")')
1304 WRITE(unit=kluout,fmt='(" Coll. efficiency XCOLSG=",E13.6)') xcolsg
1305 WRITE(unit=kluout,fmt='(" Temp. factor XCOLEXSG=",E13.6)') xcolexsg
1306END IF
1307!
1308!* 8.2.4 Constants for the raindrop collection by the graupeln
1309!
1310xfrdryg = ((xpi**2)/24.0)*xccg*xccr*xrholw*(zrho00**xcexvt)
1311!
1315!
1316! Notice: One magnitude of lambda discretized over 10 points
1317!
1318rain_ice_paramn%NDRYLBDAR = 40
1319rain_ice_paramn%XDRYLBDAR_MIN = 1.0e3 ! Minimal value of Lbda_r to tabulate XKER_RDRYG
1320rain_ice_paramn%XDRYLBDAR_MAX = 1.0e7 ! Maximal value of Lbda_r to tabulate XKER_RDRYG
1321zrate = log(rain_ice_paramn%XDRYLBDAR_MAX/rain_ice_paramn%XDRYLBDAR_MIN)/real(rain_ice_paramn%NDRYLBDAR-1)
1322rain_ice_paramn%XDRYINTP1R = 1.0 / zrate
1323rain_ice_paramn%XDRYINTP2R = 1.0 - log( rain_ice_paramn%XDRYLBDAR_MIN ) / zrate
1324rain_ice_paramn%NDRYLBDAS = 80
1325rain_ice_paramn%XDRYLBDAS_MIN = 2.5e1 ! Minimal value of Lbda_s to tabulate XKER_SDRYG
1326rain_ice_paramn%XDRYLBDAS_MAX = 2.5e9 ! Maximal value of Lbda_s to tabulate XKER_SDRYG
1327zrate = log(rain_ice_paramn%XDRYLBDAS_MAX/rain_ice_paramn%XDRYLBDAS_MIN)/real(rain_ice_paramn%NDRYLBDAS-1)
1328rain_ice_paramn%XDRYINTP1S = 1.0 / zrate
1329rain_ice_paramn%XDRYINTP2S = 1.0 - log( rain_ice_paramn%XDRYLBDAS_MIN ) / zrate
1330rain_ice_paramn%NDRYLBDAG = 40
1331rain_ice_paramn%XDRYLBDAG_MIN = 1.0e3 ! Min value of Lbda_g to tabulate XKER_SDRYG,XKER_RDRYG
1332rain_ice_paramn%XDRYLBDAG_MAX = 1.0e7 ! Max value of Lbda_g to tabulate XKER_SDRYG,XKER_RDRYG
1333zrate = log(rain_ice_paramn%XDRYLBDAG_MAX/rain_ice_paramn%XDRYLBDAG_MIN)/real(rain_ice_paramn%NDRYLBDAG-1)
1334rain_ice_paramn%XDRYINTP1G = 1.0 / zrate
1335rain_ice_paramn%XDRYINTP2G = 1.0 - log( rain_ice_paramn%XDRYLBDAG_MIN ) / zrate
1336!
1337!* 8.2.5 Computations of the tabulated normalized kernels
1338!
1339ind = 50 ! Interval number, collection efficiency and infinite diameter
1340zegs = 1.0 ! factor used to integrate the dimensional distributions when
1341zfdinfty = 20.0 ! computing the kernels XKER_SDRYG
1342!
1343IF( .NOT.ASSOCIATED(xker_sdryg) ) THEN
1344 CALL rain_ice_param_allocate('XKER_SDRYG', rain_ice_paramn%NDRYLBDAG,rain_ice_paramn%NDRYLBDAS)
1345 !$acc enter data create(XKER_SDRYG)
1346END IF
1347!
1348CALL read_xker_sdryg (kdrylbdag,kdrylbdas,knd, &
1349 palphag,pnug,palphas,pnus,pegs,pbs,pcg,pdg,pcs,pds,pfvelos, &
1350 pdrylbdag_max,pdrylbdas_max,pdrylbdag_min,pdrylbdas_min, &
1351 pfdinfty )
1352IF( (kdrylbdag/=rain_ice_paramn%NDRYLBDAG) .OR. (kdrylbdas/=rain_ice_paramn%NDRYLBDAS) .OR. (knd/=ind) .OR. &
1353 (palphag/=xalphag) .OR. (pnug/=xnug) .OR. &
1354 (palphas/=xalphas) .OR. (pnus/=xnus) .OR. &
1355 (pegs/=zegs) .OR. (pbs/=xbs) .OR. &
1356 (pcg/=xcg) .OR. (pdg/=xdg) .OR. (pcs/=xcs) .OR. (pds/=xds) .OR. (pfvelos/=xfvelos) .OR. &
1357 (pdrylbdag_max/=rain_ice_paramn%XDRYLBDAG_MAX) .OR. (pdrylbdas_max/=rain_ice_paramn%XDRYLBDAS_MAX) .OR. &
1358 (pdrylbdag_min/=rain_ice_paramn%XDRYLBDAG_MIN) .OR. (pdrylbdas_min/=rain_ice_paramn%XDRYLBDAS_MIN) .OR. &
1359 (pfdinfty/=zfdinfty) ) THEN
1360 CALL rzcolx ( ind, xalphag, xnug, xalphas, xnus, &
1361 zegs, xbs, xcg, xdg, 0., xcs, xds, xfvelos, &
1362 rain_ice_paramn%XDRYLBDAG_MAX, rain_ice_paramn%XDRYLBDAS_MAX, &
1363 rain_ice_paramn%XDRYLBDAG_MIN, rain_ice_paramn%XDRYLBDAS_MIN, &
1364 zfdinfty, xker_sdryg )
1365 !$acc update device(XKER_SDRYG)
1366 !
1367 WRITE(unit=kluout,fmt='("*****************************************")')
1368 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF SDRYG KERNELS ****")')
1369 WRITE(unit=kluout,fmt='("*****************************************")')
1370 WRITE(unit=kluout,fmt='("!")')
1371 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1372 WRITE(unit=kluout,fmt='("KDRYLBDAG=",I3)') rain_ice_paramn%NDRYLBDAG
1373 WRITE(unit=kluout,fmt='("KDRYLBDAS=",I3)') rain_ice_paramn%NDRYLBDAS
1374 WRITE(unit=kluout,fmt='("PALPHAG=",E13.6)') xalphag
1375 WRITE(unit=kluout,fmt='("PNUG=",E13.6)') xnug
1376 WRITE(unit=kluout,fmt='("PALPHAS=",E13.6)') xalphas
1377 WRITE(unit=kluout,fmt='("PNUS=",E13.6)') xnus
1378 WRITE(unit=kluout,fmt='("PEGS=",E13.6)') zegs
1379 WRITE(unit=kluout,fmt='("PBS=",E13.6)') xbs
1380 WRITE(unit=kluout,fmt='("PCG=",E13.6)') xcg
1381 WRITE(unit=kluout,fmt='("PDG=",E13.6)') xdg
1382 WRITE(unit=kluout,fmt='("PCS=",E13.6)') xcs
1383 WRITE(unit=kluout,fmt='("PDS=",E13.6)') xds
1384 WRITE(unit=kluout,fmt='("PFVELOS=",E13.6)') xfvelos
1385 WRITE(unit=kluout,fmt='("PDRYLBDAG_MAX=",E13.6)') &
1386 rain_ice_paramn%XDRYLBDAG_MAX
1387 WRITE(unit=kluout,fmt='("PDRYLBDAS_MAX=",E13.6)') &
1388 rain_ice_paramn%XDRYLBDAS_MAX
1389 WRITE(unit=kluout,fmt='("PDRYLBDAG_MIN=",E13.6)') &
1390 rain_ice_paramn%XDRYLBDAG_MIN
1391 WRITE(unit=kluout,fmt='("PDRYLBDAS_MIN=",E13.6)') &
1392 rain_ice_paramn%XDRYLBDAS_MIN
1393 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1394 WRITE(unit=kluout,fmt='("!")')
1395 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_SDRYG) ) THEN")')
1396 DO j1 = 1 , rain_ice_paramn%NDRYLBDAG
1397 DO j2 = 1 , rain_ice_paramn%NDRYLBDAS
1398 WRITE(unit=kluout,fmt='("PKER_SDRYG(",I3,",",I3,") = ",E13.6)') &
1399 j1,j2,xker_sdryg(j1,j2)
1400 END DO
1401 END DO
1402 WRITE(unit=kluout,fmt='("END IF")')
1403 ELSE
1404 CALL read_xker_sdryg (kdrylbdag,kdrylbdas,knd, &
1405 palphag,pnug,palphas,pnus,pegs,pbs,pcg,pdg,pcs,pds,pfvelos, &
1406 pdrylbdag_max,pdrylbdas_max,pdrylbdag_min,pdrylbdas_min, &
1407 pfdinfty,xker_sdryg )
1408 !$acc update device(XKER_SDRYG)
1409 !
1410 WRITE(unit=kluout,fmt='(" Read XKER_SDRYG")')
1411END IF
1412!
1413!
1414ind = 50 ! Number of interval used to integrate the dimensional
1415zegr = 1.0 ! distributions when computing the kernel XKER_RDRYG
1416zfdinfty = 20.0
1417!
1418IF( .NOT.ASSOCIATED(xker_rdryg) ) THEN
1419 CALL rain_ice_param_allocate('XKER_RDRYG', rain_ice_paramn%NDRYLBDAG,rain_ice_paramn%NDRYLBDAR)
1420 !$acc enter data create(XKER_RDRYG)
1421END IF
1422!
1423CALL read_xker_rdryg (kdrylbdag,kdrylbdar,knd, &
1424 palphag,pnug,palphar,pnur,pegr,pbr,pcg,pdg,pcr,pdr, &
1425 pdrylbdag_max,pdrylbdar_max,pdrylbdag_min,pdrylbdar_min, &
1426 pfdinfty )
1427IF( (kdrylbdag/=rain_ice_paramn%NDRYLBDAG) .OR. (kdrylbdar/=rain_ice_paramn%NDRYLBDAR) .OR. (knd/=ind) .OR. &
1428 (palphag/=xalphag) .OR. (pnug/=xnug) .OR. &
1429 (palphar/=xalphar) .OR. (pnur/=xnur) .OR. &
1430 (pegr/=zegr) .OR. (pbr/=xbr) .OR. &
1431 (pcg/=xcg) .OR. (pdg/=xdg) .OR. (pcr/=xcr) .OR. (pdr/=xdr) .OR. &
1432 (pdrylbdag_max/=rain_ice_paramn%XDRYLBDAG_MAX) .OR. (pdrylbdar_max/=rain_ice_paramn%XDRYLBDAR_MAX) .OR. &
1433 (pdrylbdag_min/=rain_ice_paramn%XDRYLBDAG_MIN) .OR. (pdrylbdar_min/=rain_ice_paramn%XDRYLBDAR_MIN) .OR. &
1434 (pfdinfty/=zfdinfty) ) THEN
1435 CALL rzcolx ( ind, xalphag, xnug, xalphar, xnur, &
1436 zegr, xbr, xcg, xdg, 0., xcr, xdr, 0., &
1437 rain_ice_paramn%XDRYLBDAG_MAX, rain_ice_paramn%XDRYLBDAR_MAX, &
1438 rain_ice_paramn%XDRYLBDAG_MIN, rain_ice_paramn%XDRYLBDAR_MIN, &
1439 zfdinfty, xker_rdryg )
1440 !$acc update device(XKER_RDRYG)
1441 WRITE(unit=kluout,fmt='("*****************************************")')
1442 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF RDRYG KERNELS ****")')
1443 WRITE(unit=kluout,fmt='("*****************************************")')
1444 WRITE(unit=kluout,fmt='("!")')
1445 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1446 WRITE(unit=kluout,fmt='("KDRYLBDAG=",I3)') rain_ice_paramn%NDRYLBDAG
1447 WRITE(unit=kluout,fmt='("KDRYLBDAR=",I3)') rain_ice_paramn%NDRYLBDAR
1448 WRITE(unit=kluout,fmt='("PALPHAG=",E13.6)') xalphag
1449 WRITE(unit=kluout,fmt='("PNUG=",E13.6)') xnug
1450 WRITE(unit=kluout,fmt='("PALPHAR=",E13.6)') xalphar
1451 WRITE(unit=kluout,fmt='("PNUR=",E13.6)') xnur
1452 WRITE(unit=kluout,fmt='("PEGR=",E13.6)') zegr
1453 WRITE(unit=kluout,fmt='("PBR=",E13.6)') xbr
1454 WRITE(unit=kluout,fmt='("PCG=",E13.6)') xcg
1455 WRITE(unit=kluout,fmt='("PDG=",E13.6)') xdg
1456 WRITE(unit=kluout,fmt='("PCR=",E13.6)') xcr
1457 WRITE(unit=kluout,fmt='("PDR=",E13.6)') xdr
1458 WRITE(unit=kluout,fmt='("PDRYLBDAG_MAX=",E13.6)') &
1459 rain_ice_paramn%XDRYLBDAG_MAX
1460 WRITE(unit=kluout,fmt='("PDRYLBDAR_MAX=",E13.6)') &
1461 rain_ice_paramn%XDRYLBDAR_MAX
1462 WRITE(unit=kluout,fmt='("PDRYLBDAG_MIN=",E13.6)') &
1463 rain_ice_paramn%XDRYLBDAG_MIN
1464 WRITE(unit=kluout,fmt='("PDRYLBDAR_MIN=",E13.6)') &
1465 rain_ice_paramn%XDRYLBDAR_MIN
1466 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1467 WRITE(unit=kluout,fmt='("!")')
1468 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_RDRYG) ) THEN")')
1469 DO j1 = 1 , rain_ice_paramn%NDRYLBDAG
1470 DO j2 = 1 , rain_ice_paramn%NDRYLBDAR
1471 WRITE(unit=kluout,fmt='("PKER_RDRYG(",I3,",",I3,") = ",E13.6)') &
1472 j1,j2,xker_rdryg(j1,j2)
1473 END DO
1474 END DO
1475 WRITE(unit=kluout,fmt='("END IF")')
1476 ELSE
1477 CALL read_xker_rdryg (kdrylbdag,kdrylbdar,knd, &
1478 palphag,pnug,palphar,pnur,pegr,pbr,pcg,pdg,pcr,pdr, &
1479 pdrylbdag_max,pdrylbdar_max,pdrylbdag_min,pdrylbdar_min, &
1480 pfdinfty,xker_rdryg )
1481 !$acc update device(XKER_RDRYG)
1482 WRITE(unit=kluout,fmt='(" Read XKER_RDRYG")')
1483END IF
1484
1485!
1486!
1487!-------------------------------------------------------------------------------
1488!
1489!* 9. CONSTANTS FOR THE FAST COLD PROCESSES FOR THE HAILSTONES
1490! --------------------------------------------------------
1491!
1492!* 9.2 Constants for the wet growth of the hailstones
1493!
1494!
1495!* 9.2.1 Constant for the cloud droplet and cloud ice collection
1496! by the hailstones
1497!
1498xcolih = 0.01 ! Collection efficiency of I+H
1499xcolexih = 0.1 ! Temperature factor of the I+H collection efficiency
1500xfweth = (xpi/4.0)*xcch*xch*(zrho00**xcexvt)*momg(xalphah,xnuh,xdh+2.0)
1501!
1502!* 9.2.2 Constants for the aggregate collection by the hailstones
1503!
1504xcolsh = 0.01 ! Collection efficiency of S+H
1505xcolexsh = 0.1 ! Temperature factor of the S+H collection efficiency
1506IF(.NOT. lnewcoeff) THEN
1507 xfsweth = (xpi/4.0)*xcch*xccs*xas*(zrho00_snow**xcexvt)
1508ELSE
1509 xfsweth = xns*(xpi/4.0)*xcch*xas*(zrho00_snow**xcexvt) ! Wurtz
1510ENDIF
1511!
1515!
1516!* 9.2.3 Constants for the graupel collection by the hailstones
1517!
1518xcolgh = 0.01 ! Collection efficiency of G+H
1519xcolexgh = 0.1 ! Temperature factor of the G+H collection efficiency
1520xfgweth = (xpi/4.0)*xcch*xccg*xag*(zrho00**xcexvt)
1521!
1525!
1526!* 9.2.3 bis Constants for the rain collection by the hailstones
1527!
1528xfrweth = (xpi/4.0)*xcch*xccr*xar*(zrho00**xcexvt)
1529!
1533!
1534! Notice: One magnitude of lambda discretized over 10 points
1535!
1536rain_ice_paramn%NWETLBDAS = 80
1537rain_ice_paramn%XWETLBDAS_MIN = 2.5e1 ! Minimal value of Lbda_s to tabulate XKER_SWETH
1538rain_ice_paramn%XWETLBDAS_MAX = 2.5e9 ! Maximal value of Lbda_s to tabulate XKER_SWETH
1539zrate = log(rain_ice_paramn%XWETLBDAS_MAX/rain_ice_paramn%XWETLBDAS_MIN)/real(rain_ice_paramn%NWETLBDAS-1)
1540rain_ice_paramn%XWETINTP1S = 1.0 / zrate
1541rain_ice_paramn%XWETINTP2S = 1.0 - log( rain_ice_paramn%XWETLBDAS_MIN ) / zrate
1542rain_ice_paramn%NWETLBDAG = 40
1543rain_ice_paramn%XWETLBDAG_MIN = 1.0e3 ! Min value of Lbda_g to tabulate XKER_GWETH
1544rain_ice_paramn%XWETLBDAG_MAX = 1.0e7 ! Max value of Lbda_g to tabulate XKER_GWETH
1545zrate = log(rain_ice_paramn%XWETLBDAG_MAX/rain_ice_paramn%XWETLBDAG_MIN)/real(rain_ice_paramn%NWETLBDAG-1)
1546rain_ice_paramn%XWETINTP1G = 1.0 / zrate
1547rain_ice_paramn%XWETINTP2G = 1.0 - log( rain_ice_paramn%XWETLBDAG_MIN ) / zrate
1548rain_ice_paramn%NWETLBDAR = 40
1549rain_ice_paramn%XWETLBDAR_MIN = 1.0e3 ! Minimal value of Lbda_r to tabulate XKER_RWETH
1550rain_ice_paramn%XWETLBDAR_MAX = 1.0e7 ! Maximal value of Lbda_r to tabulate XKER_RWETH
1551zrate = log(rain_ice_paramn%XWETLBDAR_MAX/rain_ice_paramn%XWETLBDAR_MIN)/real(rain_ice_paramn%NWETLBDAR-1)
1552rain_ice_paramn%XWETINTP1R = 1.0 / zrate
1553rain_ice_paramn%XWETINTP2R = 1.0 - log( rain_ice_paramn%XWETLBDAR_MIN ) / zrate
1554rain_ice_paramn%NWETLBDAH = 40
1555rain_ice_paramn%XWETLBDAH_MIN = 1.0e3 ! Min value of Lbda_h to tabulate XKER_SWETH,XKER_GWETH,XKER_RWETH
1556rain_ice_paramn%XWETLBDAH_MAX = 1.0e7 ! Max value of Lbda_h to tabulate XKER_SWETH,XKER_GWETH,XKER_RWETH
1557zrate = log(rain_ice_paramn%XWETLBDAH_MAX/rain_ice_paramn%XWETLBDAH_MIN)/real(rain_ice_paramn%NWETLBDAH-1)
1558rain_ice_paramn%XWETINTP1H = 1.0 / zrate
1559rain_ice_paramn%XWETINTP2H = 1.0 - log( rain_ice_paramn%XWETLBDAH_MIN ) / zrate
1560!
1561!* 9.2.4 Computations of the tabulated normalized kernels
1562!
1563ind = 50 ! Interval number, collection efficiency and infinite diameter
1564zehs = 1.0 ! factor used to integrate the dimensional distributions when
1565zfdinfty = 20.0 ! computing the kernels XKER_SWETH
1566!
1567IF( .NOT.ASSOCIATED(xker_sweth) ) CALL rain_ice_param_allocate('XKER_SWETH', rain_ice_paramn%NWETLBDAH,rain_ice_paramn%NWETLBDAS)
1568!
1569CALL read_xker_sweth (kwetlbdah,kwetlbdas,knd, &
1570 palphah,pnuh,palphas,pnus,pehs,pbs,pch,pdh,pcs,pds,pfvelos, &
1571 pwetlbdah_max,pwetlbdas_max,pwetlbdah_min,pwetlbdas_min, &
1572 pfdinfty )
1573IF( (kwetlbdah/=rain_ice_paramn%NWETLBDAH) .OR. (kwetlbdas/=rain_ice_paramn%NWETLBDAS) .OR. (knd/=ind) .OR. &
1574 (palphah/=xalphah) .OR. (pnuh/=xnuh) .OR. &
1575 (palphas/=xalphas) .OR. (pnus/=xnus) .OR. &
1576 (pehs/=zehs) .OR. (pbs/=xbs) .OR. &
1577 (pch/=xch) .OR. (pdh/=xdh) .OR. (pcs/=xcs) .OR. (pds/=xds) .OR. (pfvelos/=xfvelos) .OR. &
1578 (pwetlbdah_max/=rain_ice_paramn%XWETLBDAH_MAX) .OR. (pwetlbdas_max/=rain_ice_paramn%XWETLBDAS_MAX) .OR. &
1579 (pwetlbdah_min/=rain_ice_paramn%XWETLBDAH_MIN) .OR. (pwetlbdas_min/=rain_ice_paramn%XWETLBDAS_MIN) .OR. &
1580 (pfdinfty/=zfdinfty) ) THEN
1581 CALL rzcolx ( ind, xalphah, xnuh, xalphas, xnus, &
1582 zehs, xbs, xch, xdh, 0., xcs, xds, xfvelos, &
1583 rain_ice_paramn%XWETLBDAH_MAX, rain_ice_paramn%XWETLBDAS_MAX, &
1584 rain_ice_paramn%XWETLBDAH_MIN, rain_ice_paramn%XWETLBDAS_MIN, &
1585 zfdinfty, xker_sweth )
1586 WRITE(unit=kluout,fmt='("*****************************************")')
1587 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF SWETH KERNELS ****")')
1588 WRITE(unit=kluout,fmt='("*****************************************")')
1589 WRITE(unit=kluout,fmt='("!")')
1590 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1591 WRITE(unit=kluout,fmt='("KWETLBDAH=",I3)') rain_ice_paramn%NWETLBDAH
1592 WRITE(unit=kluout,fmt='("KWETLBDAS=",I3)') rain_ice_paramn%NWETLBDAS
1593 WRITE(unit=kluout,fmt='("PALPHAH=",E13.6)') xalphah
1594 WRITE(unit=kluout,fmt='("PNUH=",E13.6)') xnuh
1595 WRITE(unit=kluout,fmt='("PALPHAS=",E13.6)') xalphas
1596 WRITE(unit=kluout,fmt='("PNUS=",E13.6)') xnus
1597 WRITE(unit=kluout,fmt='("PEHS=",E13.6)') zehs
1598 WRITE(unit=kluout,fmt='("PBS=",E13.6)') xbs
1599 WRITE(unit=kluout,fmt='("PCH=",E13.6)') xch
1600 WRITE(unit=kluout,fmt='("PDH=",E13.6)') xdh
1601 WRITE(unit=kluout,fmt='("PCS=",E13.6)') xcs
1602 WRITE(unit=kluout,fmt='("PDS=",E13.6)') xds
1603 WRITE(unit=kluout,fmt='("PFVELOS=",E13.6)') xfvelos
1604 WRITE(unit=kluout,fmt='("PWETLBDAH_MAX=",E13.6)') &
1605 rain_ice_paramn%XWETLBDAH_MAX
1606 WRITE(unit=kluout,fmt='("PWETLBDAS_MAX=",E13.6)') &
1607 rain_ice_paramn%XWETLBDAS_MAX
1608 WRITE(unit=kluout,fmt='("PWETLBDAH_MIN=",E13.6)') &
1609 rain_ice_paramn%XWETLBDAH_MIN
1610 WRITE(unit=kluout,fmt='("PWETLBDAS_MIN=",E13.6)') &
1611 rain_ice_paramn%XWETLBDAS_MIN
1612 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1613 WRITE(unit=kluout,fmt='("!")')
1614 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_SWETH) ) THEN")')
1615 DO j1 = 1 , rain_ice_paramn%NWETLBDAH
1616 DO j2 = 1 , rain_ice_paramn%NWETLBDAS
1617 WRITE(unit=kluout,fmt='("PKER_SWETH(",I3,",",I3,") = ",E13.6)') &
1618 j1,j2,xker_sweth(j1,j2)
1619 END DO
1620 END DO
1621 WRITE(unit=kluout,fmt='("END IF")')
1622 ELSE
1623 CALL read_xker_sweth (kwetlbdah,kwetlbdas,knd, &
1624 palphah,pnuh,palphas,pnus,pehs,pbs,pch,pdh,pcs,pds,pfvelos, &
1625 pwetlbdah_max,pwetlbdas_max,pwetlbdah_min,pwetlbdas_min, &
1626 pfdinfty,xker_sweth )
1627 WRITE(unit=kluout,fmt='(" Read XKER_SWETH")')
1628END IF
1629!
1630!
1631ind = 50 ! Number of interval used to integrate the dimensional
1632zehg = 1.0 ! distributions when computing the kernel XKER_GWETH
1633zfdinfty = 20.0
1634!
1635IF( .NOT.ASSOCIATED(xker_gweth) ) CALL rain_ice_param_allocate('XKER_GWETH', rain_ice_paramn%NWETLBDAH,rain_ice_paramn%NWETLBDAG)
1636!
1637CALL read_xker_gweth (kwetlbdah,kwetlbdag,knd, &
1638 palphah,pnuh,palphag,pnug,pehg,pbg,pch,pdh,pcg,pdg, &
1639 pwetlbdah_max,pwetlbdag_max,pwetlbdah_min,pwetlbdag_min, &
1640 pfdinfty )
1641IF( (kwetlbdah/=rain_ice_paramn%NWETLBDAH) .OR. (kwetlbdag/=rain_ice_paramn%NWETLBDAG) .OR. (knd/=ind) .OR. &
1642 (palphah/=xalphah) .OR. (pnuh/=xnuh) .OR. &
1643 (palphag/=xalphag) .OR. (pnug/=xnug) .OR. &
1644 (pehg/=zehg) .OR. (pbg/=xbg) .OR. &
1645 (pch/=xch) .OR. (pdh/=xdh) .OR. (pcg/=xcg) .OR. (pdg/=xdg) .OR. &
1646 (pwetlbdah_max/=rain_ice_paramn%XWETLBDAH_MAX) .OR. (pwetlbdag_max/=rain_ice_paramn%XWETLBDAG_MAX) .OR. &
1647 (pwetlbdah_min/=rain_ice_paramn%XWETLBDAH_MIN) .OR. (pwetlbdag_min/=rain_ice_paramn%XWETLBDAG_MIN) .OR. &
1648 (pfdinfty/=zfdinfty) ) THEN
1649 CALL rzcolx ( ind, xalphah, xnuh, xalphag, xnug, &
1650 zehg, xbg, xch, xdh, 0., xcg, xdg, 0., &
1651 rain_ice_paramn%XWETLBDAH_MAX, rain_ice_paramn%XWETLBDAG_MAX, &
1652 rain_ice_paramn%XWETLBDAH_MIN, rain_ice_paramn%XWETLBDAG_MIN, &
1653 zfdinfty, xker_gweth )
1654 WRITE(unit=kluout,fmt='("*****************************************")')
1655 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF GWETH KERNELS ****")')
1656 WRITE(unit=kluout,fmt='("*****************************************")')
1657 WRITE(unit=kluout,fmt='("!")')
1658 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1659 WRITE(unit=kluout,fmt='("KWETLBDAH=",I3)') rain_ice_paramn%NWETLBDAH
1660 WRITE(unit=kluout,fmt='("KWETLBDAG=",I3)') rain_ice_paramn%NWETLBDAG
1661 WRITE(unit=kluout,fmt='("PALPHAH=",E13.6)') xalphah
1662 WRITE(unit=kluout,fmt='("PNUH=",E13.6)') xnuh
1663 WRITE(unit=kluout,fmt='("PALPHAG=",E13.6)') xalphag
1664 WRITE(unit=kluout,fmt='("PNUG=",E13.6)') xnug
1665 WRITE(unit=kluout,fmt='("PEHG=",E13.6)') zehg
1666 WRITE(unit=kluout,fmt='("PBG=",E13.6)') xbg
1667 WRITE(unit=kluout,fmt='("PCH=",E13.6)') xch
1668 WRITE(unit=kluout,fmt='("PDH=",E13.6)') xdh
1669 WRITE(unit=kluout,fmt='("PCG=",E13.6)') xcg
1670 WRITE(unit=kluout,fmt='("PDG=",E13.6)') xdg
1671 WRITE(unit=kluout,fmt='("PWETLBDAH_MAX=",E13.6)') &
1672 rain_ice_paramn%XWETLBDAH_MAX
1673 WRITE(unit=kluout,fmt='("PWETLBDAG_MAX=",E13.6)') &
1674 rain_ice_paramn%XWETLBDAG_MAX
1675 WRITE(unit=kluout,fmt='("PWETLBDAH_MIN=",E13.6)') &
1676 rain_ice_paramn%XWETLBDAH_MIN
1677 WRITE(unit=kluout,fmt='("PWETLBDAG_MIN=",E13.6)') &
1678 rain_ice_paramn%XWETLBDAG_MIN
1679 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1680 WRITE(unit=kluout,fmt='("!")')
1681 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_GWETH) ) THEN")')
1682 DO j1 = 1 , rain_ice_paramn%NWETLBDAH
1683 DO j2 = 1 , rain_ice_paramn%NWETLBDAG
1684 WRITE(unit=kluout,fmt='("PKER_GWETH(",I3,",",I3,") = ",E13.6)') &
1685 j1,j2,xker_gweth(j1,j2)
1686 END DO
1687 END DO
1688 WRITE(unit=kluout,fmt='("END IF")')
1689 ELSE
1690 CALL read_xker_gweth (kwetlbdah,kwetlbdag,knd, &
1691 palphah,pnuh,palphag,pnug,pehg,pbg,pch,pdh,pcg,pdg, &
1692 pwetlbdah_max,pwetlbdag_max,pwetlbdah_min,pwetlbdag_min, &
1693 pfdinfty,xker_gweth )
1694 WRITE(unit=kluout,fmt='(" Read XKER_GWETH")')
1695END IF
1696!
1697!
1698ind = 50 ! Number of interval used to integrate the dimensional
1699zehr = 1.0 ! distributions when computing the kernel XKER_RWETH
1700zfdinfty = 20.0
1701!
1702IF( .NOT.ASSOCIATED(xker_rweth) ) CALL rain_ice_param_allocate('XKER_RWETH', rain_ice_paramn%NWETLBDAH,rain_ice_paramn%NWETLBDAR)
1703!
1704CALL read_xker_rweth (kwetlbdah,kwetlbdar,knd, &
1705 palphah,pnuh,palphar,pnur,pehr,pbr,pch,pdh,pcr,pdr, &
1706 pwetlbdah_max,pwetlbdar_max,pwetlbdah_min,pwetlbdar_min, &
1707 pfdinfty )
1708IF( (kwetlbdah/=rain_ice_paramn%NWETLBDAH) .OR. (kwetlbdar/=rain_ice_paramn%NWETLBDAR) .OR. (knd/=ind) .OR. &
1709 (palphah/=xalphah) .OR. (pnuh/=xnuh) .OR. &
1710 (palphar/=xalphar) .OR. (pnur/=xnur) .OR. &
1711 (pehr/=zehr) .OR. (pbr/=xbr) .OR. &
1712 (pch/=xch) .OR. (pdh/=xdh) .OR. (pcr/=xcr) .OR. (pdr/=xdr) .OR. &
1713 (pwetlbdah_max/=rain_ice_paramn%XWETLBDAH_MAX) .OR. (pwetlbdar_max/=rain_ice_paramn%XWETLBDAR_MAX) .OR. &
1714 (pwetlbdah_min/=rain_ice_paramn%XWETLBDAH_MIN) .OR. (pwetlbdar_min/=rain_ice_paramn%XWETLBDAR_MIN) .OR. &
1715 (pfdinfty/=zfdinfty) ) THEN
1716 CALL rzcolx ( ind, xalphah, xnuh, xalphar, xnur, &
1717 zehr, xbr, xch, xdh, 0., xcr, xdr, 0., &
1718 rain_ice_paramn%XWETLBDAH_MAX, rain_ice_paramn%XWETLBDAR_MAX, &
1719 rain_ice_paramn%XWETLBDAH_MIN, rain_ice_paramn%XWETLBDAR_MIN, &
1720 zfdinfty, xker_rweth )
1721 WRITE(unit=kluout,fmt='("*****************************************")')
1722 WRITE(unit=kluout,fmt='("**** UPDATE NEW SET OF RWETH KERNELS ****")')
1723 WRITE(unit=kluout,fmt='("*****************************************")')
1724 WRITE(unit=kluout,fmt='("!")')
1725 WRITE(unit=kluout,fmt='("KND=",I3)') ind
1726 WRITE(unit=kluout,fmt='("KWETLBDAH=",I3)') rain_ice_paramn%NWETLBDAH
1727 WRITE(unit=kluout,fmt='("KWETLBDAR=",I3)') rain_ice_paramn%NWETLBDAR
1728 WRITE(unit=kluout,fmt='("PALPHAH=",E13.6)') xalphah
1729 WRITE(unit=kluout,fmt='("PNUH=",E13.6)') xnuh
1730 WRITE(unit=kluout,fmt='("PALPHAR=",E13.6)') xalphar
1731 WRITE(unit=kluout,fmt='("PNUR=",E13.6)') xnur
1732 WRITE(unit=kluout,fmt='("PEHR=",E13.6)') zehr
1733 WRITE(unit=kluout,fmt='("PBR=",E13.6)') xbr
1734 WRITE(unit=kluout,fmt='("PCH=",E13.6)') xch
1735 WRITE(unit=kluout,fmt='("PDH=",E13.6)') xdh
1736 WRITE(unit=kluout,fmt='("PCR=",E13.6)') xcr
1737 WRITE(unit=kluout,fmt='("PDR=",E13.6)') xdr
1738 WRITE(unit=kluout,fmt='("PWETLBDAH_MAX=",E13.6)') &
1739 rain_ice_paramn%XWETLBDAH_MAX
1740 WRITE(unit=kluout,fmt='("PWETLBDAR_MAX=",E13.6)') &
1741 rain_ice_paramn%XWETLBDAR_MAX
1742 WRITE(unit=kluout,fmt='("PWETLBDAH_MIN=",E13.6)') &
1743 rain_ice_paramn%XWETLBDAH_MIN
1744 WRITE(unit=kluout,fmt='("PWETLBDAR_MIN=",E13.6)') &
1745 rain_ice_paramn%XWETLBDAR_MIN
1746 WRITE(unit=kluout,fmt='("PFDINFTY=",E13.6)') zfdinfty
1747 WRITE(unit=kluout,fmt='("!")')
1748 WRITE(unit=kluout,fmt='("IF( PRESENT(PKER_RWETH) ) THEN")')
1749 DO j1 = 1 , rain_ice_paramn%NWETLBDAH
1750 DO j2 = 1 , rain_ice_paramn%NWETLBDAR
1751 WRITE(unit=kluout,fmt='("PKER_RWETH(",I3,",",I3,") = ",E13.6)') &
1752 j1,j2,xker_rweth(j1,j2)
1753 END DO
1754 END DO
1755 WRITE(unit=kluout,fmt='("END IF")')
1756 ELSE
1757 CALL read_xker_rweth (kwetlbdah,kwetlbdar,knd, &
1758 palphah,pnuh,palphar,pnur,pehr,pbr,pch,pdh,pcr,pdr, &
1759 pwetlbdah_max,pwetlbdar_max,pwetlbdah_min,pwetlbdar_min, &
1760 pfdinfty,xker_rweth )
1761 WRITE(unit=kluout,fmt='(" Read XKER_RWETH")')
1762END IF
1763!
1764!
1765!-------------------------------------------------------------------------------
1766!
1767!* 10. SOME PRINTS FOR CONTROL
1768! -----------------------
1769!
1770!
1771gflag = .true.
1772IF (gflag) THEN
1773 WRITE(unit=kluout,fmt='(" Summary of the ice particule characteristics")')
1774 WRITE(unit=kluout,fmt='(" PRISTINE ICE")')
1775 WRITE(unit=kluout,fmt='(" masse: A=",E13.6," B=",E13.6)') &
1776 xai,xbi
1777 WRITE(unit=kluout,fmt='(" vitesse: C=",E13.6," D=",E13.6)') &
1778 xc_i,xdi
1779 WRITE(unit=kluout,fmt='(" distribution:AL=",E13.6,"NU=",E13.6)') &
1781 WRITE(unit=kluout,fmt='(" SNOW")')
1782 WRITE(unit=kluout,fmt='(" masse: A=",E13.6," B=",E13.6)') &
1783 xas,xbs
1784 WRITE(unit=kluout,fmt='(" vitesse: C=",E13.6," D=",E13.6)') &
1785 xcs,xds
1786 WRITE(unit=kluout,fmt='(" concentration:CC=",E13.6," x=",E13.6)') &
1787 xccs,xcxs
1788 WRITE(unit=kluout,fmt='(" distribution:AL=",E13.6,"NU=",E13.6)') &
1790 WRITE(unit=kluout,fmt='(" GRAUPEL")')
1791 WRITE(unit=kluout,fmt='(" masse: A=",E13.6," B=",E13.6)') &
1792 xag,xbg
1793 WRITE(unit=kluout,fmt='(" vitesse: C=",E13.6," D=",E13.6)') &
1794 xcg,xdg
1795 WRITE(unit=kluout,fmt='(" concentration:CC=",E13.6," x=",E13.6)') &
1796 xccg,xcxg
1797 WRITE(unit=kluout,fmt='(" distribution:AL=",E13.6,"NU=",E13.6)') &
1799 WRITE(unit=kluout,fmt='(" HAIL")')
1800 WRITE(unit=kluout,fmt='(" masse: A=",E13.6," B=",E13.6)') &
1801 xah,xbh
1802 WRITE(unit=kluout,fmt='(" vitesse: C=",E13.6," D=",E13.6)') &
1803 xch,xdh
1804 WRITE(unit=kluout,fmt='(" concentration:CC=",E13.6," x=",E13.6)') &
1805 xcch,xcxh
1806 WRITE(unit=kluout,fmt='(" distribution:AL=",E13.6,"NU=",E13.6)') &
1808END IF
1809IF (lhook) CALL dr_hook('INI_RAIN_ICE',1,zhook_handle)
1810CONTAINS
1811!
1812!-------------------------------------------------------------------------------
1813!
1814!
1815include "gamma.h"
1816include "momg.h"
1817END SUBROUTINE ini_rain_ice
1818
1819include "criauti.func.h"
1820
1821END MODULE mode_ini_rain_ice
elemental subroutine criauti(prcriauti, pt0criauti, pacriauti, pbcriauti)
Definition criauti.func.h:7
elemental real function gamma(px)
Definition gamma.h:14
elemental real(kind=mnhreal64) function gamma_dble(px)
Definition gamma.h:118
real function gamma_inc(pa, px)
Definition gamma_inc.F90:6
elemental real function momg(palpha, pnu, pp)
Definition momg.h:12
real, pointer xg
Definition modd_cst.F90:147
real, pointer xgamw
Definition modd_cst.F90:163
real, pointer xrv
Definition modd_cst.F90:153
real, pointer xbetaw
Definition modd_cst.F90:163
real, pointer xalpw
Definition modd_cst.F90:163
real, pointer xp00
Definition modd_cst.F90:148
real, pointer xrd
Definition modd_cst.F90:153
real, pointer xpi
Definition modd_cst.F90:139
real, pointer xrholw
Definition modd_cst.F90:156
real, dimension(ntb_r1), parameter xn0r_exp
real, parameter xbm_g
real, parameter xrho_g
real, parameter xmu_s
real, parameter xmu_i
real, parameter xd0g
real, parameter xbm_i
real, parameter xmu_g
real, dimension(ntb_in), parameter xnt_in
real, parameter xd0c
integer, parameter nbs
real, parameter xbv_c
real, parameter xrho_i
real, parameter xbv_i
integer, parameter nbr
real, dimension(ntb_r), parameter xr_r
real, parameter xbv_r
real, dimension(ntb_c), parameter xr_c
real, parameter xd0r
integer, parameter nbc
real, parameter xmu_r
logical, pointer lcriauti
character(len=4), pointer csedim
real, pointer xfracm90
logical, pointer lice_t
real, pointer xcriautc_nam
real, pointer xbcriauti_nam
logical, pointer lred
character(len=4), pointer cpristine_ice
real, pointer xcriauti_nam
logical, pointer lsnow_t
real, dimension(:), pointer xfrmin_nam
real, pointer xrdepsred_nam
real, pointer xrdepgred_nam
real, pointer xt0criauti_nam
real, pointer xacriauti_nam
integer, parameter mnhreal64
real, dimension(:), pointer xlbc
subroutine rain_ice_descr_allocate(krr)
type(rain_ice_descr_t), pointer, save rain_ice_descrn
real, dimension(:), pointer xrtmin
real, dimension(:), pointer xgaminc_rim1
real, dimension(:,:), pointer xker_rdryg
real, dimension(:), pointer xfrmin
real, dimension(:,:), pointer xker_rweth
real, dimension(:,:), pointer xker_raccss
type(rain_ice_param_t), pointer, save rain_ice_paramn
real, dimension(:,:), pointer xker_sweth
real, dimension(:,:), pointer xker_sdryg
real, dimension(:), pointer xgaminc_rim2
subroutine rain_ice_param_allocate(hname, kdim1, kdim2)
real, dimension(:,:), pointer xker_saccrg
integer, dimension(:), pointer nkpk
real, dimension(:), pointer xgaminc_rim4
real, dimension(:,:), pointer xker_raccs
real, dimension(:,:), pointer xker_gweth
real, dimension(:), pointer xfsedc
integer, dimension(:), pointer nkmk
subroutine ini_icet_freezeh2o(ice_t_parameters, rain_ice_descrn)
subroutine ini_icet_table_efrw(ice_t_parameters)
subroutine ini_icet_table_efsw(ice_t_parameters, rain_ice_descrn)
subroutine ini_rain_ice(d, hprogram, kluout, ptstep, pdzmin, ksplitr, hcloud, ice_t_parameters)
subroutine read_xker_gweth(kwetlbdah, kwetlbdag, knd, palphah, pnuh, palphag, pnug, pehg, pbg, pch, pdh, pcg, pdg, pwetlbdah_max, pwetlbdag_max, pwetlbdah_min, pwetlbdag_min, pfdinfty, pker_gweth)
subroutine read_xker_raccs(kacclbdas, kacclbdar, knd, palphas, pnus, palphar, pnur, pesr, pbs, pbr, pcs, pds, pfvelos, pcr, pdr, pacclbdas_max, pacclbdar_max, pacclbdas_min, pacclbdar_min, pfdinfty, pker_raccss, pker_raccs, pker_saccrg)
subroutine read_xker_rdryg(kdrylbdag, kdrylbdar, knd, palphag, pnug, palphar, pnur, pegr, pbr, pcg, pdg, pcr, pdr, pdrylbdag_max, pdrylbdar_max, pdrylbdag_min, pdrylbdar_min, pfdinfty, pker_rdryg)
subroutine read_xker_rweth(kwetlbdah, kwetlbdar, knd, palphah, pnuh, palphar, pnur, pehr, pbr, pch, pdh, pcr, pdr, pwetlbdah_max, pwetlbdar_max, pwetlbdah_min, pwetlbdar_min, pfdinfty, pker_rweth)
subroutine read_xker_sdryg(kdrylbdag, kdrylbdas, knd, palphag, pnug, palphas, pnus, pegs, pbs, pcg, pdg, pcs, pds, pfvelos, pdrylbdag_max, pdrylbdas_max, pdrylbdag_min, pdrylbdas_min, pfdinfty, pker_sdryg)
subroutine read_xker_sweth(kwetlbdah, kwetlbdas, knd, palphah, pnuh, palphas, pnus, pehs, pbs, pch, pdh, pcs, pds, pfvelos, pwetlbdah_max, pwetlbdas_max, pwetlbdah_min, pwetlbdas_min, pfdinfty, pker_sweth)
subroutine rrcolss(knd, palphas, pnus, palphar, pnur, pesr, pexmassr, pfalls, pexfalls, pfallexps, pfallr, pexfallr, plbdasmax, plbdarmax, plbdasmin, plbdarmin, pdinfty, prrcolss, pag, pbs, pas)
subroutine rscolrg(knd, palphas, pznus, palphar, pnur, pesr, pexmasss, pfalls, pexfalls, pfallexps, pfallr, pexfallr, plbdasmax, plbdarmax, plbdasmin, plbdarmin, pdinfty, prscolrg, pag, pbs, pas)
subroutine rzcolx(knd, palphax, pnux, palphaz, pnuz, pexz, pexmassz, pfallx, pexfallx, pfallexpx, pfallz, pexfallz, pfallexpz, plbdaxmax, plbdazmax, plbdaxmin, plbdazmin, pdinfty, przcolx)