CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
radiation_clouds.f
1
4
5! module_radiation_clouds description !!!!!
6! ========================================================== !!!!!
7! !
8! the 'radiation_clouds.f' contains: !
9! !
10! 'module_radiation_clouds' --- compute cloud related quantities!
11! for radiation computations !
12! !
13! the following are the externally accessable subroutines: !
14! !
15! 'cld_init' --- initialization routine !
16! inputs: !
17! ( si, NLAY, imp_physics, me ) !
18! outputs: !
19! ( errflg, errmsg ) !
20! !
21! 'radiation_clouds_prop' --- radiation cloud properties !
22! obtained from various cloud schemes !
23! inputs: !
24! (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly, !
25! ccnd, ncndl, cnvw, cnvc, tracer1, !
26! xlat,xlon,slmsk,dz,delp, IX, LM, NLAY, NLP1, !
27! deltaq, sup, me, icloud, kdt, !
28! ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ntclamt, !
29! imp_physics, imp_physics_nssl, imp_physics_fer_hires, !
30! imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, !
31! imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, !
32! imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, !
33! iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, !
34! idcor_hogan, idcor_oreopoulos, !
35! imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, do_mynnedmf, lgfdlmprad, !
36! uni_cld, lmfshal, lmfdeep2, cldcov, clouds1, !
37! effrl, effri, effrr, effrs, effr_in, !
38! effrl_inout, effri_inout, effrs_inout, !
39! lwp_ex, iwp_ex, lwp_fc, iwp_fc, !
40! dzlay, latdeg, julian, yearlen, gridkm, !
41! outputs: !
42! cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, !
43! cld_rwp, cld_rerain, cld_swp, cld_resnow, !
44! clds,mtop,mbot,de_lgth,alpha) !
45! !
46! internal/external accessable subroutines: !
47! 'progcld_zhao_carr' --- zhao/moorthi prognostic cloud scheme !
48! 'progcld_zhao_carr_pdf' --- zhao/moorthi prognostic cloud + pdfcld !
49! 'progcld_gfdl_lin' --- GFDL-Lin cloud microphysics !
50! 'progcld_fer_hires' --- Ferrier-Aligo cloud microphysics !
51! 'progcld_thompson_wsm6' --- Thompson/wsm6 cloud microphysics (EMC) !
52! 'progclduni' --- MG2/3 cloud microphysics !
53! (with/without SHOC) (EMC) !
54! also used by GFDL MP (EMC) !
55! 'progcld_thompson' --- Thompson MP (added by G. Thompson) !
56! 'gethml' --- get diagnostic hi, mid, low clouds !
57! !
58! cloud property array description: !
59! cld_frac (:,:) - layer total cloud fraction !
60! cld_lwp (:,:) - layer cloud liq water path !
61! cld_reliq (:,:) - mean effective radius for liquid cloud !
62! cld_iwp (:,:) - layer cloud ice water path !
63! cld_reice (:,:) - mean effective radius for ice cloud !
64! cld_rwp (:,:) - layer rain drop water path !
65! cld_rerain(:,:) - mean effective radius for rain drop !
66! ** cld_swp (:,:) - layer snow flake water path !
67! cld_resnow(:,:) - mean effective radius for snow flake !
68! ** fu's scheme need to be normalized by snow density (g/m**3/1.0e6)!
69! !
70! external modules referenced: !
71! 'module module_microphysics' in 'module_bfmicrophysics.f' !
72! !
73! program history log: !
74! nov 1992, y.h., k.a.c, a.k. - cloud parameterization !
75! 'cldjms' patterned after slingo and slingo's work (jgr, !
76! 1992), stratiform clouds are allowed in any layer except !
77! the surface and upper stratosphere. the relative humidity !
78! criterion may cery in different model layers. !
79! mar 1993, kenneth campana - created original crhtab tables !
80! for critical rh look up references.
81! feb 1994, kenneth campana - modified to use only one table !
82! for all forecast hours. !
83! oct 1995, kenneth campana - tuned cloud rh curves !
84! rh-cld relation from tables created using mitchell-hahn !
85! tuning technique on airforce rtneph observations. !
86! nov 1995, kenneth campana - the bl relationships used !
87! below llyr, except in marine stratus regions. !
88! apr 1996, kenneth campana - save bl cld amt in cld(,5) !
89! aug 1997, kenneth campana - smooth out last bunch of bins !
90! of the rh look up tables !
91! dec 1998, s. moorthi - added prognostic cloud method !
92! apr 2003, yu-tai hou - rewritten in frotran 90 !
93! modulized form 'module_rad_clouds' from combining the original!
94! subroutines 'cldjms', 'cldprp', and 'gcljms'. and seperated !
95! prognostic and diagnostic methods into two packages. !
96! --- 2003, s. moorthi - adapted b. ferrier's prognostic !
97! cloud scheme to ncep gfs model as additional option. !
98! apr 2004, yu-tai hou - separated calculation of the !
99! averaged h,m,l,bl cloud amounts from each of the cld schemes !
100! to become an shared individule subprogram 'gethml'. !
101! apr 2005, yu-tai hou - modified cloud array and module !
102! structures. !
103! dec 2008, yu-tai hou - changed low-cld calculation, !
104! now cantains clds from sfc layer and upward to the low/mid !
105! boundary (include bl-cld). h,m,l clds domain boundaries are !
106! adjusted for better agreement with observations. !
107! jan 2011, yu-tai hou - changed virtual temperature !
108! as input variable instead of originally computed inside the !
109! two prognostic cld schemes 'progcld_zhao_carr' !
110! aug 2012, yu-tai hou - modified subroutine cld_init !
111! to pass all fixed control variables at the start. and set !
112! their correponding internal module variables to be used by !
113! module subroutines. !
114! nov 2012, yu-tai hou - modified control parameters !
115! thru module 'physparam'. !
116! apr 2013, h.lin/y.hou - corrected error in calculating !
117! llyr for different vertical indexing directions. !
118! jul 2013, r. sun/h. pan - modified to use pdf cloud and !
119! convective cloud cover and water for radiation !
120! !
121! jul 2014 s. moorthi - merging with gfs version !
122! feb 2017 a. cheng - add odepth output, effective radius input !
123! Jan 2018 S Moorthi - update to include physics from ipdv4 !
124! jun 2018 h-m lin/y-t hou - removed the legacy subroutine !
125! 'diagcld1' for diagnostic cloud scheme, added new cloud !
126! overlapping method of de-correlation length, and optimized !
127! the code structure. !
128! jul 2020, m.j. iacono - added rrtmg/mcica cloud overlap options !
129! exponential and exponential-random. each method can use !
130! either a constant or a latitude-varying and day-of-year !
131! varying decorrelation length selected with parameter "idcor". !
132! !
133! Jan 2022, Q.Liu - add subroutine radiation_clouds_prop, and !
134! move all the subroutine call "progcld*" from !
135! GFS_rrtmg_pre.F90 to this new subroutine !
136!!!!! ========================================================== !!!!!
137!!!!! end descriptions !!!!!
138!!!!! ========================================================== !!!!!
139
164
167!
168 use module_iounitdef, only : nicltun
170 & get_alpha_exper
171 use machine, only : kind_phys
172!
173 implicit none
174!
175 private
176
177! --- version tag and last revision date
178 character(40), parameter :: &
179 & VTAGCLD='NCEP-Radiation_clouds v5.1 Nov 2012 '
180! & VTAGCLD='NCEP-Radiation_clouds v5.0 Aug 2012 '
181
182! --- set constant parameters
183 real (kind=kind_phys) :: gfac,gord
184
185 integer, parameter, public :: nf_clds = 9
186 integer, parameter, public :: nk_clds = 3
187
188! pressure limits of cloud domain interfaces (low,mid,high) in mb (0.1kPa)
189 real (kind=kind_phys), save :: ptopc(nk_clds+1,2)
191
192!org data ptopc / 1050., 642., 350., 0.0, 1050., 750., 500., 0.0 /
193 data ptopc / 1050., 650., 400., 0.0, 1050., 750., 500., 0.0 /
194
195! real (kind=kind_phys), parameter :: climit = 0.01
196 real (kind=kind_phys), parameter :: climit = 0.001, climit2=0.05
197 real (kind=kind_phys), parameter :: ovcst = 1.0 - 1.0e-8
198
199 real (kind=kind_phys), parameter :: reliq_def = 10.0
200 real (kind=kind_phys), parameter :: reice_def = 50.0
201 real (kind=kind_phys), parameter :: rrain_def = 1000.0
202 real (kind=kind_phys), parameter :: rsnow_def = 250.0
203
204 real (kind=kind_phys), parameter :: cldssa_def = 0.99
205 real (kind=kind_phys), parameter :: cldasy_def = 0.84
206
207 integer :: llyr = 2
208
209 ! Default ice crystal sizes vs. temperature following Kristjansson and Mitchell
210 real (kind=kind_phys), dimension(95), parameter :: retab =(/ &
211 & 5.92779, 6.26422, 6.61973, 6.99539, 7.39234, &
212 & 7.81177, 8.25496, 8.72323, 9.21800, 9.74075, 10.2930, &
213 & 10.8765, 11.4929, 12.1440, 12.8317, 13.5581, 14.2319, &
214 & 15.0351, 15.8799, 16.7674, 17.6986, 18.6744, 19.6955, &
215 & 20.7623, 21.8757, 23.0364, 24.2452, 25.5034, 26.8125, &
216 & 27.7895, 28.6450, 29.4167, 30.1088, 30.7306, 31.2943, &
217 & 31.8151, 32.3077, 32.7870, 33.2657, 33.7540, 34.2601, &
218 & 34.7892, 35.3442, 35.9255, 36.5316, 37.1602, 37.8078, &
219 & 38.4720, 39.1508, 39.8442, 40.5552, 41.2912, 42.0635, &
220 & 42.8876, 43.7863, 44.7853, 45.9170, 47.2165, 48.7221, &
221 & 50.4710, 52.4980, 54.8315, 57.4898, 60.4785, 63.7898, &
222 & 65.5604, 71.2885, 75.4113, 79.7368, 84.2351, 88.8833, &
223 & 93.6658, 98.5739, 103.603, 108.752, 114.025, 119.424, &
224 & 124.954, 130.630, 136.457, 142.446, 148.608, 154.956, &
225 & 161.503, 168.262, 175.248, 182.473, 189.952, 197.699, &
226 & 205.728, 214.055, 222.694, 231.661, 240.971, 250.639/)
227
234
235! =================
236 contains
237! =================
238
254 subroutine cld_init &
255 & ( si, nlay, imp_physics, me, con_g, con_rd, errflg, errmsg )
256! =================================================================== !
257! !
258! abstract: cld_init is an initialization program for cloud-radiation !
259! calculations. it sets up boundary layer cloud top. !
260! !
261! !
262! inputs: !
263! si (L+1) : model vertical sigma layer interface !
264! NLAY : vertical layer number !
265! imp_physics : MP identifier !
266! me : print control flag !
267! imp_physics : cloud microphysics scheme control flag !
268! !
269! outputs: !
270! errflg : CCPP error flag !
271! errmsg : CCPP error message !
272! !
273! usage: call cld_init !
274! !
275! subroutines called: rhtable !
276! !
277! =================================================================== !
278!
279 implicit none
280
281! --- inputs:
282 integer, intent(in) :: nlay, me, imp_physics
283
284 real (kind=kind_phys), intent(in) :: si(:), con_g, con_rd
285
286! --- outputs:
287 integer, intent(out) :: errflg
288 character(len=*), intent(out) :: errmsg
289
290!
291!===> ... begin here
292!
293! Initialize CCPP error handling variables
294 errmsg = ''
295 errflg = 0
296
297 ! Initialze module parameters
298 gfac = 1.0e5/con_g
299 gord = con_g/con_rd
300
301 if (me == 0) then
302 print *, vtagcld !print out version tag
303 print *,' - Using Prognostic Cloud Method'
304 if (imp_physics == 99) then
305 print *,' --- Zhao/Carr/Sundqvist microphysics'
306 elseif (imp_physics == 98) then
307 print *,' --- zhao/carr/sundqvist + pdf cloud'
308 elseif (imp_physics == 11) then
309 print *,' --- GFDL Lin cloud microphysics'
310 elseif (imp_physics == 8) then
311 print *,' --- Thompson cloud microphysics'
312 elseif (imp_physics == 6) then
313 print *,' --- WSM6 cloud microphysics'
314 elseif (imp_physics == 10) then
315 print *,' --- MG cloud microphysics'
316 elseif (imp_physics == 15) then
317 print *,' --- Ferrier-Aligo cloud microphysics'
318 elseif (imp_physics == 17) then
319 print *,' --- NSSL cloud microphysics'
320 else
321 print *,' !!! ERROR in cloud microphysc specification!!!', &
322 & ' imp_physics (NP3D) =',imp_physics
323 errflg = 1
324 errmsg = 'ERROR(cld_init): cloud mp specification is not'// &
325 & ' valid'
326 return
327 endif
328 endif
329!
330 return
331!...................................
332 end subroutine cld_init
333!-----------------------------------
334
339 & ( plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs:
340 & ccnd, ncndl, cnvw, cnvc, tracer1, &
341 & xlat, xlon, slmsk, dz, delp, ix, lm, nlay, nlp1, &
342 & deltaq, sup, dcorr_con, me, icloud, kdt, &
343 & ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ntclamt, &
344 & imp_physics, imp_physics_nssl, imp_physics_fer_hires, &
345 & imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, &
346 & imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, &
347 & imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, &
348 & iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, &
349 & idcor_hogan, idcor_oreopoulos, lcrick, lcnorm, &
350 & imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, &
351 & do_mynnedmf, lgfdlmprad, xr_cnvcld, &
352 & uni_cld, lmfshal, lmfdeep2, cldcov, clouds1, &
353 & effrl, effri, effrr, effrs, effr_in, &
354 & effrl_inout, effri_inout, effrs_inout, &
355 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
356 & dzlay, latdeg, julian, yearlen, gridkm, top_at_1, si, &
357 & con_ttp, con_pi, con_g, con_rd, con_thgni, &
358 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, & ! --- outputs:
359 & cld_rwp, cld_rerain, cld_swp, cld_resnow, &
360 & clds, mtop, mbot, de_lgth, alpha &
361 & )
362
363! ================= subprogram documentation block ================ !
364! !
365! subprogram: radiation_clouds_prop computes cloud related quantities using !
366! zhao/moorthi's prognostic cloud microphysics scheme. !
367! !
368! abstract: this program computes cloud fractions from cloud !
369! condensates, calculates liquid/ice cloud droplet effective radius, !
370! and computes the low, mid, high, total and boundary layer cloud !
371! fractions and the vertical indices of low, mid, and high cloud !
372! top and base. the three vertical cloud domains are set up in the !
373! initial subroutine "cld_init". !
374! !
375! usage: call radiation_clouds_prop !
376! !
377! subprograms called: !
378! !
379! 'progcld_zhao_carr' --- zhao/moorthi prognostic cloud scheme !
380! 'progcld_zhao_carr_pdf' --- zhao/moorthi prognostic cloud + pdfcld !
381! 'progcld_gfdl_lin' --- GFDL-Lin cloud microphysics !
382! 'progcld_fer_hires' --- Ferrier-Aligo cloud microphysics !
383! 'progcld_thompson_wsm6' --- Thompson/wsm6 cloud microphysics (EMC) !
384! 'progclduni' --- MG cloud microphysics !
385! --- GFDL cloud microphysics (EMC) !
386! --- Thompson + MYNN PBL (or GF convection) !
387! 'progcld_thompson' --- Thompson MP (added by G. Thompson) !
388! 'gethml' --- get diagnostic hi, mid, low clouds !
389! !
390! attributes: !
391! language: fortran 90 !
392! machine: ibm-sp, sgi !
393! !
394! !
395! ==================== definition of variables ==================== !
396! !
397! input variables: !
398! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
399! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
400! tlyr (IX,NLAY) : model layer mean temperature in k !
401! tvly (IX,NLAY) : model layer virtual temperature in k !
402! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
403! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
404! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
405! ccnd (IX,NLAY,ncndl) : layer cloud condensate amount !
406! water, ice, rain, snow (+ graupel) !
407! ncndl : number of layer cloud condensate types (max of 4) !
408! cnvw (IX,NLAY) : layer convective cloud condensate !
409! cnvc (IX,NLAY) : layer convective cloud cover !
410! tracer1 (IX,NLAY,1:ntrac-1) : all tracers (except sphum) !
411! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
412! range, otherwise see in-line comment !
413! xlon (IX) : grid longitude in radians (not used) !
414! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
415! dz (ix,nlay) : layer thickness (km) !
416! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
417! IX : horizontal dimention !
418! LM,NLAY,NLP1 : vertical layer/level dimensions !
419! deltaq (ix,nlay), half total water distribution width !
420! sup supersaturation !
421! me print control flag !
422! icloud : cloud effect to the optical depth in radiation !
423! kdt : current time step index !
424! ntrac number of tracers (Model%ntrac) !
425! ntcw tracer index for cloud liquid water (Model%ntcw) !
426! ntiw tracer index for cloud ice water (Model%ntiw) !
427! ntrw tracer index for rain water (Model%ntrw) !
428! ntsw tracer index for snow water (Model%ntsw) !
429! ntgl tracer index for graupel (Model%ntgl) !
430! ntclamt tracer index for cloud amount (Model%ntclamt) !
431! imp_physics : cloud microphysics scheme control flag !
432! imp_physics_nssl : NSSL microphysics !
433! imp_physics_fer_hires : Ferrier-Aligo microphysics scheme !
434! imp_physics_gfdl : GFDL microphysics scheme !
435! imp_physics_thompson : Thompson microphysics scheme !
436! imp_physics_wsm6 : WSMG microphysics scheme !
437! imp_physics_zhao_carr : Zhao-Carr microphysics scheme !
438! imp_physics_zhao_carr_pdf : Zhao-Carr microphysics scheme with PDF clouds
439! imp_physics_mg : Morrison-Gettelman microphysics scheme !
440! iovr : choice of cloud-overlap !
441! iovr_rand : flag of cloud-overlap: random (=0) !
442! iovr_maxrand : flag of cloud-overlap: maximum random (=1) !
443! iovr_max : flag of cloud-overlap: maximum (=2) !
444! iovr_dcorr : flag of cloud-overlap: decorrelation length(=3) !
445! iovr_exp : flag of cloud-overlap: exponential (=4) !
446! iovr_exprand : flag of cloud-overlap: exponential random (=5) !
447! idcor : choice for decorrelation-length !
448! idcor_con : flag for decorrelation-length: Use constant value (=0)
449! idcor_hogan : flag for decorrelation-length: (=1) !
450! idcor_oreopoulos: flag for decorrelation-length: (=2) !
451! imfdeepcnv : flag for mass-flux deep convection scheme !
452! imfdeepcnv_gf : flag for scale- & aerosol-aware Grell-Freitas scheme (GSD)
453! imfdeepcnv_c3 : flag for unified convection scheme
454! do_mynnedmf : flag for MYNN-EDMF !
455! lgfdlmprad : flag for GFDLMP radiation interaction !
456! uni_cld : logical - true for cloud fraction from shoc !
457! lmfshal : logical - true for mass flux shallow convection !
458! lmfdeep2 : logical - true for mass flux deep convection !
459! top_at_1 : logical - true if ordered from toa-2-sfc !
460! cldcov : layer cloud fraction (used when uni_cld=.true. !
461! clouds1 : layer total cloud fraction
462! effrl, : effective radius for liquid water
463! effri, : effective radius for ice water
464! effrr, : effective radius for rain water
465! effrs, : effective radius for snow water
466! effr_in, : flag to use effective radii of cloud species in radiation
467! effrl_inout, : eff. radius of cloud liquid water particle
468! effri_inout, : eff. radius of cloud ice water particle
469! effrs_inout : effective radius of cloud snow particle
470! lwp_ex : total liquid water path from explicit microphysics
471! iwp_ex : total ice water path from explicit microphysics
472! lwp_fc : total liquid water path from cloud fraction scheme
473! iwp_fc : total ice water path from cloud fraction scheme
474! dzlay(ix,nlay) : thickness between model layer centers (km) !
475! latdeg(ix) : latitude (in degrees 90 -> -90) !
476! julian : day of the year (fractional julian day) !
477! yearlen : current length of the year (365/366 days) !
478! gridkm : grid length in km !
479! lmfshal : mass-flux shallow conv scheme flag !
480! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
481! lcrick : control flag for eliminating CRICK !
482! =t: apply layer smoothing to eliminate CRICK !
483! =f: do not apply layer smoothing !
484! lcnorm : control flag for in-cld condensate !
485! =t: normalize cloud condensate !
486! =f: not normalize cloud condensate !
487! !
488! output variables: !
489! cloud profiles: !
490! cld_frac (:,:) - layer total cloud fraction !
491! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
492! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
493! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
494! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
495! cld_rwp (:,:) - layer rain drop water path not assigned !
496! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
497! *** cld_swp (:,:) - layer snow flake water path not assigned !
498! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
499! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) !
500! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl !
501! mtop (IX,3) : vertical indices for low, mid, hi cloud tops !
502! mbot (IX,3) : vertical indices for low, mid, hi cloud bases !
503! de_lgth(ix) : clouds decorrelation length (km) !
504! alpha(ix,nlay) : alpha decorrelation parameter !
505! !
506! ==================== end of description ===================== !
507 implicit none
508
509! --- inputs
510 integer, intent(in) :: ix, lm, nlay, nlp1, me, ncndl, icloud
511 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, &
512 & ntclamt
513 integer, intent(in) :: kdt, imfdeepcnv, imfdeepcnv_gf, &
514 & imfdeepcnv_c3
515 integer, intent(in) :: &
516 & imp_physics, ! Flag for MP scheme
517 & imp_physics_nssl, ! Flag for NSSL scheme
518 & imp_physics_fer_hires, ! Flag for fer-hires scheme
519 & imp_physics_gfdl, ! Flag for gfdl scheme
520 & imp_physics_thompson, ! Flag for thompsonscheme
521 & imp_physics_wsm6, ! Flag for wsm6 scheme
522 & imp_physics_zhao_carr, ! Flag for zhao-carr scheme
523 & imp_physics_zhao_carr_pdf, ! Flag for zhao-carr+PDF scheme
524 & imp_physics_mg ! Flag for MG scheme
525
526 integer, intent(in) :: &
527 & iovr, !
528 & iovr_rand, ! Flag for random cloud overlap method
529 & iovr_maxrand, ! Flag for maximum-random cloud overlap method
530 & iovr_max, ! Flag for maximum cloud overlap method
531 & iovr_dcorr, ! Flag for decorrelation-length cloud overlap method
532 & iovr_exp, ! Flag for exponential cloud overlap method
533 & iovr_exprand, ! Flag for exponential-random cloud overlap method
534 & idcor,
535 & idcor_con,
536 & idcor_hogan,
537 & idcor_oreopoulos
538
539
540 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, effr_in, &
541 & do_mynnedmf, lgfdlmprad, top_at_1, lcrick, lcnorm, &
542 & xr_cnvcld
543
544 real (kind=kind_phys), dimension(:,:,:), intent(in) :: ccnd, &
545 & tracer1
546 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
547 & tlyr, tvly, qlyr, qstl, rhly, cnvw, cnvc, cldcov, &
548 & delp, dz, effrl, effri, effrr, effrs, dzlay, clouds1
549
550 real (kind=kind_phys), intent(in) :: sup, dcorr_con, con_ttp, &
551 & con_pi, con_g, con_rd, con_thgni
552 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
553 & slmsk, si
554
555 real(kind=kind_phys), dimension(:), intent(in) :: latdeg, gridkm
556 real(kind=kind_phys), intent(in) :: julian
557 integer, intent(in) :: yearlen
558
559! --- inout
560 real(kind=kind_phys),dimension(:,:) :: deltaq
561 real(kind=kind_phys),dimension(:,:),intent(inout) :: &
562 & effrl_inout, effri_inout, effrs_inout
563 real(kind=kind_phys), dimension(:), intent(inout) :: &
564 & lwp_ex, iwp_ex, lwp_fc, iwp_fc
565
566! --- outputs
567
568 real (kind=kind_phys), dimension(:,:), intent(out) :: &
569 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
570 & cld_rwp, cld_rerain, cld_swp, cld_resnow
571 real (kind=kind_phys), dimension(:,:), intent(out) :: clds
572 real (kind=kind_phys), dimension(:), intent(out) :: de_lgth
573 real (kind=kind_phys), dimension(:,:), intent(out) :: alpha
574
575 integer, dimension(:,:), intent(out) :: mtop,mbot
576
577! --- local variables:
578 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
579 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
580
581 real (kind=kind_phys) :: ptop1(ix,nk_clds+1), rxlat(ix)
582
583 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
584 & tem1, tem2, tem3
585
586 integer :: i, k, id, nf
587
588! --- constant values
589! real (kind=kind_phys), parameter :: xrc3 = 200.
590 real (kind=kind_phys), parameter :: xrc3 = 100.
591
592!
593!===> ... begin here
594!
595 if (me == 0 .and. kdt == 1) then &
596 print*, 'in radiation_clouds_prop=', imp_physics, uni_cld, &
597 & ncndl, lgfdlmprad, do_mynnedmf, imfdeepcnv, kdt
598 end if
599
600 do k = 1, nlay
601 do i = 1, ix
602 cld_frac(i,k) = 0.0
603 cld_lwp(i,k) = 0.0
604 cld_reliq(i,k) = 0.0
605 cld_iwp(i,k) = 0.0
606 cld_reice(i,k) = 0.0
607 cld_rwp(i,k) = 0.0
608 cld_rerain(i,k) = 0.0
609 cld_swp(i,k) = 0.0
610 cld_resnow(i,k) = 0.0
611 enddo
612 enddo
613
614 do k = 1, nlay
615 do i = 1, ix
616 cldtot(i,k) = 0.0
617 cldcnv(i,k) = 0.0
618 end do
619 end do
620
621 if (imp_physics == imp_physics_zhao_carr .or. &
622 & imp_physics == imp_physics_mg) then ! zhao/moorthi's p
623 ! or unified cloud and/or with MG microphysics
624
625 if (uni_cld .and. ncndl >= 2) then
626 call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs
627 & xlat, xlon, slmsk, dz, delp, &
628 & ix, nlay, nlp1, cldcov, &
629 & effrl, effri, effrr, effrs, effr_in, &
630 & dzlay, &
631 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
632 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
633 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
634 & cld_resnow)
635 else
636 call progcld_zhao_carr (plyr ,plvl, tlyr, tvly, qlyr, & ! --- inputs
637 & qstl, rhly, ccnd(1:ix,1:nlay,1), xlat, xlon, &
638 & slmsk, dz, delp, ix, nlay, nlp1, uni_cld, &
639 & lmfshal, lmfdeep2, &
640 & cldcov, effrl, effri, effrr, effrs, effr_in, &
641 & dzlay, &
642 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
643 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
644 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
645 & cld_resnow)
646 endif
647
648 elseif(imp_physics == imp_physics_zhao_carr_pdf) then ! zhao/moorthi's prognostic cloud+pdfcld
649
650 call progcld_zhao_carr_pdf (plyr, plvl, tlyr, tvly, qlyr, & ! --- inputs
651 & qstl, rhly, ccnd(1:ix,1:nlay,1), cnvw, cnvc, &
652 & xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, &
653 & deltaq, sup, kdt, me, dzlay, &
654 & cldtot, cldcnv, lcrick, lcnorm, con_thgni, & ! inout
655 & con_ttp, cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
656 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
657 & cld_resnow)
658
659 elseif (imp_physics == imp_physics_gfdl) then ! GFDL cloud scheme
660
661 if (.not. lgfdlmprad) then
662 call progcld_gfdl_lin (plyr, plvl, tlyr, tvly, qlyr, & ! --- inputs
663 & qstl, rhly, ccnd(1:ix,1:nlay,1), cnvw, cnvc, &
664 & xlat, xlon, slmsk, cldcov, dz, delp, &
665 & ix, nlay, nlp1, dzlay, &
666 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
667 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
668 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
669 & cld_resnow)
670 else
671
672 call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, xlat, & ! --- inputs
673 & xlon, slmsk, dz,delp, ix, nlay, nlp1, cldcov, &
674 & effrl, effri, effrr, effrs, effr_in, &
675 & dzlay, &
676 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
677 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
678 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
679 & cld_resnow)
680 endif
681
682
683 elseif(imp_physics == imp_physics_fer_hires) then
684 if (kdt == 1) then
685 effrl_inout(:,:) = 10.
686 effri_inout(:,:) = 50.
687 effrs_inout(:,:) = 250.
688 endif
689
690 call progcld_fer_hires (plyr,plvl,tlyr,tvly,qlyr,qstl,rhly, & ! --- inputs
691 & tracer1,xlat,xlon,slmsk,dz,delp, &
692 & ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
693 & ix,nlay,nlp1, icloud, uni_cld, &
694 & lmfshal, lmfdeep2, &
695 & cldcov(:,1:nlay),effrl_inout(:,:), &
696 & effri_inout(:,:), effrs_inout(:,:), &
697 & dzlay, &
698 & cldtot, cldcnv, lcnorm, & ! inout
699 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
700 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
701 & cld_resnow)
702
703 elseif ( imp_physics == imp_physics_nssl ) then ! NSSL MP
704
705 if(do_mynnedmf .or. imfdeepcnv == imfdeepcnv_gf .or. &
706 & imfdeepcnv == imfdeepcnv_c3) then ! MYNN PBL or GF or unified conv
707 !-- MYNN PBL or convective GF
708 !-- use cloud fractions with SGS clouds
709 do k=1,nlay
710 do i=1,ix
711 cld_frac(i,k) = clouds1(i,k)
712 enddo
713 enddo
714
715 ! --- use clduni with the NSSL microphysics.
716 ! --- make sure that effr_in=.true. in the input.nml!
717 call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs
718 & xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, &
719 & cld_frac, &
720 & effrl, effri, effrr, effrs, effr_in , &
721 & dzlay, &
722 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
723 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
724 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
725 & cld_resnow)
726 else
727 ! MYNN PBL or GF convective are not used
728 call progcld_thompson_wsm6 (plyr,plvl,tlyr,qlyr,qstl, & ! --- inputs
729 & rhly,tracer1,xlat,xlon,slmsk,dz,delp, &
730 & ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
731 & ntsw-1,ntgl-1,con_ttp,xr_cnvcld, &
732 & ix, nlay, nlp1, uni_cld, lmfshal, lmfdeep2, &
733 & cldcov(:,1:nlay), cnvw, effrl_inout, &
734 & effri_inout, effrs_inout, &
735 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
736 & dzlay, &
737 & cldtot, cldcnv, lcnorm, & ! inout
738 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
739 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
740 & cld_resnow)
741 endif ! MYNN PBL or GF
742
743 elseif(imp_physics == imp_physics_thompson) then ! Thompson MP
744
745 if(do_mynnedmf .or. imfdeepcnv == imfdeepcnv_gf &
746 & .or. imfdeepcnv == imfdeepcnv_c3) then ! MYNN PBL or GF conv
747
748 if (icloud == 3) then
749 call progcld_thompson (plyr,plvl,tlyr,qlyr,qstl,rhly, & ! --- inputs
750 & tracer1,xlat,xlon,slmsk,dz,delp, &
751 & ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
752 & ntsw-1,ntgl-1, &
753 & ix, lm, nlp1, uni_cld, lmfshal, lmfdeep2, &
754 & cldcov(:,1:lm), effrl, effri, effrs, &
755 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
756 & dzlay, gridkm, top_at_1, &
757 & cldtot, cldcnv, & ! inout
758 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
759 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
760 & cld_resnow)
761 else
762
763 !-- MYNN PBL or convective GF
764 !-- use cloud fractions with SGS clouds
765 do k=1,nlay
766 do i=1,ix
767 cld_frac(i,k) = clouds1(i,k)
768 enddo
769 enddo
770
771 ! --- use clduni as with the GFDL microphysics.
772 ! --- make sure that effr_in=.true. in the input.nml!
773 call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs
774 & xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, &
775 & cld_frac, &
776 & effrl, effri, effrr, effrs, effr_in , &
777 & dzlay, &
778 & cldtot, cldcnv, lcrick, lcnorm, con_ttp, & ! inout
779 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
780 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
781 & cld_resnow)
782 endif
783
784 else
785 ! MYNN PBL or GF convective are not used
786
787 if (icloud == 3) then
788 call progcld_thompson (plyr,plvl,tlyr,qlyr,qstl,rhly, & ! --- inputs
789 & tracer1,xlat,xlon,slmsk,dz,delp, &
790 & ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
791 & ntsw-1,ntgl-1, &
792 & ix, lm, nlp1, uni_cld, lmfshal, lmfdeep2, &
793 & cldcov(:,1:lm), effrl, effri, effrs, &
794 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
795 & dzlay, gridkm, top_at_1, &
796 & cldtot, cldcnv, & ! inout
797 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
798 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
799 & cld_resnow)
800
801 else
802 call progcld_thompson_wsm6 (plyr,plvl,tlyr,qlyr,qstl, & ! --- inputs
803 & rhly,tracer1,xlat,xlon,slmsk,dz,delp, &
804 & ntrac-1, ntcw-1,ntiw-1,ntrw-1, &
805 & ntsw-1,ntgl-1,con_ttp,xr_cnvcld, &
806 & ix, nlay, nlp1, uni_cld, lmfshal, lmfdeep2, &
807 & cldcov(:,1:nlay), cnvw, effrl, effri, effrs, &
808 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
809 & dzlay, &
810 & cldtot, cldcnv, lcnorm, & ! inout
811 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
812 & cld_reice,cld_rwp, cld_rerain,cld_swp, &
813 & cld_resnow)
814 endif
815 endif ! MYNN PBL or GF
816
817 endif ! end if_imp_physics
818
821! ptopc(k,i): top presure of each cld domain (k=1-4 are sfc,L,m,h;
822! --- i=1,2 are low-lat (<45 degree) and pole regions)
823
824 do i =1, ix
825 rxlat(i) = abs( xlat(i) / con_pi ) ! if xlat in pi/2 -> -pi/2 range
826! rxlat(i) = abs(0.5 - xlat(i)/con_pi) ! if xlat in 0 -> pi range
827 enddo
828
829 do id = 1, 4
830 tem1 = ptopc(id,2) - ptopc(id,1)
831
832 do i =1, ix
833 ptop1(i,id) = ptopc(id,1) + tem1*max( 0.0, 4.0*rxlat(i)-1.0 )
834 enddo
835 enddo
836
837 ! Compute cloud decorrelation length
838 if (idcor == idcor_hogan) then
839 call cmp_dcorr_lgth(ix, xlat, con_pi, de_lgth)
840 endif
841 if (idcor == idcor_oreopoulos) then
842 call cmp_dcorr_lgth(ix, latdeg, julian, yearlen, de_lgth)
843 endif
844 if (idcor == idcor_con) then
845 de_lgth(:) = dcorr_con
846 endif
847
848 ! Call subroutine get_alpha_exper to define alpha parameter for exponential cloud overlap options
849 if ( iovr == iovr_dcorr .or. iovr == iovr_exp &
850 & .or. iovr == iovr_exprand) then
851 call get_alpha_exper(ix, nlay, iovr, iovr_exprand, dzlay, &
852 & de_lgth, cld_frac, alpha)
853 else
854 de_lgth(:) = 0.
855 alpha(:,:) = 0.
856 endif
857
861! --- compute low, mid, high, total, and boundary layer cloud fractions
862! and clouds top/bottom layer indices for low, mid, and high clouds.
863! The three cloud domain boundaries are defined by ptopc. The cloud
864! overlapping method is defined by control flag 'iovr', which may
865! be different for lw and sw radiation programs.
866
867 call gethml &
868! --- inputs:
869 & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, &
870 & ix, nlay, iovr, iovr_rand, iovr_maxrand, iovr_max, &
871 & iovr_dcorr, iovr_exp, iovr_exprand, top_at_1, si, &
872! --- outputs:
873 & clds, mtop, mbot &
874 & )
875
876 return
877!...................................
878 end subroutine radiation_clouds_prop
879
883 subroutine progcld_zhao_carr &
884 & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs:
885 & xlat,xlon,slmsk,dz,delp, ix, nlay, nlp1, &
886 & uni_cld, lmfshal, lmfdeep2, cldcov, &
887 & effrl,effri,effrr,effrs,effr_in, &
888 & dzlay, cldtot, cldcnv, lcrick, lcnorm, con_ttp, &
889 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
890 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
891 & )
892
893! ================= subprogram documentation block ================ !
894! !
895! subprogram: progcld_zhao_carr computes cloud related quantities using !
896! zhao/moorthi's prognostic cloud microphysics scheme. !
897! !
898! abstract: this program computes cloud fractions from cloud !
899! condensates, calculates liquid/ice cloud droplet effective radius, !
900! and computes the low, mid, high, total and boundary layer cloud !
901! fractions and the vertical indices of low, mid, and high cloud !
902! top and base. the three vertical cloud domains are set up in the !
903! initial subroutine "cld_init". !
904! !
905! usage: call progcld_zhao_carr !
906! !
907! attributes: !
908! language: fortran 90 !
909! machine: ibm-sp, sgi !
910! !
911! !
912! ==================== definition of variables ==================== !
913! !
914! input variables: !
915! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
916! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
917! tlyr (IX,NLAY) : model layer mean temperature in k !
918! tvly (IX,NLAY) : model layer virtual temperature in k !
919! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
920! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
921! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
922! clw (IX,NLAY) : layer cloud condensate amount !
923! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
924! range, otherwise see in-line comment !
925! xlon (IX) : grid longitude in radians (not used) !
926! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
927! dz (ix,nlay) : layer thickness (km) !
928! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
929! IX : horizontal dimention !
930! NLAY,NLP1 : vertical layer/level dimensions !
931! uni_cld : logical - true for cloud fraction from shoc !
932! lmfshal : logical - true for mass flux shallow convection !
933! lmfdeep2 : logical - true for mass flux deep convection !
934! cldcov : layer cloud fraction (used when uni_cld=.true. !
935! effrl : effective radius for liquid water
936! effri : effective radius for ice water
937! effrr : effective radius for rain water
938! effrs : effective radius for snow water
939! effr_in : logical, if .true. use input effective radii
940! dzlay(ix,nlay) : thickness between model layer centers (km) !
941! lmfshal : mass-flux shallow conv scheme flag !
942! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
943! lcrick : control flag for eliminating CRICK !
944! =t: apply layer smoothing to eliminate CRICK !
945! =f: do not apply layer smoothing !
946! lcnorm : control flag for in-cld condensate !
947! =t: normalize cloud condensate !
948! =f: not normalize cloud condensate !
949! !
950! output variables: !
951! cloud profiles: !
952! cld_frac (:,:) - layer total cloud fraction !
953! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
954! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
955! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
956! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
957! cld_rwp (:,:) - layer rain drop water path not assigned !
958! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
959! *** cld_swp (:,:) - layer snow flake water path not assigned !
960! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
961! !
962! ==================== end of description ===================== !
963!
964 implicit none
965
966! --- inputs
967 integer, intent(in) :: ix, nlay, nlp1
968
969 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, effr_in, &
970 & lcrick, lcnorm
971
972 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
973 & tlyr, tvly, qlyr, qstl, rhly, clw, cldcov, delp, dz, &
974 & effrl, effri, effrr, effrs, dzlay
975
976 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
977 & slmsk
978 real (kind=kind_phys), intent(in) :: con_ttp
979
980! --- inputs/outputs
981
982 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
983 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
984 & cld_rwp, cld_rerain, cld_swp, cld_resnow
985
986! --- local variables:
987 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
988 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
989
990 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
991 & tem1, tem2, tem3
992
993 integer :: i, k, id, nf
994
995! --- constant values
996! real (kind=kind_phys), parameter :: xrc3 = 200.
997 real (kind=kind_phys), parameter :: xrc3 = 100.
998
999!
1000!===> ... begin here
1001!
1003 if(effr_in) then
1004 do k = 1, nlay
1005 do i = 1, ix
1006 cldtot(i,k) = 0.0
1007 cldcnv(i,k) = 0.0
1008 cwp(i,k) = 0.0
1009 cip(i,k) = 0.0
1010 crp(i,k) = 0.0
1011 csp(i,k) = 0.0
1012 rew(i,k) = effrl(i,k)
1013 rei(i,k) = effri(i,k)
1014 rer(i,k) = effrr(i,k)
1015 res(i,k) = effrs(i,k)
1016 tem2d(i,k) = min(1.0, max(0.0,(con_ttp-tlyr(i,k))*0.05))
1017 clwf(i,k) = 0.0
1018 enddo
1019 enddo
1020 else
1021 do k = 1, nlay
1022 do i = 1, ix
1023 cldtot(i,k) = 0.0
1024 cldcnv(i,k) = 0.0
1025 cwp(i,k) = 0.0
1026 cip(i,k) = 0.0
1027 crp(i,k) = 0.0
1028 csp(i,k) = 0.0
1029 rew(i,k) = reliq_def ! default liq radius to 10 micron
1030 rei(i,k) = reice_def ! default ice radius to 50 micron
1031 rer(i,k) = rrain_def ! default rain radius to 1000 micron
1032 res(i,k) = rsnow_def ! default snow radius to 250 micron
1033 tem2d(i,k) = min(1.0, max(0.0, (con_ttp-tlyr(i,k))*0.05))
1034 clwf(i,k) = 0.0
1035 enddo
1036 enddo
1037 endif
1038!
1039 if ( lcrick ) then
1040 do i = 1, ix
1041 clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2)
1042 clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1)
1043 enddo
1044 do k = 2, nlay-1
1045 do i = 1, ix
1046 clwf(i,k) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1)
1047 enddo
1048 enddo
1049 else
1050 do k = 1, nlay
1051 do i = 1, ix
1052 clwf(i,k) = clw(i,k)
1053 enddo
1054 enddo
1055 endif
1056
1058
1059 do k = 1, nlay
1060 do i = 1, ix
1061 clwt = max(0.0, clwf(i,k)) * gfac * delp(i,k)
1062 cip(i,k) = clwt * tem2d(i,k)
1063 cwp(i,k) = clwt - cip(i,k)
1064 enddo
1065 enddo
1066
1068
1069 if(.not. effr_in) then
1070 do i = 1, ix
1071 if (nint(slmsk(i)) == 1) then
1072 do k = 1, nlay
1073 rew(i,k) = 5.0 + 5.0 * tem2d(i,k)
1074 enddo
1075 endif
1076 enddo
1077 endif
1078
1079 if (uni_cld) then ! use unified sgs clouds generated outside
1080 do k = 1, nlay
1081 do i = 1, ix
1082 cldtot(i,k) = cldcov(i,k)
1083 enddo
1084 enddo
1085
1086 else
1087
1089
1090
1091 if (.not. lmfshal) then
1093 & ( ix, nlay, plyr, clwf, rhly, qstl, & ! --- inputs
1094 & cldtot ) & ! --- outputs
1095 else
1097 & ( ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, & ! --- inputs
1098 & cldtot )
1099 endif
1100
1101 endif ! if (uni_cld) then
1102
1103 do k = 1, nlay
1104 do i = 1, ix
1105 if (cldtot(i,k) < climit) then
1106 cldtot(i,k) = 0.0
1107 cwp(i,k) = 0.0
1108 cip(i,k) = 0.0
1109 crp(i,k) = 0.0
1110 csp(i,k) = 0.0
1111 endif
1112 enddo
1113 enddo
1114
1115 if ( lcnorm ) then
1116 do k = 1, nlay
1117 do i = 1, ix
1118 if (cldtot(i,k) >= climit) then
1119 tem1 = 1.0 / max(climit2, cldtot(i,k))
1120 cwp(i,k) = cwp(i,k) * tem1
1121 cip(i,k) = cip(i,k) * tem1
1122 crp(i,k) = crp(i,k) * tem1
1123 csp(i,k) = csp(i,k) * tem1
1124 endif
1125 enddo
1126 enddo
1127 endif
1128
1131
1132 if(.not.effr_in) then
1133 do k = 1, nlay
1134 do i = 1, ix
1135 tem2 = tlyr(i,k) - con_ttp
1136
1137 if (cip(i,k) > 0.0) then
1138 tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k))
1139
1140 if (tem2 < -50.0) then
1141 rei(i,k) = (1250.0/9.917) * tem3 ** 0.109
1142 elseif (tem2 < -40.0) then
1143 rei(i,k) = (1250.0/9.337) * tem3 ** 0.08
1144 elseif (tem2 < -30.0) then
1145 rei(i,k) = (1250.0/9.208) * tem3 ** 0.055
1146 else
1147 rei(i,k) = (1250.0/9.387) * tem3 ** 0.031
1148 endif
1149! rei(i,k) = max(20.0, min(rei(i,k), 300.0))
1150! rei(i,k) = max(10.0, min(rei(i,k), 100.0))
1151 rei(i,k) = max(10.0, min(rei(i,k), 150.0))
1152! rei(i,k) = max(5.0, min(rei(i,k), 130.0))
1153 endif
1154 enddo
1155 enddo
1156 endif
1157
1158!
1159 do k = 1, nlay
1160 do i = 1, ix
1161 cld_frac(i,k) = cldtot(i,k)
1162 cld_lwp(i,k) = cwp(i,k)
1163 cld_reliq(i,k) = rew(i,k)
1164 cld_iwp(i,k) = cip(i,k)
1165 cld_reice(i,k) = rei(i,k)
1166! cld_rwp(i,k) = 0.0
1167 cld_rerain(i,k) = rer(i,k)
1168! cld_swp(i,k) = 0.0
1169 cld_resnow(i,k) = res(i,k)
1170 enddo
1171 enddo
1172!
1173 return
1174!...................................
1175 end subroutine progcld_zhao_carr
1176!-----------------------------------
1177!-----------------------------------
1178
1183 & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs:
1184 & xlat,xlon,slmsk, dz, delp, &
1185 & ix, nlay, nlp1, &
1186 & deltaq,sup,kdt,me, &
1187 & dzlay, cldtot, cldcnv, lcrick, lcnorm, con_thgni, con_ttp, &
1188 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
1189 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
1190 & )
1191
1192! ================= subprogram documentation block ================ !
1193! !
1194! subprogram: progcld_zhao_carr_pdf computes cloud related quantities using !
1195! zhao/moorthi's prognostic cloud microphysics scheme. !
1196! !
1197! abstract: this program computes cloud fractions from cloud !
1198! condensates, calculates liquid/ice cloud droplet effective radius, !
1199! and computes the low, mid, high, total and boundary layer cloud !
1200! fractions and the vertical indices of low, mid, and high cloud !
1201! top and base. the three vertical cloud domains are set up in the !
1202! initial subroutine "cld_init". !
1203! !
1204! usage: call progcld_zhao_carr_pdf !
1205! !
1206! attributes: !
1207! language: fortran 90 !
1208! machine: ibm-sp, sgi !
1209! !
1210! !
1211! ==================== defination of variables ==================== !
1212! !
1213! input variables: !
1214! plyr (ix,nlay) : model layer mean pressure in mb (100pa) !
1215! plvl (ix,nlp1) : model level pressure in mb (100pa) !
1216! tlyr (ix,nlay) : model layer mean temperature in k !
1217! tvly (ix,nlay) : model layer virtual temperature in k !
1218! qlyr (ix,nlay) : layer specific humidity in gm/gm !
1219! qstl (ix,nlay) : layer saturate humidity in gm/gm !
1220! rhly (ix,nlay) : layer relative humidity (=qlyr/qstl) !
1221! clw (ix,nlay) : layer cloud condensate amount !
1222! xlat (ix) : grid latitude in radians, default to pi/2 -> -pi/2!
1223! range, otherwise see in-line comment !
1224! xlon (ix) : grid longitude in radians (not used) !
1225! slmsk (ix) : sea/land mask array (sea:0,land:1,sea-ice:2) !
1226! dz (ix,nlay) : layer thickness (km) !
1227! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
1228! ix : horizontal dimention !
1229! nlay,nlp1 : vertical layer/level dimensions !
1230! cnvw (ix,nlay) : layer convective cloud condensate !
1231! cnvc (ix,nlay) : layer convective cloud cover !
1232! deltaq(ix,nlay) : half total water distribution width !
1233! sup : supersaturation !
1234! dzlay(ix,nlay) : thickness between model layer centers (km) !
1235! lcrick : control flag for eliminating crick !
1236! =t: apply layer smoothing to eliminate crick !
1237! =f: do not apply layer smoothing !
1238! lcnorm : control flag for in-cld condensate !
1239! =t: normalize cloud condensate !
1240! =f: not normalize cloud condensate !
1241! !
1242! output variables: !
1243! cloud profiles: !
1244! cld_frac (:,:) - layer total cloud fraction !
1245! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
1246! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
1247! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
1248! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
1249! cld_rwp (:,:) - layer rain drop water path not assigned !
1250! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
1251! *** cld_swp (:,:) - layer snow flake water path not assigned !
1252! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
1253! !
1254! ==================== end of description ===================== !
1255!
1256 implicit none
1257
1258! --- inputs
1259 integer, intent(in) :: ix, nlay, nlp1,kdt
1260 logical, intent(in) :: lcrick, lcnorm
1261 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
1262 & tlyr, tvly, qlyr, qstl, rhly, clw, dz, delp, dzlay
1263! & tlyr, tvly, qlyr, qstl, rhly, clw, cnvw, cnvc
1264! real (kind=kind_phys), dimension(:,:), intent(in) :: deltaq
1265 real (kind=kind_phys), intent(in) :: con_thgni, con_ttp
1266 real (kind=kind_phys), dimension(:,:) :: deltaq, cnvw, cnvc
1267 real (kind=kind_phys) qtmp,qsc,rhs
1268 real (kind=kind_phys), intent(in) :: sup
1269 real (kind=kind_phys), parameter :: epsq = 1.0e-12
1270
1271 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
1272 & slmsk
1273 integer :: me
1274
1275! --- inputs/outputs
1276
1277 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
1278 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
1279 & cld_rwp, cld_rerain, cld_swp, cld_resnow
1280
1281! --- local variables:
1282 real (kind=kind_phys), dimension(ix,nlay) :: cldtot, cldcnv, &
1283 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
1284
1285 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
1286 & tem1, tem2, tem3
1287
1288 integer :: i, k, id, nf
1289
1290!
1291!===> ... begin here
1292!
1293 do k = 1, nlay
1294 do i = 1, ix
1295 cldtot(i,k) = 0.0
1296 cldcnv(i,k) = 0.0
1297 cwp(i,k) = 0.0
1298 cip(i,k) = 0.0
1299 crp(i,k) = 0.0
1300 csp(i,k) = 0.0
1301 rew(i,k) = reliq_def ! default liq radius to 10 micron
1302 rei(i,k) = reice_def ! default ice radius to 50 micron
1303 rer(i,k) = rrain_def ! default rain radius to 1000 micron
1304 res(i,k) = rsnow_def ! default snow radius to 250 micron
1305 tem2d(i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) )
1306 clwf(i,k) = 0.0
1307 enddo
1308 enddo
1309!
1310 if ( lcrick ) then
1311 do i = 1, ix
1312 clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2)
1313 clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1)
1314 enddo
1315 do k = 2, nlay-1
1316 do i = 1, ix
1317 clwf(i,k) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1)
1318 enddo
1319 enddo
1320 else
1321 do k = 1, nlay
1322 do i = 1, ix
1323 clwf(i,k) = clw(i,k)
1324 enddo
1325 enddo
1326 endif
1327
1328 if(kdt==1) then
1329 do k = 1, nlay
1330 do i = 1, ix
1331 deltaq(i,k) = (1.-0.95)*qstl(i,k)
1332 enddo
1333 enddo
1334 endif
1335
1337
1338 do k = 1, nlay
1339 do i = 1, ix
1340 clwt = max(0.0,(clwf(i,k)+cnvw(i,k))) * gfac * delp(i,k)
1341 cip(i,k) = clwt * tem2d(i,k)
1342 cwp(i,k) = clwt - cip(i,k)
1343 enddo
1344 enddo
1345
1347
1348 do i = 1, ix
1349 if (nint(slmsk(i)) == 1) then
1350 do k = 1, nlay
1351 rew(i,k) = 5.0 + 5.0 * tem2d(i,k)
1352 enddo
1353 endif
1354 enddo
1355
1357
1358 do k = 1, nlay
1359 do i = 1, ix
1360 tem1 = tlyr(i,k) - 273.16
1361 if(tem1 < (con_thgni - 273.16)) then ! for pure ice, has to be consistent with gscond
1362 qsc = sup * qstl(i,k)
1363 rhs = sup
1364 else
1365 qsc = qstl(i,k)
1366 rhs = 1.0
1367 endif
1368 if(rhly(i,k) >= rhs) then
1369 cldtot(i,k) = 1.0
1370 else
1371 qtmp = qlyr(i,k) + clwf(i,k) - qsc
1372 if(deltaq(i,k) > epsq) then
1373! if(qtmp <= -deltaq(i,k) .or. cwmik < epsq) then
1374 if(qtmp <= -deltaq(i,k)) then
1375 cldtot(i,k) = 0.0
1376 elseif(qtmp >= deltaq(i,k)) then
1377 cldtot(i,k) = 1.0
1378 else
1379 cldtot(i,k) = 0.5*qtmp/deltaq(i,k) + 0.5
1380 cldtot(i,k) = max(cldtot(i,k),0.0)
1381 cldtot(i,k) = min(cldtot(i,k),1.0)
1382 endif
1383 else
1384 if(qtmp > 0.) then
1385 cldtot(i,k) = 1.0
1386 else
1387 cldtot(i,k) = 0.0
1388 endif
1389 endif
1390 endif
1391 cldtot(i,k) = cnvc(i,k) + (1-cnvc(i,k))*cldtot(i,k)
1392 cldtot(i,k) = max(cldtot(i,k),0.)
1393 cldtot(i,k) = min(cldtot(i,k),1.)
1394
1395 enddo
1396 enddo
1397
1398 do k = 1, nlay
1399 do i = 1, ix
1400 if (cldtot(i,k) < climit) then
1401 cldtot(i,k) = 0.0
1402 cwp(i,k) = 0.0
1403 cip(i,k) = 0.0
1404 crp(i,k) = 0.0
1405 csp(i,k) = 0.0
1406 endif
1407 enddo
1408 enddo
1409
1410 if ( lcnorm ) then
1411 do k = 1, nlay
1412 do i = 1, ix
1413 if (cldtot(i,k) >= climit) then
1414 tem1 = 1.0 / max(climit2, cldtot(i,k))
1415 cwp(i,k) = cwp(i,k) * tem1
1416 cip(i,k) = cip(i,k) * tem1
1417 crp(i,k) = crp(i,k) * tem1
1418 csp(i,k) = csp(i,k) * tem1
1419 endif
1420 enddo
1421 enddo
1422 endif
1423
1426
1427 do k = 1, nlay
1428 do i = 1, ix
1429 tem2 = tlyr(i,k) - con_ttp
1430
1431 if (cip(i,k) > 0.0) then
1432! tem3 = gord * cip(i,k) * (plyr(i,k)/delp(i,k)) / tvly(i,k)
1433 tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k))
1434
1435 if (tem2 < -50.0) then
1436 rei(i,k) = (1250.0/9.917) * tem3 ** 0.109
1437 elseif (tem2 < -40.0) then
1438 rei(i,k) = (1250.0/9.337) * tem3 ** 0.08
1439 elseif (tem2 < -30.0) then
1440 rei(i,k) = (1250.0/9.208) * tem3 ** 0.055
1441 else
1442 rei(i,k) = (1250.0/9.387) * tem3 ** 0.031
1443 endif
1444! rei(i,k) = max(20.0, min(rei(i,k), 300.0))
1445! rei(i,k) = max(10.0, min(rei(i,k), 100.0))
1446 rei(i,k) = max(10.0, min(rei(i,k), 150.0))
1447! rei(i,k) = max(5.0, min(rei(i,k), 130.0))
1448 endif
1449 enddo
1450 enddo
1451
1452!
1453 do k = 1, nlay
1454 do i = 1, ix
1455 cld_frac(i,k) = cldtot(i,k)
1456 cld_lwp(i,k) = cwp(i,k)
1457 cld_reliq(i,k) = rew(i,k)
1458 cld_iwp(i,k) = cip(i,k)
1459 cld_reice(i,k) = rei(i,k)
1460! cld_rwp(i,k) = 0.0
1461 cld_rerain(i,k) = rer(i,k)
1462! cld_swp(i,k) = 0.0
1463 cld_resnow(i,k) = res(i,k)
1464 enddo
1465 enddo
1466!
1467 return
1468!...................................
1469 end subroutine progcld_zhao_carr_pdf
1470!-----------------------------------
1471
1472
1473!-----------------------------------
1477 subroutine progcld_gfdl_lin &
1478 & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw,cnvw,cnvc, & ! --- inputs:
1479 & xlat,xlon,slmsk,cldtot, dz, delp, &
1480 & ix, nlay, nlp1, &
1481 & dzlay, cldtot1, cldcnv, lcrick, lcnorm, con_ttp, &
1482 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
1483 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
1484 & )
1485
1486! ================= subprogram documentation block ================ !
1487! !
1488! subprogram: progcld_gfdl_lin computes cloud related quantities using !
1489! GFDL Lin MP prognostic cloud microphysics scheme. !
1490! !
1491! abstract: this program computes cloud fractions from cloud !
1492! condensates, calculates liquid/ice cloud droplet effective radius, !
1493! and computes the low, mid, high, total and boundary layer cloud !
1494! fractions and the vertical indices of low, mid, and high cloud !
1495! top and base. the three vertical cloud domains are set up in the !
1496! initial subroutine "cld_init". !
1497! !
1498! usage: call progcld_gfdl_lin !
1499! !
1500! attributes: !
1501! language: fortran 90 !
1502! machine: ibm-sp, sgi !
1503! !
1504! !
1505! ==================== definition of variables ==================== !
1506! !
1507! input variables: !
1508! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
1509! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
1510! tlyr (IX,NLAY) : model layer mean temperature in k !
1511! tvly (IX,NLAY) : model layer virtual temperature in k !
1512! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
1513! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
1514! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
1515! clw (IX,NLAY) : layer cloud condensate amount !
1516! cnvw (IX,NLAY) : layer convective cloud condensate !
1517! cnvc (IX,NLAY) : layer convective cloud cover !
1518! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
1519! range, otherwise see in-line comment !
1520! xlon (IX) : grid longitude in radians (not used) !
1521! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
1522! dz (ix,nlay) : layer thickness (km) !
1523! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
1524! IX : horizontal dimention !
1525! NLAY,NLP1 : vertical layer/level dimensions !
1526! dzlay(ix,nlay) : thickness between model layer centers (km) !
1527! lcrick : control flag for eliminating CRICK !
1528! =t: apply layer smoothing to eliminate CRICK !
1529! =f: do not apply layer smoothing !
1530! lcnorm : control flag for in-cld condensate !
1531! =t: normalize cloud condensate !
1532! =f: not normalize cloud condensate !
1533! !
1534! output variables: !
1535! cloud profiles: !
1536! cld_frac (:,:) - layer total cloud fraction !
1537! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
1538! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
1539! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
1540! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
1541! cld_rwp (:,:) - layer rain drop water path not assigned !
1542! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
1543! *** cld_swp (:,:) - layer snow flake water path not assigned !
1544! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
1545! !
1546! ==================== end of description ===================== !
1547!
1548 implicit none
1549
1550! --- inputs
1551 integer, intent(in) :: ix, nlay, nlp1
1552 logical, intent(in) :: lcrick, lcnorm
1553 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
1554 & tlyr, tvly, qlyr, qstl, rhly, clw, cldtot, cnvw, cnvc, &
1555 & delp, dz, dzlay
1556 real (kind=kind_phys) :: con_ttp
1557
1558 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
1559 & slmsk
1560
1561 real (kind=kind_phys), dimension(:,:), intent(inout) :: cldtot1
1562
1563! --- inputs/outputs
1564
1565 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
1566 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
1567 & cld_rwp, cld_rerain, cld_swp, cld_resnow
1568
1569! --- local variables:
1570 real (kind=kind_phys), dimension(IX,NLAY) :: cldcnv, &
1571 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
1572
1573 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
1574 & tem1, tem2, tem3
1575
1576 integer :: i, k, id, nf
1577
1578!
1579!===> ... begin here
1580!
1582 do k = 1, nlay
1583 do i = 1, ix
1584 cldcnv(i,k) = 0.0
1585 cwp(i,k) = 0.0
1586 cip(i,k) = 0.0
1587 crp(i,k) = 0.0
1588 csp(i,k) = 0.0
1589 rew(i,k) = reliq_def
1590 rei(i,k) = reice_def
1591 rer(i,k) = rrain_def
1592 res(i,k) = rsnow_def
1593 tem2d(i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) )
1594 clwf(i,k) = 0.0
1595 enddo
1596 enddo
1597!
1598 if ( lcrick ) then
1599 do i = 1, ix
1600 clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2)
1601 clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1)
1602 enddo
1603 do k = 2, nlay-1
1604 do i = 1, ix
1605 clwf(i,k) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1)
1606 enddo
1607 enddo
1608 else
1609 do k = 1, nlay
1610 do i = 1, ix
1611 clwf(i,k) = clw(i,k)
1612 enddo
1613 enddo
1614 endif
1615
1617
1618 do k = 1, nlay
1619 do i = 1, ix
1620 clwt = max(0.0,(clwf(i,k)+cnvw(i,k))) * gfac * delp(i,k)
1621 cip(i,k) = clwt * tem2d(i,k)
1622 cwp(i,k) = clwt - cip(i,k)
1623 enddo
1624 enddo
1625
1627
1628 do i = 1, ix
1629 if (nint(slmsk(i)) == 1) then
1630 do k = 1, nlay
1631 rew(i,k) = 5.0 + 5.0 * tem2d(i,k)
1632 enddo
1633 endif
1634 enddo
1635
1636 do k = 1, nlay
1637 do i = 1, ix
1638 if (cldtot(i,k) < climit) then
1639 cwp(i,k) = 0.0
1640 cip(i,k) = 0.0
1641 crp(i,k) = 0.0
1642 csp(i,k) = 0.0
1643 endif
1644 enddo
1645 enddo
1646
1647 if ( lcnorm ) then
1648 do k = 1, nlay
1649 do i = 1, ix
1650 if (cldtot(i,k) >= climit) then
1651 tem1 = 1.0 / max(climit2, cldtot(i,k))
1652 cwp(i,k) = cwp(i,k) * tem1
1653 cip(i,k) = cip(i,k) * tem1
1654 crp(i,k) = crp(i,k) * tem1
1655 csp(i,k) = csp(i,k) * tem1
1656 endif
1657 enddo
1658 enddo
1659 endif
1660
1663
1664 do k = 1, nlay
1665 do i = 1, ix
1666 tem2 = tlyr(i,k) - con_ttp
1667
1668 if (cip(i,k) > 0.0) then
1669 tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k))
1670
1671 if (tem2 < -50.0) then
1672 rei(i,k) = (1250.0/9.917) * tem3 ** 0.109
1673 elseif (tem2 < -40.0) then
1674 rei(i,k) = (1250.0/9.337) * tem3 ** 0.08
1675 elseif (tem2 < -30.0) then
1676 rei(i,k) = (1250.0/9.208) * tem3 ** 0.055
1677 else
1678 rei(i,k) = (1250.0/9.387) * tem3 ** 0.031
1679 endif
1680! rei(i,k) = max(20.0, min(rei(i,k), 300.0))
1681! rei(i,k) = max(10.0, min(rei(i,k), 100.0))
1682 rei(i,k) = max(10.0, min(rei(i,k), 150.0))
1683! rei(i,k) = max(5.0, min(rei(i,k), 130.0))
1684 endif
1685 enddo
1686 enddo
1687
1688 do k = 1, nlay
1689 do i = 1, ix
1690 cldtot1(i,k) = cldtot(i,k)
1691 enddo
1692 enddo
1693
1694!
1695 do k = 1, nlay
1696 do i = 1, ix
1697 cld_frac(i,k) = cldtot(i,k)
1698 cld_lwp(i,k) = cwp(i,k)
1699 cld_reliq(i,k) = rew(i,k)
1700 cld_iwp(i,k) = cip(i,k)
1701 cld_reice(i,k) = rei(i,k)
1702! cld_rwp(i,k) = 0.0
1703 cld_rerain(i,k) = rer(i,k)
1704! cld_swp(i,k) = 0.0
1705 cld_resnow(i,k) = res(i,k)
1706 enddo
1707 enddo
1708!
1709 return
1710!...................................
1711 end subroutine progcld_gfdl_lin
1712!-----------------------------------
1713
1714!-----------------------------------
1718 & ( plyr,plvl,tlyr,tvly,qlyr,qstl,rhly,clw, & ! --- inputs:
1719 & xlat,xlon,slmsk,dz,delp, &
1720 & ntrac,ntcw,ntiw,ntrw, &
1721 & ix, nlay, nlp1, icloud, &
1722 & uni_cld, lmfshal, lmfdeep2, cldcov, &
1723 & re_cloud,re_ice,re_snow, &
1724 & dzlay, cldtot, cldcnv, lcnorm, &
1725 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
1726 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
1727 & )
1728
1729! ================= subprogram documentation block ================ !
1730! !
1731! subprogram: progcld_fer_hires computes cloud related quantities using !
1732! Ferrier-Aligo cloud microphysics scheme. !
1733! !
1734! abstract: this program computes cloud fractions from cloud !
1735! condensates, !
1736! and computes the low, mid, high, total and boundary layer cloud !
1737! fractions and the vertical indices of low, mid, and high cloud !
1738! top and base. the three vertical cloud domains are set up in the !
1739! initial subroutine "cld_init". !
1740! !
1741! usage: call progcld_fer_hires !
1742! !
1743! attributes: !
1744! language: fortran 90 !
1745! machine: ibm-sp, sgi !
1746! !
1747! !
1748! ==================== definition of variables ==================== !
1749! !
1750! input variables: !
1751! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
1752! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
1753! tlyr (IX,NLAY) : model layer mean temperature in k !
1754! tvly (IX,NLAY) : model layer virtual temperature in k !
1755! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
1756! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
1757! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
1758! clw (IX,NLAY,ntrac) : layer cloud condensate amount !
1759! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
1760! range, otherwise see in-line comment !
1761! xlon (IX) : grid longitude in radians (not used) !
1762! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
1763! dz (ix,nlay) : layer thickness (km) !
1764! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
1765! IX : horizontal dimention !
1766! NLAY,NLP1 : vertical layer/level dimensions !
1767! icloud : cloud effect to the optical depth in radiation !
1768! uni_cld : logical - true for cloud fraction from shoc !
1769! lmfshal : logical - true for mass flux shallow convection !
1770! lmfdeep2 : logical - true for mass flux deep convection !
1771! cldcov : layer cloud fraction (used when uni_cld=.true. !
1772! dzlay(ix,nlay) : thickness between model layer centers (km) !
1773! lmfshal : mass-flux shallow conv scheme flag !
1774! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
1775! lcrick : control flag for eliminating CRICK !
1776! =t: apply layer smoothing to eliminate CRICK !
1777! =f: do not apply layer smoothing !
1778! lcnorm : control flag for in-cld condensate !
1779! =t: normalize cloud condensate !
1780! =f: not normalize cloud condensate !
1781! !
1782! output variables: !
1783! cloud profiles: !
1784! cld_frac (:,:) - layer total cloud fraction !
1785! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
1786! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
1787! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
1788! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
1789! cld_rwp (:,:) - layer rain drop water path not assigned !
1790! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
1791! *** cld_swp (:,:) - layer snow flake water path not assigned !
1792! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
1793! !
1794! ==================== end of description ===================== !
1795!
1796 implicit none
1797
1798! --- inputs
1799 integer, intent(in) :: ix, nlay, nlp1, icloud
1800 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw
1801
1802 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, lcnorm
1803
1804 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
1805 & tlyr, tvly, qlyr, qstl, rhly, cldcov, delp, dz, dzlay
1806
1807 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
1808 & re_cloud, re_ice, re_snow
1809
1810 real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw
1811
1812 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
1813 & slmsk
1814
1815! --- inputs/outputs
1816
1817 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
1818 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
1819 & cld_rwp, cld_rerain, cld_swp, cld_resnow
1820
1821! --- local variables:
1822 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
1823 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
1824
1825 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
1826 & tem1, tem2, tem3
1827
1828 integer :: i, k, id, nf
1829
1830! --- constant values
1831! real (kind=kind_phys), parameter :: xrc3 = 200.
1832 real (kind=kind_phys), parameter :: xrc3 = 100.
1833
1834!
1835!===> ... begin here
1836!
1837 do k = 1, nlay
1838 do i = 1, ix
1839 cldtot(i,k) = 0.0
1840 cldcnv(i,k) = 0.0
1841 cwp(i,k) = 0.0
1842 cip(i,k) = 0.0
1843 crp(i,k) = 0.0
1844 csp(i,k) = 0.0
1845 rew(i,k) = re_cloud(i,k)
1846 rei(i,k) = re_ice(i,k)
1847 rer(i,k) = rrain_def ! default rain radius to 1000 micron
1848 res(i,k) = re_snow(i,k)
1849! tem2d (i,k) = min( 1.0, max( 0.0, (con_ttp-tlyr(i,k))*0.05 ) )
1850 clwf(i,k) = 0.0
1851 enddo
1852 enddo
1853!
1854! if ( lcrick ) then
1855! do i = 1, IX
1856! clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2)
1857! clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1)
1858! enddo
1859! do k = 2, NLAY-1
1860! do i = 1, IX
1861! clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1)
1862! enddo
1863! enddo
1864! else
1865! do k = 1, NLAY
1866! do i = 1, IX
1867! clwf(i,k) = clw(i,k)
1868! enddo
1869! enddo
1870! endif
1871
1872 do k = 1, nlay
1873 do i = 1, ix
1874 clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw)
1875 enddo
1876 enddo
1877
1879
1880 do k = 1, nlay
1881 do i = 1, ix
1882 cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k))
1883 cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k))
1884 crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k))
1885 csp(i,k) = 0.0
1886 enddo
1887 enddo
1888
1889!mz* if (uni_cld) then ! use unified sgs clouds generated outside
1890!mz* use unified sgs clouds generated outside
1891 if (uni_cld) then
1892 do k = 1, nlay
1893 do i = 1, ix
1894 cldtot(i,k) = cldcov(i,k)
1895 enddo
1896 enddo
1897
1898 else
1899
1901
1902 if (.not. lmfshal) then
1904 & ( ix, nlay, plyr, clwf, rhly, qstl, & ! --- inputs
1905 & cldtot ) & ! --- outputs
1906 else
1908 & ( ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, & ! --- inputs
1909 & cldtot )
1910 endif
1911
1912 endif ! if (uni_cld) then
1913
1914 do k = 1, nlay
1915 do i = 1, ix
1916 if (cldtot(i,k) < climit) then
1917 cldtot(i,k) = 0.0
1918 cwp(i,k) = 0.0
1919 cip(i,k) = 0.0
1920 crp(i,k) = 0.0
1921 csp(i,k) = 0.0
1922 endif
1923 enddo
1924 enddo
1925
1926 if ( lcnorm ) then
1927 do k = 1, nlay
1928 do i = 1, ix
1929 if (cldtot(i,k) >= climit) then
1930 tem1 = 1.0 / max(climit2, cldtot(i,k))
1931 cwp(i,k) = cwp(i,k) * tem1
1932 cip(i,k) = cip(i,k) * tem1
1933 crp(i,k) = crp(i,k) * tem1
1934 csp(i,k) = csp(i,k) * tem1
1935 endif
1936 enddo
1937 enddo
1938 endif
1939!
1940 do k = 1, nlay
1941 do i = 1, ix
1942 cld_frac(i,k) = cldtot(i,k)
1943 cld_lwp(i,k) = cwp(i,k)
1944 cld_reliq(i,k) = rew(i,k)
1945 cld_iwp(i,k) = cip(i,k)
1946 cld_reice(i,k) = rei(i,k)
1947 cld_rwp(i,k) = crp(i,k)
1948 cld_rerain(i,k) = rer(i,k)
1949 cld_swp(i,k) = 0.0
1950 cld_resnow(i,k) = 10.0
1951 re_cloud(i,k) = rew(i,k)
1952 re_ice(i,k) = rei(i,k)
1953 re_snow(i,k) = 10.
1954 enddo
1955 enddo
1956!
1957 return
1958!...................................
1959 end subroutine progcld_fer_hires
1960!...................................
1961
1962
1965 & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs:
1966 & xlat,xlon,slmsk,dz,delp, &
1967 & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl,con_ttp, &
1968 & xr_cnvcld, ix, nlay, nlp1, &
1969 & uni_cld, lmfshal, lmfdeep2, cldcov, cnvw, &
1970 & re_cloud,re_ice,re_snow, &
1971 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
1972 & dzlay, cldtot, cldcnv, lcnorm, &
1973 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
1974 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
1975 & )
1976
1977! ================= subprogram documentation block ================ !
1978! !
1979! subprogram: progcld_thompson_wsm6 !
1980! computes cloud related quantities using !
1981! Thompson/WSM6/NSSL cloud microphysics scheme. !
1982! !
1983! abstract: this program computes cloud fractions from cloud !
1984! condensates, !
1985! and computes the low, mid, high, total and boundary layer cloud !
1986! fractions and the vertical indices of low, mid, and high cloud !
1987! top and base. the three vertical cloud domains are set up in the !
1988! initial subroutine "cld_init". !
1989! !
1990! usage: call progcld_thompson_wsm6 !
1991! !
1992! attributes: !
1993! language: fortran 90 !
1994! machine: ibm-sp, sgi !
1995! !
1996! !
1997! ==================== definition of variables ==================== !
1998! !
1999! !
2000! input variables: !
2001! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
2002! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
2003! tlyr (IX,NLAY) : model layer mean temperature in k !
2004! tvly (IX,NLAY) : model layer virtual temperature in k !
2005! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
2006! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
2007! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
2008! clw (IX,NLAY,ntrac) : layer cloud condensate amount !
2009! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
2010! range, otherwise see in-line comment !
2011! xlon (IX) : grid longitude in radians (not used) !
2012! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
2013! dz (ix,nlay) : layer thickness (km) !
2014! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
2015! IX : horizontal dimention !
2016! NLAY,NLP1 : vertical layer/level dimensions !
2017! uni_cld : logical - true for cloud fraction from shoc !
2018! lmfshal : logical - true for mass flux shallow convection !
2019! lmfdeep2 : logical - true for mass flux deep convection !
2020! cldcov : layer cloud fraction (used when uni_cld=.true. !
2021! lmfshal : mass-flux shallow conv scheme flag !
2022! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
2023! lcrick : control flag for eliminating CRICK !
2024! =t: apply layer smoothing to eliminate CRICK !
2025! =f: do not apply layer smoothing !
2026! lcnorm : control flag for in-cld condensate !
2027! =t: normalize cloud condensate !
2028! =f: not normalize cloud condensate !
2029! !
2030! output variables: !
2031! cloud profiles: !
2032! cld_frac (:,:) - layer total cloud fraction !
2033! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
2034! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
2035! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
2036! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
2037! cld_rwp (:,:) - layer rain drop water path not assigned !
2038! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
2039! *** cld_swp (:,:) - layer snow flake water path not assigned !
2040! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
2041! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) !
2042! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl !
2043! mtop (IX,3) : vertical indices for low, mid, hi cloud tops !
2044! mbot (IX,3) : vertical indices for low, mid, hi cloud bases !
2045! de_lgth(ix) : clouds decorrelation length (km) !
2046! !
2047! ==================== end of description ===================== !
2048!
2049 implicit none
2050
2051! --- inputs
2052 integer, intent(in) :: ix, nlay, nlp1
2053 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl
2054
2055 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, lcnorm, &
2056 & xr_cnvcld
2057
2058 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
2059 & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, &
2060 & re_cloud, re_ice, re_snow, cnvw
2061 real (kind=kind_phys), dimension(:), intent(inout) :: &
2062 & lwp_ex, iwp_ex, lwp_fc, iwp_fc
2063
2064 real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw
2065
2066 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
2067 & slmsk
2068 real (kind=kind_phys), intent(in) :: con_ttp
2069! --- inputs/outputs
2070
2071 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
2072 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
2073 & cld_rwp, cld_rerain, cld_swp, cld_resnow
2074
2075! --- local variables:
2076 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
2077 & cwp, cip, crp, csp, rew, rei, res, rer, tem2d, clwf
2078
2079 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
2080 & tem1, tem2, tem3
2081
2082 integer :: i, k, id, nf
2083
2084! --- constant values
2085 real (kind=kind_phys), parameter :: xrc3 = 100.
2086 real (kind=kind_phys), parameter :: snow2ice = 0.25
2087 real (kind=kind_phys), parameter :: coef_t = 0.025
2088!
2089!===> ... begin here
2090
2091 do k = 1, nlay
2092 do i = 1, ix
2093 cldtot(i,k) = 0.0
2094 cldcnv(i,k) = 0.0
2095 cwp(i,k) = 0.0
2096 cip(i,k) = 0.0
2097 crp(i,k) = 0.0
2098 csp(i,k) = 0.0
2099 rew(i,k) = re_cloud(i,k)
2100 rei(i,k) = re_ice(i,k)
2101 rer(i,k) = rrain_def ! default rain radius to 1000 micron
2102 res(i,k) = re_snow(i,k)
2103 tem2d(i,k) = min(1.0, max( 0.0, (con_ttp-tlyr(i,k))*coef_t))
2104 clwf(i,k) = 0.0
2105 enddo
2106 enddo
2107!
2108!
2109! if ( lcrick ) then
2110! do i = 1, IX
2111! clwf(i,1) = 0.75*clw(i,1) + 0.25*clw(i,2)
2112! clwf(i,nlay) = 0.75*clw(i,nlay) + 0.25*clw(i,nlay-1)
2113! enddo
2114! do k = 2, NLAY-1
2115! do i = 1, IX
2116! clwf(i,K) = 0.25*clw(i,k-1) + 0.5*clw(i,k) + 0.25*clw(i,k+1)
2117! enddo
2118! enddo
2119! else
2120! do k = 1, NLAY
2121! do i = 1, IX
2122! clwf(i,k) = clw(i,k)
2123! enddo
2124! enddo
2125! endif
2126
2129
2130 if(xr_cnvcld)then
2131 do k = 1, nlay
2132 do i = 1, ix
2133 clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw)
2134 & + clw(i,k,ntrw) + cnvw(i,k)
2135 enddo
2136 enddo
2137 else
2138 do k = 1, nlay
2139 do i = 1, ix
2140 clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw)
2141 & + clw(i,k,ntrw)
2142 enddo
2143 enddo
2144 endif
2145
2148 do k = 1, nlay-1
2149 do i = 1, ix
2150 if(xr_cnvcld)then
2151 tem1 = cnvw(i,k)*(1.-tem2d(i,k))
2152 else
2153 tem1 = 0.
2154 endif
2155 cwp(i,k) = max(0.0, (clw(i,k,ntcw)+tem1) *
2156 & gfac * delp(i,k))
2157 if(tem1 > 1.e-12 .and. clw(i,k,ntcw) < 1.e-12)
2158 & rew(i,k)=reliq_def
2159 if(xr_cnvcld)then
2160 tem2 = cnvw(i,k)*tem2d(i,k)
2161 else
2162 tem2 = 0.
2163 endif
2164 cip(i,k) = max(0.0, (clw(i,k,ntiw) +
2165 & snow2ice*clw(i,k,ntsw) + tem2) *
2166 & gfac * delp(i,k))
2167 if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12)
2168 & rei(i,k)=reice_def
2169 crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k))
2170 csp(i,k) = max(0.0, (1.-snow2ice)*clw(i,k,ntsw) *
2171 & gfac * delp(i,k))
2172 enddo
2173 enddo
2174
2176
2177 do i = 1, ix
2178 lwp_ex(i) = 0.0
2179 iwp_ex(i) = 0.0
2180 lwp_fc(i) = 0.0
2181 iwp_fc(i) = 0.0
2182 do k = 1, nlay-1
2183 lwp_ex(i) = lwp_ex(i) + cwp(i,k)
2184 iwp_ex(i) = iwp_ex(i) + cip(i,k) + csp(i,k)
2185 enddo
2186 lwp_ex(i) = lwp_ex(i)*1.e-3
2187 iwp_ex(i) = iwp_ex(i)*1.e-3
2188 enddo
2189
2190 if (uni_cld) then ! use unified sgs clouds generated outside
2191 do k = 1, nlay
2192 do i = 1, ix
2193 cldtot(i,k) = cldcov(i,k)
2194 enddo
2195 enddo
2196
2197 else
2198
2200
2201 if (.not. lmfshal) then
2203 & ( ix, nlay, plyr, clwf, rhly, qstl, & ! --- inputs
2204 & cldtot ) & ! --- outputs
2205 else
2207 & ( ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, & ! --- inputs
2208 & cldtot )
2209 endif
2210
2211 endif ! if (uni_cld) then
2212
2213 do k = 1, nlay
2214 do i = 1, ix
2215 if (cldtot(i,k) < climit) then
2216 cldtot(i,k) = 0.0
2217 cwp(i,k) = 0.0
2218 cip(i,k) = 0.0
2219 crp(i,k) = 0.0
2220 csp(i,k) = 0.0
2221 endif
2222 enddo
2223 enddo
2224
2225 ! What portion of water and ice contents is associated with the
2226 ! partly cloudy boxes
2227 do i = 1, ix
2228 do k = 1, nlay-1
2229 if (cldtot(i,k).ge.climit .and. cldtot(i,k).lt.ovcst) then
2230 lwp_fc(i) = lwp_fc(i) + cwp(i,k)
2231 iwp_fc(i) = iwp_fc(i) + cip(i,k) + csp(i,k)
2232 endif
2233 enddo
2234 lwp_fc(i) = lwp_fc(i)*1.e-3
2235 iwp_fc(i) = iwp_fc(i)*1.e-3
2236 enddo
2237
2238 if ( lcnorm ) then
2239 do k = 1, nlay
2240 do i = 1, ix
2241 if (cldtot(i,k) >= climit) then
2242 tem1 = 1.0 / max(climit2, cldtot(i,k))
2243 cwp(i,k) = cwp(i,k) * tem1
2244 cip(i,k) = cip(i,k) * tem1
2245 crp(i,k) = crp(i,k) * tem1
2246 csp(i,k) = csp(i,k) * tem1
2247 endif
2248 enddo
2249 enddo
2250 endif
2251
2252 do k = 1, nlay
2253 do i = 1, ix
2254 cld_frac(i,k) = cldtot(i,k)
2255 cld_lwp(i,k) = cwp(i,k)
2256 cld_reliq(i,k) = rew(i,k)
2257 cld_iwp(i,k) = cip(i,k)
2258 cld_reice(i,k) = rei(i,k)
2259 cld_rwp(i,k) = crp(i,k) ! added for Thompson
2260 cld_rerain(i,k) = rer(i,k)
2261 cld_swp(i,k) = csp(i,k) ! added for Thompson
2262 cld_resnow(i,k) = res(i,k)
2263 enddo
2264 enddo
2265
2266 return
2267
2268!............................................
2269 end subroutine progcld_thompson_wsm6
2270!............................................
2271
2272
2282 subroutine progcld_thompson &
2283 & ( plyr,plvl,tlyr,qlyr,qstl,rhly,clw, & ! --- inputs:
2284 & xlat,xlon,slmsk,dz,delp, &
2285 & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, &
2286 & ix, nlay, nlp1, &
2287 & uni_cld, lmfshal, lmfdeep2, cldcov, &
2288 & re_cloud,re_ice,re_snow, &
2289 & lwp_ex, iwp_ex, lwp_fc, iwp_fc, &
2290 & dzlay, gridkm, top_at_1, cldtot, cldcnv, &
2291 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
2292 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
2293 & )
2294
2295! ================= subprogram documentation block ================ !
2296! !
2297! subprogram: progcld_thompson computes cloud related quantities !
2298! using Thompson cloud microphysics scheme. !
2299! !
2300! abstract: this program computes cloud fractions from cloud !
2301! condensates, !
2302! and computes the low, mid, high, total and boundary layer cloud !
2303! fractions and the vertical indices of low, mid, and high cloud !
2304! top and base. the three vertical cloud domains are set up in the !
2305! initial subroutine "cld_init". !
2306! !
2307! usage: call progcld_thompson !
2308! !
2309! attributes: !
2310! language: fortran 90 !
2311! machine: ibm-sp, sgi !
2312! !
2313! !
2314! ==================== definition of variables ==================== !
2315! !
2316! !
2317! input variables: !
2318! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
2319! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
2320! tlyr (IX,NLAY) : model layer mean temperature in k !
2321! tvly (IX,NLAY) : model layer virtual temperature in k !
2322! qlyr (IX,NLAY) : layer specific humidity in gm/gm !
2323! qstl (IX,NLAY) : layer saturate humidity in gm/gm !
2324! rhly (IX,NLAY) : layer relative humidity (=qlyr/qstl) !
2325! clw (IX,NLAY,ntrac) : layer cloud condensate amount !
2326! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
2327! range, otherwise see in-line comment !
2328! xlon (IX) : grid longitude in radians (not used) !
2329! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
2330! dz (ix,nlay) : layer thickness (km) !
2331! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
2332! gridkm (IX) : grid length in km !
2333! IX : horizontal dimention !
2334! NLAY,NLP1 : vertical layer/level dimensions !
2335! uni_cld : logical - true for cloud fraction from shoc !
2336! lmfshal : logical - true for mass flux shallow convection !
2337! lmfdeep2 : logical - true for mass flux deep convection !
2338! top_at_1 : logical - true if vertical ordereing is toa-2-sfc !
2339! cldcov : layer cloud fraction (used when uni_cld=.true. !
2340! lmfshal : mass-flux shallow conv scheme flag !
2341! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
2342! lcrick : control flag for eliminating CRICK !
2343! =t: apply layer smoothing to eliminate CRICK !
2344! =f: do not apply layer smoothing !
2345! lcnorm : control flag for in-cld condensate !
2346! =t: normalize cloud condensate !
2347! =f: not normalize cloud condensate !
2348! !
2349! output variables: !
2350! cloud profiles: !
2351! cld_frac (:,:) - layer total cloud fraction !
2352! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
2353! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
2354! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
2355! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
2356! cld_rwp (:,:) - layer rain drop water path not assigned !
2357! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
2358! *** cld_swp (:,:) - layer snow flake water path not assigned !
2359! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
2360! !
2361! ==================== end of description ===================== !
2362!
2363 implicit none
2364
2365! --- inputs
2366 integer, intent(in) :: ix, nlay, nlp1
2367 integer, intent(in) :: ntrac, ntcw, ntiw, ntrw, ntsw, ntgl
2368
2369 logical, intent(in) :: uni_cld, lmfshal, lmfdeep2, top_at_1
2370
2371 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, &
2372 & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, &
2373 & re_cloud, re_ice, re_snow
2374 real (kind=kind_phys), dimension(:), intent(inout) :: &
2375 & lwp_ex, iwp_ex, lwp_fc, iwp_fc
2376
2377 real (kind=kind_phys), dimension(:,:,:), intent(in) :: clw
2378
2379 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
2380 & slmsk
2381 real(kind=kind_phys), dimension(:), intent(in) :: gridkm
2382
2383! --- inputs/outputs
2384
2385 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
2386 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
2387 & cld_rwp, cld_rerain, cld_swp, cld_resnow
2388
2389! --- local variables:
2390 real (kind=kind_phys), dimension(IX,NLAY) :: cldtot, cldcnv, &
2391 & cwp, cip, crp, csp, rew, rei, res, rer
2392
2393 real (kind=kind_phys), dimension(NLAY) :: cldfra1d, qv1d, &
2394 & qc1d, qi1d, qs1d, dz1d, p1d, t1d
2395
2396 real (kind=kind_phys) :: clwmin, tem1
2397 real (kind=kind_phys) :: corr, xland, snow_mass_factor
2398 real (kind=kind_phys), parameter :: max_relh = 1.5
2399 real (kind=kind_phys), parameter :: snow_max_radius = 130.0
2400
2401 integer :: i, k, k2, id, nf, idx_rei
2402!
2403!===> ... begin here
2404!
2405
2406 clwmin = 1.0e-9
2407
2408 do k = 1, nlay
2409 do i = 1, ix
2410 cldtot(i,k) = 0.0
2411 cldcnv(i,k) = 0.0
2412 cwp(i,k) = 0.0
2413 cip(i,k) = 0.0
2414 crp(i,k) = 0.0
2415 csp(i,k) = 0.0
2416 rew(i,k) = re_cloud(i,k)
2417 rei(i,k) = re_ice(i,k)
2418 rer(i,k) = rrain_def ! default rain radius to 1000 micron
2419 res(i,k) = re_snow(i,k)
2420 enddo
2421 enddo
2422
2426
2427 do k = 1, nlay-1
2428 do i = 1, ix
2429 cwp(i,k) = max(0.0, clw(i,k,ntcw) * dz(i,k)*1.e6)
2430 crp(i,k) = 0.0
2431 snow_mass_factor = 0.90
2432 cip(i,k) = max(0.0, (clw(i,k,ntiw) &
2433 & + (1.0-snow_mass_factor)*clw(i,k,ntsw))*dz(i,k)*1.e6)
2434 if (re_snow(i,k) .gt. snow_max_radius)then
2435 snow_mass_factor = min(snow_mass_factor, &
2436 & (snow_max_radius/re_snow(i,k)) &
2437 & *(snow_max_radius/re_snow(i,k)))
2438 res(i,k) = snow_max_radius
2439 endif
2440 csp(i,k) = max(0.,snow_mass_factor*clw(i,k,ntsw)*dz(i,k)*1.e6)
2441 enddo
2442 enddo
2443
2445
2446 do i = 1, ix
2447 lwp_ex(i) = 0.0
2448 iwp_ex(i) = 0.0
2449 do k = 1, nlay-1
2450 lwp_ex(i) = lwp_ex(i) + cwp(i,k)
2451 iwp_ex(i) = iwp_ex(i) + cip(i,k) + csp(i,k)
2452 enddo
2453 enddo
2454
2463
2464 do i = 1, ix
2465 if (slmsk(i)-0.5 .gt. 0.5 .and. slmsk(i)+0.5 .lt. 1.5) then
2466 xland = 1.0
2467 else
2468 xland = 2.0
2469 endif
2470
2471 cldfra1d(:) = 0.0
2472
2473 if (.not. top_at_1) then
2474 do k = 1, nlay
2475 qv1d(k) = qlyr(i,k)
2476 qc1d(k) = max(0.0, clw(i,k,ntcw))
2477 qi1d(k) = max(0.0, clw(i,k,ntiw))
2478 qs1d(k) = max(0.0, clw(i,k,ntsw))
2479 dz1d(k) = dz(i,k)*1.e3
2480 p1d(k) = plyr(i,k)*100.0
2481 t1d(k) = tlyr(i,k)
2482 enddo
2483 else
2484 do k = nlay, 1, -1
2485 k2 = nlay - k + 1
2486 qv1d(k2) = qlyr(i,k)
2487 qc1d(k2) = max(0.0, clw(i,k,ntcw))
2488 qi1d(k2) = max(0.0, clw(i,k,ntiw))
2489 qs1d(k2) = max(0.0, clw(i,k,ntsw))
2490 dz1d(k2) = dz(i,k)*1.e3
2491 p1d(k2) = plyr(i,k)*100.0
2492 t1d(k2) = tlyr(i,k)
2493 enddo
2494 endif
2495
2496 call cal_cldfra3(cldfra1d, qv1d, qc1d, qi1d, qs1d, dz1d, &
2497 & p1d, t1d, xland, gridkm(i), &
2498 & .false., max_relh, 1, nlay, .false.)
2499
2500 do k = 1, nlay
2501 cldtot(i,k) = cldfra1d(k)
2502 if (qc1d(k).gt.clwmin .and. cldfra1d(k).lt.ovcst) then
2503 cwp(i,k) = qc1d(k) * dz1d(k)*1000.
2504 if ((xland-1.5).GT.0.) then !--- Ocean
2505 rew(i,k) = 9.5
2506 else !--- Land
2507 rew(i,k) = 5.5
2508 endif
2509 endif
2510 if (qi1d(k).gt.clwmin .and. cldfra1d(k).lt.ovcst) then
2511 cip(i,k) = qi1d(k) * dz1d(k)*1000.
2512 idx_rei = int(t1d(k)-179.)
2513 idx_rei = min(max(idx_rei,1),75)
2514 corr = t1d(k) - int(t1d(k))
2515 rei(i,k) = max(5.0, retab(idx_rei)*(1.-corr) + &
2516 & retab(idx_rei+1)*corr)
2517 endif
2518 enddo
2519 enddo
2520
2521 do k = 1, nlay
2522 do i = 1, ix
2523 cld_frac(i,k) = cldtot(i,k)
2524 cld_lwp(i,k) = cwp(i,k)
2525 cld_reliq(i,k) = rew(i,k)
2526 cld_iwp(i,k) = cip(i,k)
2527 cld_reice(i,k) = rei(i,k)
2528 cld_rwp(i,k) = crp(i,k) ! added for Thompson
2529 cld_rerain(i,k) = rer(i,k)
2530 cld_swp(i,k) = csp(i,k) ! added for Thompson
2531 cld_resnow(i,k) = res(i,k)
2532 enddo
2533 enddo
2534
2536
2537 do i = 1, ix
2538 lwp_fc(i) = 0.0
2539 iwp_fc(i) = 0.0
2540 do k = 1, nlay
2541 lwp_fc(i) = lwp_fc(i) + cwp(i,k)
2542 iwp_fc(i) = iwp_fc(i) + cip(i,k) + csp(i,k)
2543 enddo
2544 lwp_fc(i) = max(0.0, lwp_fc(i) - lwp_ex(i))
2545 iwp_fc(i) = max(0.0, iwp_fc(i) - iwp_ex(i))
2546 lwp_fc(i) = lwp_fc(i)*1.e-3
2547 iwp_fc(i) = iwp_fc(i)*1.e-3
2548 lwp_ex(i) = lwp_ex(i)*1.e-3
2549 iwp_ex(i) = iwp_ex(i)*1.e-3
2550 enddo
2551!
2552 return
2553
2554!............................................
2555 end subroutine progcld_thompson
2556!............................................
2557!mz
2558
2559
2563 subroutine progclduni &
2564 & ( plyr,plvl,tlyr,tvly,ccnd,ncnd, & ! --- inputs:
2565 & xlat,xlon,slmsk,dz,delp, ix, nlay, nlp1, cldtot, &
2566 & effrl,effri,effrr,effrs,effr_in, &
2567 & dzlay, cldtot1, cldcnv, lcrick, lcnorm, con_ttp, &
2568 & cld_frac, cld_lwp, cld_reliq, cld_iwp, & ! --- outputs
2569 & cld_reice,cld_rwp, cld_rerain,cld_swp, cld_resnow &
2570 & )
2571
2572! ================= subprogram documentation block ================ !
2573! !
2574! subprogram: progclduni computes cloud related quantities using !
2575! for unified cloud microphysics scheme. !
2576! !
2577! abstract: this program computes cloud fractions from cloud !
2578! condensates, calculates liquid/ice cloud droplet effective radius, !
2579! and computes the low, mid, high, total and boundary layer cloud !
2580! fractions and the vertical indices of low, mid, and high cloud !
2581! top and base. the three vertical cloud domains are set up in the !
2582! initial subroutine "cld_init". !
2583! This program is written by Moorthi !
2584! to represent unified cloud across all physics while !
2585! using SHOC+MG2/3+convection (RAS or SAS or CSAW) !
2586! !
2587! usage: call progclduni !
2588! !
2589! attributes: !
2590! language: fortran 90 !
2591! machine: ibm-sp, sgi !
2592! !
2593! !
2594! ==================== definition of variables ==================== !
2595! !
2596! input variables: !
2597! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
2598! plvl (IX,NLP1) : model level pressure in mb (100Pa) !
2599! tlyr (IX,NLAY) : model layer mean temperature in k !
2600! tvly (IX,NLAY) : model layer virtual temperature in k !
2601! ccnd (IX,NLAY,ncnd) : layer cloud condensate amount !
2602! water, ice, rain, snow (+ graupel) !
2603! ncnd : number of layer cloud condensate types (max of 4) !
2604! xlat (IX) : grid latitude in radians, default to pi/2 -> -pi/2!
2605! range, otherwise see in-line comment !
2606! xlon (IX) : grid longitude in radians (not used) !
2607! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) !
2608! IX : horizontal dimention !
2609! NLAY,NLP1 : vertical layer/level dimensions !
2610! cldtot : unified cloud fracrion from moist physics !
2611! effrl (ix,nlay) : effective radius for liquid water !
2612! effri (ix,nlay) : effective radius for ice water !
2613! effrr (ix,nlay) : effective radius for rain water !
2614! effrs (ix,nlay) : effective radius for snow water !
2615! effr_in : logical - if .true. use input effective radii !
2616! dz (ix,nlay) : layer thickness (km) !
2617! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) !
2618! dzlay(ix,nlay) : thickness between model layer centers (km) !
2619! lmfshal : mass-flux shallow conv scheme flag !
2620! lmfdeep2 : scale-aware mass-flux deep conv scheme flag !
2621! lcrick : control flag for eliminating CRICK !
2622! =t: apply layer smoothing to eliminate CRICK !
2623! =f: do not apply layer smoothing !
2624! lcnorm : control flag for in-cld condensate !
2625! =t: normalize cloud condensate !
2626! =f: not normalize cloud condensate !
2627! !
2628! output variables: !
2629! cloud profiles: !
2630! cld_frac (:,:) - layer total cloud fraction !
2631! cld_lwp (:,:) - layer cloud liq water path (g/m**2) !
2632! cld_reliq (:,:) - mean eff radius for liq cloud (micron) !
2633! cld_iwp (:,:) - layer cloud ice water path (g/m**2) !
2634! cld_reice (:,:) - mean eff radius for ice cloud (micron) !
2635! cld_rwp (:,:) - layer rain drop water path not assigned !
2636! cld_rerain(:,:) - mean eff radius for rain drop (micron) !
2637! *** cld_swp (:,:) - layer snow flake water path not assigned !
2638! cld_resnow(:,:) - mean eff radius for snow flake (micron) !
2639! *** fu's scheme need to be normalized by snow density (g/m**3/1.0e6) !
2640! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl !
2641! mtop (IX,3) : vertical indices for low, mid, hi cloud tops !
2642! mbot (IX,3) : vertical indices for low, mid, hi cloud bases !
2643! de_lgth(ix) : clouds decorrelation length (km) !
2644! alpha(ix,nlay) : alpha decorrelation parameter !
2645! !
2646! ==================== end of description ===================== !
2647!
2648 implicit none
2649
2650! --- inputs
2651 integer, intent(in) :: ix, nlay, nlp1, ncnd
2652 logical, intent(in) :: effr_in, lcrick, lcnorm
2653
2654 real (kind=kind_phys), intent(in) :: con_ttp
2655 real (kind=kind_phys), dimension(:,:,:), intent(in) :: ccnd
2656 real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr,&
2657 & tlyr, tvly, cldtot, effrl, effri, effrr, effrs, dz, delp, &
2658 & dzlay
2659
2660 real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, &
2661 & slmsk
2662
2663 real (kind=kind_phys), dimension(:,:), intent(inout) :: cldtot1
2664
2665! --- inputs/outputs
2666
2667 real (kind=kind_phys), dimension(:,:), intent(inout) :: &
2668 & cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, &
2669 & cld_rwp, cld_rerain, cld_swp, cld_resnow
2670
2671! --- local variables:
2672 real (kind=kind_phys), dimension(IX,NLAY) :: cldcnv, cwp, cip, &
2673 & crp, csp, rew, rei, res, rer
2674 real (kind=kind_phys), dimension(IX,NLAY,ncnd) :: cndf
2675
2676 real (kind=kind_phys) :: tem1, tem2, tem3
2677
2678 integer :: i, k, id, nf, n
2679
2680!
2681!===> ... begin here
2682!
2683 do k = 1, nlay
2684 do i = 1, ix
2685 cldcnv(i,k) = 0.0
2686 cwp(i,k) = 0.0
2687 cip(i,k) = 0.0
2688 crp(i,k) = 0.0
2689 csp(i,k) = 0.0
2690 enddo
2691 enddo
2692 do n=1,ncnd
2693 do k = 1, nlay
2694 do i = 1, ix
2695 cndf(i,k,n) = ccnd(i,k,n)
2696 enddo
2697 enddo
2698 enddo
2699 if ( lcrick ) then ! vertical smoorthing
2700 do n=1,ncnd
2701 do i = 1, ix
2702 cndf(i,1,n) = 0.75*ccnd(i,1,n) + 0.25*ccnd(i,2,n)
2703 cndf(i,nlay,n) = 0.75*ccnd(i,nlay,n) + 0.25*ccnd(i,nlay-1,n)
2704 enddo
2705 do k = 2, nlay-1
2706 do i = 1, ix
2707 cndf(i,k,n) = 0.25 * (ccnd(i,k-1,n) + ccnd(i,k+1,n)) &
2708 & + 0.5 * ccnd(i,k,n)
2709 enddo
2710 enddo
2711 enddo
2712 endif
2713
2715
2716 if (ncnd == 2) then
2717 do k = 1, nlay
2718 do i = 1, ix
2719 tem1 = gfac * delp(i,k)
2720 cwp(i,k) = cndf(i,k,1) * tem1
2721 cip(i,k) = cndf(i,k,2) * tem1
2722 enddo
2723 enddo
2724 elseif (ncnd == 4) then
2725 do k = 1, nlay
2726 do i = 1, ix
2727 tem1 = gfac * delp(i,k)
2728 cwp(i,k) = cndf(i,k,1) * tem1
2729 cip(i,k) = cndf(i,k,2) * tem1
2730 crp(i,k) = cndf(i,k,3) * tem1
2731 csp(i,k) = cndf(i,k,4) * tem1
2732 enddo
2733 enddo
2734 endif
2735
2736 do k = 1, nlay
2737 do i = 1, ix
2738 if (cldtot(i,k) < climit) then
2739 cwp(i,k) = 0.0
2740 cip(i,k) = 0.0
2741 crp(i,k) = 0.0
2742 csp(i,k) = 0.0
2743 endif
2744 enddo
2745 enddo
2746
2747 if ( lcnorm ) then
2748 do k = 1, nlay
2749 do i = 1, ix
2750 if (cldtot(i,k) >= climit) then
2751 tem1 = 1.0 / max(climit2, cldtot(i,k))
2752 cwp(i,k) = cwp(i,k) * tem1
2753 cip(i,k) = cip(i,k) * tem1
2754 crp(i,k) = crp(i,k) * tem1
2755 csp(i,k) = csp(i,k) * tem1
2756 endif
2757 enddo
2758 enddo
2759 endif
2760
2761! assign/calculate efective radii for cloud water, ice, rain, snow
2762
2763 if (effr_in) then
2764 do k = 1, nlay
2765 do i = 1, ix
2766 rew(i,k) = effrl(i,k)
2767 rei(i,k) = max(10.0, min(150.0,effri(i,k)))
2768 rer(i,k) = effrr(i,k)
2769 res(i,k) = effrs(i,k)
2770 enddo
2771 enddo
2772 else
2773 do k = 1, nlay
2774 do i = 1, ix
2775 rew(i,k) = reliq_def ! default liq radius to 10 micron
2776 rei(i,k) = reice_def ! default ice radius to 50 micron
2777 rer(i,k) = rrain_def ! default rain radius to 1000 micron
2778 res(i,k) = rsnow_def ! default snow radius to 250 micron
2779 enddo
2780 enddo
2782 do i = 1, ix
2783 if (nint(slmsk(i)) == 1) then
2784 do k = 1, nlay
2785 tem1 = min(1.0, max(0.0, (con_ttp-tlyr(i,k))*0.05))
2786 rew(i,k) = 5.0 + 5.0 * tem1
2787 enddo
2788 endif
2789 enddo
2790
2793
2794 do k = 1, nlay
2795 do i = 1, ix
2796 tem2 = tlyr(i,k) - con_ttp
2797
2798 if (cip(i,k) > 0.0) then
2799 tem3 = gord * cip(i,k) * plyr(i,k) / (delp(i,k)*tvly(i,k))
2800
2801 if (tem2 < -50.0) then
2802 rei(i,k) = (1250.0/9.917) * tem3 ** 0.109
2803 elseif (tem2 < -40.0) then
2804 rei(i,k) = (1250.0/9.337) * tem3 ** 0.08
2805 elseif (tem2 < -30.0) then
2806 rei(i,k) = (1250.0/9.208) * tem3 ** 0.055
2807 else
2808 rei(i,k) = (1250.0/9.387) * tem3 ** 0.031
2809 endif
2810! rei(i,k) = max(20.0, min(rei(i,k), 300.0))
2811! rei(i,k) = max(10.0, min(rei(i,k), 100.0))
2812 rei(i,k) = max(10.0, min(rei(i,k), 150.0))
2813! rei(i,k) = max(5.0, min(rei(i,k), 130.0))
2814 endif
2815 enddo
2816 enddo
2817 endif
2818
2819 do k = 1, nlay
2820 do i = 1, ix
2821 cldtot1(i,k) = cldtot(i,k)
2822 enddo
2823 enddo
2824!
2825 do k = 1, nlay
2826 do i = 1, ix
2827 cld_frac(i,k) = cldtot(i,k)
2828 cld_lwp(i,k) = cwp(i,k)
2829 cld_reliq(i,k) = rew(i,k)
2830 cld_iwp(i,k) = cip(i,k)
2831 cld_reice(i,k) = rei(i,k)
2832 cld_rwp(i,k) = crp(i,k) ! added for Thompson
2833 cld_rerain(i,k) = rer(i,k)
2834 cld_swp(i,k) = csp(i,k) ! added for Thompson
2835 cld_resnow(i,k) = res(i,k)
2836 enddo
2837 enddo
2838!
2839 return
2840!...................................
2841 end subroutine progclduni
2842!-----------------------------------
2843
2870 subroutine gethml &
2871 & ( plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, & ! --- inputs:
2872 & ix, nlay, iovr, iovr_rand, iovr_maxrand, iovr_max, &
2873 & iovr_dcorr, iovr_exp, iovr_exprand, top_at_1, si, &
2874 & clds, mtop, mbot & ! --- outputs:
2875 & )
2876
2877! =================================================================== !
2878! !
2879! abstract: compute high, mid, low, total, and boundary cloud fractions !
2880! and cloud top/bottom layer indices for model diagnostic output. !
2881! the three cloud domain boundaries are defined by ptopc. the cloud !
2882! overlapping method is defined by control flag 'iovr', which is also !
2883! used by lw and sw radiation programs. !
2884! !
2885! usage: call gethml !
2886! !
2887! subprograms called: none !
2888! !
2889! attributes: !
2890! language: fortran 90 !
2891! machine: ibm-sp, sgi !
2892! !
2893! !
2894! ==================== definition of variables ==================== !
2895! !
2896! input variables: !
2897! plyr (IX,NLAY) : model layer mean pressure in mb (100Pa) !
2898! ptop1 (IX,4) : pressure limits of cloud domain interfaces !
2899! (sfc,low,mid,high) in mb (100Pa) !
2900! cldtot(IX,NLAY) : total or straiform cloud profile in fraction !
2901! cldcnv(IX,NLAY) : convective cloud (for diagnostic scheme only) !
2902! dz (ix,nlay) : layer thickness (km) !
2903! de_lgth(ix) : clouds vertical de-correlation length (km) !
2904! alpha(ix,nlay) : alpha decorrelation parameter
2905! IX : horizontal dimention !
2906! NLAY : vertical layer dimensions !
2907! !
2908! output variables: !
2909! clds (IX,5) : fraction of clouds for low, mid, hi, tot, bl !
2910! mtop (IX,3) : vertical indices for low, mid, hi cloud tops !
2911! mbot (IX,3) : vertical indices for low, mid, hi cloud bases ! !
2912! internal module variables: !
2913! iovr : control flag for cloud overlap !
2914! =0 random overlapping clouds !
2915! =1 max/ran overlapping clouds !
2916! =2 maximum overlapping ( for mcica only ) !
2917! =3 decorr-length ovlp ( for mcica only ) !
2918! =4: exponential cloud overlap (AER; mcica only) !
2919! =5: exponential-random overlap (AER; mcica only) !
2920! !
2921! ==================== end of description ===================== !
2922!
2923 implicit none!
2924
2925! --- inputs:
2926 logical, intent(in) :: top_at_1
2927 integer, intent(in) :: ix, nlay
2928 integer, intent(in) :: &
2929 & iovr, !
2930 & iovr_rand, ! Flag for random cloud overlap method
2931 & iovr_maxrand, ! Flag for maximum-random cloud overlap method
2932 & iovr_max, ! Flag for maximum cloud overlap method
2933 & iovr_dcorr, ! Flag for decorrelation-length cloud overlap method
2934 & iovr_exp, ! Flag for exponential cloud overlap method
2935 & iovr_exprand ! Flag for exponential-random cloud overlap method
2936
2937 real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, ptop1, &
2938 & cldtot, cldcnv, dz
2939 real (kind=kind_phys), dimension(:), intent(in) :: de_lgth, si
2940 real (kind=kind_phys), dimension(:,:), intent(in) :: alpha
2941
2942! --- outputs
2943 real (kind=kind_phys), dimension(:,:), intent(out) :: clds
2944
2945 integer, dimension(:,:), intent(out) :: mtop, mbot
2946
2947! --- local variables:
2948 real (kind=kind_phys) :: cl1(ix), cl2(ix), dz1(ix)
2949 real (kind=kind_phys) :: pcur, pnxt, ccur, cnxt, alfa
2950
2951 integer, dimension(IX):: idom, kbt1, kth1, kbt2, kth2
2952 integer :: i, k, id, id1, kstr, kend, kinc,kl
2953
2954!
2955!===> ... begin here
2956!
2960
2961 if (top_at_1) then ! data from toa to sfc
2962 lab_do_k0 : do k = nlay, 2, -1
2963 kl = k
2964 if (si(k) < 0.9e0) exit lab_do_k0
2965 enddo lab_do_k0
2966 llyr = kl
2967 else ! data from sfc to top
2968 lab_do_k1 : do k = 2, nlay
2969 kl = k
2970 if (si(k) < 0.9e0) exit lab_do_k1
2971 enddo lab_do_k1
2972
2973 llyr = kl - 1
2974 endif ! end_if_top_at_1
2975
2976 clds(:,:) = 0.0
2977
2978 do i = 1, ix
2979 cl1(i) = 1.0
2980 cl2(i) = 1.0
2981 enddo
2982
2983! --- total and bl clouds, where cl1, cl2 are fractions of clear-sky view
2984! layer processed from surface and up
2985
2988
2989 if (top_at_1) then ! input data from toa to sfc
2990 kstr = nlay
2991 kend = 1
2992 kinc = -1
2993 else ! input data from sfc to toa
2994 kstr = 1
2995 kend = nlay
2996 kinc = 1
2997 endif ! end_if_top_at_1
2998
2999 if ( iovr == iovr_rand ) then ! random overlap
3000
3001 do k = kstr, kend, kinc
3002 do i = 1, ix
3003 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3004 if (ccur >= climit) cl1(i) = cl1(i) * (1.0 - ccur)
3005 enddo
3006
3007 if (k == llyr) then
3008 do i = 1, ix
3009 clds(i,5) = 1.0 - cl1(i) ! save bl cloud
3010 enddo
3011 endif
3012 enddo
3013
3014 do i = 1, ix
3015 clds(i,4) = 1.0 - cl1(i) ! save total cloud
3016 enddo
3017
3018 elseif ( iovr == iovr_maxrand ) then ! max/ran overlap
3019
3020 do k = kstr, kend, kinc
3021 do i = 1, ix
3022 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3023 if (ccur >= climit) then ! cloudy layer
3024 cl2(i) = min( cl2(i), (1.0 - ccur) )
3025 else ! clear layer
3026 cl1(i) = cl1(i) * cl2(i)
3027 cl2(i) = 1.0
3028 endif
3029 enddo
3030
3031 if (k == llyr) then
3032 do i = 1, ix
3033 clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud
3034 enddo
3035 endif
3036 enddo
3037
3038 do i = 1, ix
3039 clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud
3040 enddo
3041
3042 elseif ( iovr == iovr_max ) then ! maximum overlap all levels
3043
3044 cl1(:) = 0.0
3045
3046 do k = kstr, kend, kinc
3047 do i = 1, ix
3048 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3049 if (ccur >= climit) cl1(i) = max( cl1(i), ccur )
3050 enddo
3051
3052 if (k == llyr) then
3053 do i = 1, ix
3054 clds(i,5) = cl1(i) ! save bl cloud
3055 enddo
3056 endif
3057 enddo
3058
3059 do i = 1, ix
3060 clds(i,4) = cl1(i) ! save total cloud
3061 enddo
3062
3063 elseif ( iovr == iovr_dcorr ) then ! random if clear-layer divided,
3064 ! otherwise de-corrlength method
3065 do i = 1, ix
3066 dz1(i) = - dz(i,kstr)
3067 enddo
3068
3069 do k = kstr, kend, kinc
3070 do i = 1, ix
3071 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3072 if (ccur >= climit) then ! cloudy layer
3073 alfa = exp( -0.5*((dz1(i)+dz(i,k)))/de_lgth(i) )
3074 dz1(i) = dz(i,k)
3075 cl2(i) = alfa * min(cl2(i), (1.0 - ccur)) & ! maximum part
3076 & + (1.0 - alfa) * (cl2(i) * (1.0 - ccur)) ! random part
3077 else ! clear layer
3078 cl1(i) = cl1(i) * cl2(i)
3079 cl2(i) = 1.0
3080 if (k /= kend) dz1(i) = -dz(i,k+kinc)
3081 endif
3082 enddo
3083
3084 if (k == llyr) then
3085 do i = 1, ix
3086 clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud
3087 enddo
3088 endif
3089 enddo
3090
3091 do i = 1, ix
3092 clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud
3093 enddo
3094
3095 elseif ( iovr == iovr_exp .or. iovr == iovr_exprand ) then ! exponential overlap (iovr=4), or
3096 ! exponential-random (iovr=5);
3097 ! distinction defined by alpha
3098
3099 do k = kstr, kend, kinc
3100 do i = 1, ix
3101 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3102 if (ccur >= climit) then ! cloudy layer
3103 cl2(i) = alpha(i,k) * min(cl2(i), (1.0 - ccur)) & ! maximum part
3104 & + (1.0 - alpha(i,k)) * (cl2(i) * (1.0 - ccur)) ! random part
3105 else ! clear layer
3106 cl1(i) = cl1(i) * cl2(i)
3107 cl2(i) = 1.0
3108 endif
3109 enddo
3110
3111 if (k == llyr) then
3112 do i = 1, ix
3113 clds(i,5) = 1.0 - cl1(i) * cl2(i) ! save bl cloud
3114 enddo
3115 endif
3116 enddo
3117
3118 do i = 1, ix
3119 clds(i,4) = 1.0 - cl1(i) * cl2(i) ! save total cloud
3120 enddo
3121
3122 endif ! end_if_iovr
3123
3124! --- high, mid, low clouds, where cl1, cl2 are cloud fractions
3125! layer processed from one layer below llyr and up
3126! --- change! layer processed from surface to top, so low clouds will
3127! contains both bl and low clouds.
3128
3131 if (top_at_1) then ! input data from toa to sfc
3132
3133 do i = 1, ix
3134 cl1(i) = 0.0
3135 cl2(i) = 0.0
3136 kbt1(i) = nlay
3137 kbt2(i) = nlay
3138 kth1(i) = 0
3139 kth2(i) = 0
3140 idom(i) = 1
3141 mbot(i,1) = nlay
3142 mtop(i,1) = nlay
3143 mbot(i,2) = nlay - 1
3144 mtop(i,2) = nlay - 1
3145 mbot(i,3) = nlay - 1
3146 mtop(i,3) = nlay - 1
3147 enddo
3148
3149!org do k = llyr-1, 1, -1
3150 do k = nlay, 1, -1
3151 do i = 1, ix
3152 id = idom(i)
3153 id1= id + 1
3154
3155 pcur = plyr(i,k)
3156 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3157
3158 if (k > 1) then
3159 pnxt = plyr(i,k-1)
3160 cnxt = min( ovcst, max( cldtot(i,k-1), cldcnv(i,k-1) ))
3161 else
3162 pnxt = -1.0
3163 cnxt = 0.0
3164 endif
3165
3166 if (pcur < ptop1(i,id1)) then
3167 id = id + 1
3168 id1= id1 + 1
3169 idom(i) = id
3170 endif
3171
3172 if (ccur >= climit) then
3173 if (kth2(i) == 0) kbt2(i) = k
3174 kth2(i) = kth2(i) + 1
3175
3176 if ( iovr == iovr_rand ) then
3177 cl2(i) = cl2(i) + ccur - cl2(i)*ccur
3178 else
3179 cl2(i) = max( cl2(i), ccur )
3180 endif
3181
3182 if (cnxt < climit .or. pnxt < ptop1(i,id1)) then
3183 kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i) ) &
3184 & / (cl1(i) + cl2(i)) )
3185 kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i) ) &
3186 & / (cl1(i) + cl2(i)) )
3187 cl1(i) = cl1(i) + cl2(i) - cl1(i)*cl2(i)
3188
3189 kbt2(i) = k - 1
3190 kth2(i) = 0
3191 cl2(i) = 0.0
3192 endif ! end_if_cnxt_or_pnxt
3193 endif ! end_if_ccur
3194
3195 if (pnxt < ptop1(i,id1)) then
3196 clds(i,id) = cl1(i)
3197 mtop(i,id) = min( kbt1(i), kbt1(i)-kth1(i)+1 )
3198 mbot(i,id) = kbt1(i)
3199
3200 cl1(i) = 0.0
3201 kbt1(i) = k - 1
3202 kth1(i) = 0
3203
3204 if (id1 <= nk_clds) then
3205 mbot(i,id1) = kbt1(i)
3206 mtop(i,id1) = kbt1(i)
3207 endif
3208 endif ! end_if_pnxt
3209
3210 enddo ! end_do_i_loop
3211 enddo ! end_do_k_loop
3212
3213 else ! input data from sfc to toa
3214
3215 do i = 1, ix
3216 cl1(i) = 0.0
3217 cl2(i) = 0.0
3218 kbt1(i) = 1
3219 kbt2(i) = 1
3220 kth1(i) = 0
3221 kth2(i) = 0
3222 idom(i) = 1
3223 mbot(i,1) = 1
3224 mtop(i,1) = 1
3225 mbot(i,2) = 2
3226 mtop(i,2) = 2
3227 mbot(i,3) = 2
3228 mtop(i,3) = 2
3229 enddo
3230
3231!org do k = llyr+1, NLAY
3232 do k = 1, nlay
3233 do i = 1, ix
3234 id = idom(i)
3235 id1= id + 1
3236
3237 pcur = plyr(i,k)
3238 ccur = min( ovcst, max( cldtot(i,k), cldcnv(i,k) ))
3239
3240 if (k < nlay) then
3241 pnxt = plyr(i,k+1)
3242 cnxt = min( ovcst, max( cldtot(i,k+1), cldcnv(i,k+1) ))
3243 else
3244 pnxt = -1.0
3245 cnxt = 0.0
3246 endif
3247
3248 if (pcur < ptop1(i,id1)) then
3249 id = id + 1
3250 id1= id1 + 1
3251 idom(i) = id
3252 endif
3253
3254 if (ccur >= climit) then
3255 if (kth2(i) == 0) kbt2(i) = k
3256 kth2(i) = kth2(i) + 1
3257
3258 if ( iovr == iovr_rand ) then
3259 cl2(i) = cl2(i) + ccur - cl2(i)*ccur
3260 else
3261 cl2(i) = max( cl2(i), ccur )
3262 endif
3263
3264 if (cnxt < climit .or. pnxt < ptop1(i,id1)) then
3265 kbt1(i) = nint( (cl1(i)*kbt1(i) + cl2(i)*kbt2(i)) &
3266 & / (cl1(i) + cl2(i)) )
3267 kth1(i) = nint( (cl1(i)*kth1(i) + cl2(i)*kth2(i)) &
3268 & / (cl1(i) + cl2(i)) )
3269 cl1(i) = cl1(i) + cl2(i) - cl1(i)*cl2(i)
3270
3271 kbt2(i) = k + 1
3272 kth2(i) = 0
3273 cl2(i) = 0.0
3274 endif ! end_if_cnxt_or_pnxt
3275 endif ! end_if_ccur
3276
3277 if (pnxt < ptop1(i,id1)) then
3278 clds(i,id) = cl1(i)
3279 mtop(i,id) = max( kbt1(i), kbt1(i)+kth1(i)-1 )
3280 mbot(i,id) = kbt1(i)
3281
3282 cl1(i) = 0.0
3283 kbt1(i) = min(k+1, nlay)
3284 kth1(i) = 0
3285
3286 if (id1 <= nk_clds) then
3287 mbot(i,id1) = kbt1(i)
3288 mtop(i,id1) = kbt1(i)
3289 endif
3290 endif ! end_if_pnxt
3291
3292 enddo ! end_do_i_loop
3293 enddo ! end_do_k_loop
3294
3295 endif ! end_if_top_at_1
3296
3297!
3298 return
3299!...................................
3300 end subroutine gethml
3301!-----------------------------------
3302
3313 SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, &
3314 & p, t, XLAND, gridkm, &
3315 & modify_qvapor, max_relh, &
3316 & kts,kte, debug_flag)
3317!
3318 USE module_mp_thompson , ONLY : rsif, rslf
3319 IMPLICIT NONE
3320!
3321 INTEGER, INTENT(IN):: kts, kte
3322 LOGICAL, INTENT(IN):: modify_qvapor
3323 REAL, DIMENSION(kts:kte), INTENT(INOUT):: qv, qc, qi, cldfra
3324 REAL, DIMENSION(kts:kte), INTENT(IN):: p, t, dz, qs
3325 REAL, INTENT(IN):: gridkm, xland, max_relh
3326 LOGICAL, INTENT(IN):: debug_flag
3327
3328!..Local vars.
3329 REAL:: rh_00l, rh_00o, rh_00
3330 REAL:: entrmnt=0.5
3331 INTEGER:: k
3332 REAL:: tc, qvsi, qvsw, rhum, delz, var_temp
3333 REAL, DIMENSION(kts:kte):: qvs, rh, rhoa
3334 integer:: ndebug = 0
3335
3336 character*512 dbg_msg
3337
3338!+---+
3339
3340!..Initialize cloud fraction, compute RH, and rho-air.
3341
3342 DO k = kts,kte
3343 cldfra(k) = 0.0
3344
3345 qvsw = rslf(p(k), t(k))
3346 qvsi = rsif(p(k), t(k))
3347
3348 tc = t(k) - 273.15
3349 if (tc .ge. -12.0) then
3350 qvs(k) = qvsw
3351 elseif (tc .lt. -35.0) then
3352 qvs(k) = qvsi
3353 else
3354 qvs(k) = qvsw - (qvsw-qvsi)*(-12.0-tc)/(-12.0+35.)
3355 endif
3356
3357 if (modify_qvapor) then
3358 if (qc(k).gt.1.e-8) then
3359 qv(k) = max(qv(k), qvsw)
3360 qvs(k) = qvsw
3361 endif
3362 if (qc(k).le.1.e-8 .and. qi(k).ge.1.e-9) then
3363 qv(k) = max(qv(k), qvsi*1.005) !..To ensure a tiny bit ice supersaturated
3364 qvs(k) = qvsi
3365 endif
3366 endif
3367
3368 rh(k) = max(0.01, qv(k)/qvs(k))
3369 rhoa(k) = p(k)/(287.0*t(k))
3370
3371 ENDDO
3372
3373
3374!..First cut scale-aware. Higher resolution should require closer to
3375!.. saturated grid box for higher cloud fraction. Simple functions
3376!.. chosen based on Mocko and Cotton (1995) starting point and desire
3377!.. to get near 100% RH as grid spacing moves toward 1.0km, but higher
3378!.. RH over ocean required as compared to over land.
3379
3380 DO k = kts,kte
3381
3382 delz = max(100., dz(k))
3383 rh_00l = 0.77+min(0.22,sqrt(1./(50.0+gridkm*gridkm*delz*0.01)))
3384 rh_00o = 0.85+min(0.14,sqrt(1./(50.0+gridkm*gridkm*delz*0.01)))
3385 rhum = rh(k)
3386
3387 if (qc(k).ge.1.e-6 .or. qi(k).ge.1.e-7 &
3388 & .or. (qs(k).gt.1.e-6 .and. t(k).lt.273.)) then
3389 cldfra(k) = 1.0
3390 elseif (((qc(k)+qi(k)).gt.1.e-10) .and. &
3391 & ((qc(k)+qi(k)).lt.1.e-6)) then
3392 var_temp = min(0.99, 0.1*(11.0 + log10(qc(k)+qi(k))))
3393 cldfra(k) = var_temp*var_temp
3394 else
3395
3396 IF ((xland-1.5).GT.0.) THEN !--- Ocean
3397 rh_00 = rh_00o
3398 ELSE !--- Land
3399 rh_00 = rh_00l
3400 ENDIF
3401
3402 tc = max(-80.0, t(k) - 273.15)
3403 if (tc .lt. -24.0) rh_00 = rh_00l
3404
3405 if (tc .gt. 20.0) then
3406 cldfra(k) = 0.0
3407 elseif (tc .ge. -24.0) then
3408 rhum = min(rh(k), 1.0)
3409 var_temp = sqrt(sqrt((1.001-rhum)/(1.001-rh_00)))
3410 cldfra(k) = max(0., 1.0-var_temp)
3411 else
3412 if (max_relh.gt.1.12 .or. (.NOT.(modify_qvapor)) ) then
3413!..For HRRR model, the following look OK.
3414 rhum = min(rh(k), 1.45)
3415 rh_00 = rh_00 + (1.45-rh_00)*(-24.0-tc)/(-24.0+85.)
3416 var_temp = sqrt(sqrt((1.46-rhum)/(1.46-rh_00)))
3417 cldfra(k) = max(0., 1.0-var_temp)
3418 else
3419!..but for the GFS model, RH is way lower.
3420 rhum = min(rh(k), 1.05)
3421 rh_00 = rh_00 + (1.05-rh_00)*(-24.0-tc)/(-24.0+85.)
3422 var_temp = sqrt(sqrt((1.06-rhum)/(1.06-rh_00)))
3423 cldfra(k) = max(0., 1.0-var_temp)
3424 endif
3425 endif
3426 if (cldfra(k).gt.0.) cldfra(k)=max(0.01,min(cldfra(k),0.99))
3427
3428 endif
3429 if (cldfra(k).gt.0.0 .and. p(k).lt.7000.0) cldfra(k) = 0.0
3430 ENDDO
3431
3432 call find_cloudlayers(qvs, cldfra, t, p, dz, entrmnt, &
3433 & debug_flag, qc, qi, qs, kts,kte)
3434
3435!..Do a final total column adjustment since we may have added more than 1 mm
3436!.. LWP/IWP for multiple cloud decks.
3437
3438 call adjust_cloudfinal(cldfra, qc, qi, rhoa, dz, kts,kte)
3439
3440!..Intended for cold start model runs, we use modify_qvapor to ensure that cloudy
3441!.. areas are actually saturated such that the inserted clouds do not evaporate a
3442!.. timestep later.
3443
3444 if (modify_qvapor) then
3445 DO k = kts,kte
3446 if (cldfra(k).gt.0.2 .and. cldfra(k).lt.1.0) then
3447 qv(k) = max(qv(k),qvs(k))
3448 endif
3449 ENDDO
3450 endif
3451
3452
3453 END SUBROUTINE cal_cldfra3
3454
3458 SUBROUTINE find_cloudlayers(qvs1d, cfr1d, T1d, P1d, Dz1d, entrmnt,&
3459 & debugfl, qc1d, qi1d, qs1d, kts,kte)
3460!
3461 IMPLICIT NONE
3462!
3463 INTEGER, INTENT(IN):: kts, kte
3464 LOGICAL, INTENT(IN):: debugfl
3465 REAL, INTENT(IN):: entrmnt
3466 REAL, DIMENSION(kts:kte), INTENT(IN):: qs1d,qvs1d,t1d,p1d,dz1d
3467 REAL, DIMENSION(kts:kte), INTENT(INOUT):: cfr1d, qc1d, qi1d
3468
3469!..Local vars.
3470 REAL, DIMENSION(kts:kte):: theta
3471 REAL:: theta1, theta2, delz
3472 INTEGER:: k, k2, k_tropo, k_m12c, k_cldb, k_cldt, kbot, k_p200
3473 LOGICAL:: in_cloud
3474 character*512 dbg_msg
3475
3476!+---+
3477
3478 k_m12c = 0
3479 k_p200 = 0
3480 DO k = kte, kts, -1
3481 theta(k) = t1d(k)*((100000.0/p1d(k))**(287.05/1004.))
3482 if (t1d(k)-273.16 .gt. -12.0 .and. p1d(k).gt.10100.0) &
3483 & k_m12c = max(k_m12c, k)
3484 if (p1d(k).gt.19999.0 .and. k_p200.eq.0) k_p200 = k
3485 ENDDO
3486 if (k_m12c .le. kts) k_m12c = kts
3487
3488!..Find tropopause height, best surrogate, because we would not really
3489!.. wish to put fake clouds into the stratosphere. The 10/1500 ratio
3490!.. d(Theta)/d(Z) approximates a vertical line on typical SkewT chart
3491!.. near typical (mid-latitude) tropopause height. Since messy data
3492!.. could give us a false signal of such a transition, do the check over
3493!.. three K-level change, not just a level-to-level check. This method
3494!.. has potential failure in arctic-like conditions with extremely low
3495!.. tropopause height, as would any other diagnostic, so ensure resulting
3496!.. k_tropo level is above 700hPa.
3497
3498 if ( (kte-k_p200) .lt. 3) k_p200 = kte-3
3499 DO k = k_p200-2, kts, -1
3500 theta1 = theta(k)
3501 theta2 = theta(k+2)
3502 delz = 0.5*dz1d(k) + dz1d(k+1) + 0.5*dz1d(k+2)
3503 if ( (((theta2-theta1)/delz).lt.10./1500.) .OR. &
3504 & p1d(k).gt.70000.) EXIT
3505 ENDDO
3506 k_tropo = max(kts+2, min(k+2, kte-1))
3507
3508 if (k_tropo .gt. k_p200) then
3509 DO k = kte-3, k_p200-2, -1
3510 theta1 = theta(k)
3511 theta2 = theta(k+2)
3512 delz = 0.5*dz1d(k) + dz1d(k+1) + 0.5*dz1d(k+2)
3513 if ( (((theta2-theta1)/delz).lt.10./1500.) .AND. &
3514 & p1d(k).gt.9000.) EXIT
3515 ENDDO
3516 k_tropo = max(k_p200-1, min(k+2, kte-1))
3517 endif
3518
3519!..Eliminate possible fractional clouds above supposed tropopause.
3520 DO k = k_tropo+1, kte
3521 if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.1.0) then
3522 cfr1d(k) = 0.
3523 endif
3524 ENDDO
3525
3526!..Be a bit more conservative with lower cloud fraction in scenario with
3527!.. well-mixed convective boundary layer below LCL.
3528
3529 kbot = kts+1
3530 DO k = kbot, k_m12c
3531 if ( (theta(k)-theta(k-1)) .gt. 0.010e-3*dz1d(k)) EXIT
3532 ENDDO
3533 kbot = max(kts+1, k-2)
3534 DO k = kts, kbot
3535 if (cfr1d(k).gt.0.0 .and. cfr1d(k).lt.1.0) &
3536 & cfr1d(k) = max(0.01,0.33*cfr1d(k))
3537 ENDDO
3538 DO k = kts,k_tropo
3539 if (cfr1d(k).gt.0.0) kbot = min(k,kbot)
3540 ENDDO
3541
3542!..Starting below tropo height, if cloud fraction greater than 1 percent,
3543!.. compute an approximate total layer depth of cloud, determine a total
3544!.. liquid water/ice path (LWP/IWP), then reduce that amount with tuning
3545!.. parameter to represent entrainment factor, then divide up LWP/IWP
3546!.. into delta-Z weighted amounts for individual levels per cloud layer.
3547
3548 k_cldb = k_tropo
3549 in_cloud = .false.
3550 k = k_tropo
3551 DO WHILE (.not. in_cloud .AND. k.gt.k_m12c+1)
3552 k_cldt = 0
3553 if (cfr1d(k).ge.0.01) then
3554 in_cloud = .true.
3555 k_cldt = max(k_cldt, k)
3556 endif
3557 if (in_cloud) then
3558 DO k2 = k_cldt-1, k_m12c, -1
3559 if (cfr1d(k2).lt.0.01 .or. k2.eq.k_m12c) then
3560 k_cldb = k2+1
3561 goto 87
3562 endif
3563 ENDDO
3564 87 continue
3565 in_cloud = .false.
3566 endif
3567 if ((k_cldt - k_cldb + 1) .ge. 2) then
3568 call adjust_cloudice(cfr1d, qi1d, qs1d, qvs1d, t1d, dz1d, &
3569 & entrmnt, k_cldb,k_cldt,kts,kte)
3570 k = k_cldb
3571 elseif ((k_cldt - k_cldb + 1) .eq. 1) then
3572 if (cfr1d(k_cldb).gt.0.and.cfr1d(k_cldb).lt.1.) &
3573 & qi1d(k_cldb)=qi1d(k_cldb)+0.05*qvs1d(k_cldb)*cfr1d(k_cldb)
3574 k = k_cldb
3575 endif
3576 k = k - 1
3577 ENDDO
3578
3579 k_cldb = k_m12c + 3
3580 in_cloud = .false.
3581 k = k_m12c + 2
3582 DO WHILE (.not. in_cloud .AND. k.gt.kbot)
3583 k_cldt = 0
3584 if (cfr1d(k).ge.0.01) then
3585 in_cloud = .true.
3586 k_cldt = max(k_cldt, k)
3587 endif
3588 if (in_cloud) then
3589 DO k2 = k_cldt-1, kbot, -1
3590 if (cfr1d(k2).lt.0.01 .or. k2.eq.kbot) then
3591 k_cldb = k2+1
3592 goto 88
3593 endif
3594 ENDDO
3595 88 continue
3596 in_cloud = .false.
3597 endif
3598 if ((k_cldt - k_cldb + 1) .ge. 2) then
3599 call adjust_cloudh2o(cfr1d, qc1d, qvs1d, t1d, dz1d, &
3600 & entrmnt, k_cldb,k_cldt,kts,kte)
3601 k = k_cldb
3602 elseif ((k_cldt - k_cldb + 1) .eq. 1) then
3603 if (cfr1d(k_cldb).gt.0.and.cfr1d(k_cldb).lt.1.) &
3604 & qc1d(k_cldb)=qc1d(k_cldb)+0.05*qvs1d(k_cldb)*cfr1d(k_cldb)
3605 k = k_cldb
3606 endif
3607 k = k - 1
3608 ENDDO
3609
3610
3611 END SUBROUTINE find_cloudlayers
3612
3613!+---+-----------------------------------------------------------------+
3614
3616 SUBROUTINE adjust_cloudice(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte)
3617!
3618 IMPLICIT NONE
3619!
3620 INTEGER, INTENT(IN):: k1,k2, kts,kte
3621 REAL, INTENT(IN):: entr
3622 REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, qs, qvs, t, dz
3623 REAL, DIMENSION(kts:kte), INTENT(INOUT):: qi
3624 REAL:: iwc, max_iwc, tdz, this_iwc, this_dz
3625 INTEGER:: k
3626
3627 tdz = 0.
3628 do k = k1, k2
3629 tdz = tdz + dz(k)
3630 enddo
3631! max_iwc = ABS(qvs(k2)-qvs(k1))
3632 max_iwc = max(0.0, qvs(k1)-qvs(k2))
3633
3634 do k = k1, k2
3635 max_iwc = max(1.e-6, max_iwc - (qi(k)+qs(k)))
3636 enddo
3637 max_iwc = min(1.e-4, max_iwc)
3638
3639 this_dz = 0.0
3640 do k = k1, k2
3641 if (k.eq.k1) then
3642 this_dz = this_dz + 0.5*dz(k)
3643 else
3644 this_dz = this_dz + dz(k)
3645 endif
3646 this_iwc = max_iwc*this_dz/tdz
3647 iwc = max(1.e-6, this_iwc*(1.-entr))
3648 if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.t(k).ge.203.16) then
3649 qi(k) = qi(k) + cfr(k)*cfr(k)*iwc
3650 endif
3651 enddo
3652
3653 END SUBROUTINE adjust_cloudice
3654
3655!+---+-----------------------------------------------------------------+
3656
3658 SUBROUTINE adjust_cloudh2o(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte)
3659!
3660 IMPLICIT NONE
3661!
3662 INTEGER, INTENT(IN):: k1,k2, kts,kte
3663 REAL, INTENT(IN):: entr
3664 REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, qvs, t, dz
3665 REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc
3666 REAL:: lwc, max_lwc, tdz, this_lwc, this_dz
3667 INTEGER:: k
3668
3669 tdz = 0.
3670 do k = k1, k2
3671 tdz = tdz + dz(k)
3672 enddo
3673! max_lwc = ABS(qvs(k2)-qvs(k1))
3674 max_lwc = max(0.0, qvs(k1)-qvs(k2))
3675! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz
3676
3677 do k = k1, k2
3678 max_lwc = max(1.e-6, max_lwc - qc(k))
3679 enddo
3680 max_lwc = min(1.e-4, max_lwc)
3681
3682 this_dz = 0.0
3683 do k = k1, k2
3684 if (k.eq.k1) then
3685 this_dz = this_dz + 0.5*dz(k)
3686 else
3687 this_dz = this_dz + dz(k)
3688 endif
3689 this_lwc = max_lwc*this_dz/tdz
3690 lwc = max(1.e-6, this_lwc*(1.-entr))
3691 if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.t(k).ge.258.16) then
3692 qc(k) = qc(k) + cfr(k)*cfr(k)*lwc
3693 endif
3694 enddo
3695
3696 END SUBROUTINE adjust_cloudh2o
3697
3698!+---+-----------------------------------------------------------------+
3699
3702 SUBROUTINE adjust_cloudfinal(cfr, qc, qi, Rho,dz, kts,kte)
3703!
3704 IMPLICIT NONE
3705!
3706 INTEGER, INTENT(IN):: kts,kte
3707 REAL, DIMENSION(kts:kte), INTENT(IN):: cfr, rho, dz
3708 REAL, DIMENSION(kts:kte), INTENT(INOUT):: qc, qi
3709 REAL:: lwp, iwp, xfac
3710 INTEGER:: k
3711
3712 lwp = 0.
3713 iwp = 0.
3714 do k = kts, kte
3715 if (cfr(k).gt.0.0 .and. cfr(k).lt.1.0) then
3716 lwp = lwp + qc(k)*rho(k)*dz(k)
3717 iwp = iwp + qi(k)*rho(k)*dz(k)
3718 endif
3719 enddo
3720
3721 if (lwp .gt. 1.0) then
3722 xfac = 1.0/lwp
3723 do k = kts, kte
3724 if (cfr(k).gt.0.0 .and. cfr(k).lt.1.0) then
3725 qc(k) = qc(k)*xfac
3726 endif
3727 enddo
3728 endif
3729
3730 if (iwp .gt. 1.0) then
3731 xfac = 1.0/iwp
3732 do k = kts, kte
3733 if (cfr(k).gt.0.0 .and. cfr(k).lt.1.0) then
3734 qi(k) = qi(k)*xfac
3735 endif
3736 enddo
3737 endif
3738
3739 END SUBROUTINE adjust_cloudfinal
3740
3743 & ( ix, nlay, plyr, clwf, rhly, qstl, & ! --- inputs
3744 & cldtot ) & ! --- outputs
3745
3746! --- inputs:
3747 integer, intent(in) :: IX, NLAY
3748 real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, clwf, &
3749 & rhly, qstl
3750
3751! --- outputs
3752 real (kind=kind_phys), dimension(:,:), intent(inout) :: cldtot
3753
3754! --- local variables:
3755
3756 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
3757 & tem1, tem2
3758 integer :: i, k
3759
3761
3762 clwmin = 0.0
3763 do k = 1, nlay
3764 do i = 1, ix
3765 clwt = 1.0e-6 * (plyr(i,k)*0.001)
3766
3767 if (clwf(i,k) > clwt) then
3768
3769 onemrh= max( 1.e-10, 1.0-rhly(i,k) )
3770 clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
3771
3772 tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0)
3773 tem1 = 2000.0 / tem1
3774
3775 value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
3776 tem2 = sqrt( sqrt(rhly(i,k)) )
3777
3778 cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
3779 endif
3780 enddo
3781 enddo
3782
3783 end subroutine cloud_fraction_xurandall
3784
3787 & ( ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, & ! --- inputs
3788 & cldtot ) & ! --- outputs
3789
3790! --- inputs:
3791 integer, intent(in) :: IX, NLAY
3792 real (kind=kind_phys), intent(in) :: xrc3
3793 real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, clwf, &
3794 & rhly, qstl
3795 logical, intent(in) :: lmfdeep2
3796
3797! --- outputs
3798 real (kind=kind_phys), dimension(:,:), intent(inout) :: cldtot
3799
3800! --- local variables:
3801
3802 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
3803 & tem1, tem2
3804 integer :: i, k
3805
3807
3808 clwmin = 0.0
3809 do k = 1, nlay
3810 do i = 1, ix
3811 clwt = 1.0e-6 * (plyr(i,k)*0.001)
3812! clwt = 2.0e-6 * (plyr(i,k)*0.001)
3813
3814 if (clwf(i,k) > clwt) then
3815 onemrh= max( 1.e-10, 1.0-rhly(i,k) )
3816 clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
3817!
3818 tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan
3819 if (lmfdeep2) then
3820 tem1 = xrc3 / tem1
3821 else
3822 tem1 = 100.0 / tem1
3823 endif
3824!
3825 value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
3826 tem2 = sqrt( sqrt(rhly(i,k)) )
3827
3828 cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
3829 endif
3830 enddo
3831 enddo
3832
3833 end subroutine cloud_fraction_mass_flx_1
3834
3837 & ( ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, & ! --- inputs
3838 & cldtot ) & ! --- outputs
3839
3840! --- inputs:
3841 integer, intent(in) :: IX, NLAY
3842 real (kind=kind_phys), intent(in) :: xrc3
3843 real (kind=kind_phys), dimension(:,:), intent(in) :: plyr, clwf, &
3844 & rhly, qstl
3845 logical, intent(in) :: lmfdeep2
3846
3847! --- outputs
3848 real (kind=kind_phys), dimension(:,:), intent(inout) :: cldtot
3849
3850! --- local variables:
3851
3852 real (kind=kind_phys) :: clwmin, clwm, clwt, onemrh, value, &
3853 & tem1, tem2
3854 integer :: i, k
3855
3857
3858 clwmin = 0.0
3859 do k = 1, nlay-1
3860 do i = 1, ix
3861 clwt = 1.0e-6 * (plyr(i,k)*0.001)
3862
3863 if (clwf(i,k) > clwt) then
3864 if(rhly(i,k) > 0.99) then
3865 cldtot(i,k) = 1.
3866 else
3867 onemrh= max( 1.e-10, 1.0-rhly(i,k) )
3868 clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
3869
3870 tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan
3871 if (lmfdeep2) then
3872 tem1 = xrc3 / tem1
3873 else
3874 tem1 = 100.0 / tem1
3875 endif
3876
3877 value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 )
3878 tem2 = sqrt( sqrt(rhly(i,k)) )
3879
3880 cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 )
3881 endif
3882 else
3883 cldtot(i,k) = 0.0
3884 endif
3885 enddo
3886 enddo
3887
3888 end subroutine cloud_fraction_mass_flx_2
3889!........................................!
3890 end module module_radiation_clouds
real function rsif(p, t)
THIS FUNCTION CALCULATES THE ICE SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PRESS...
real function rslf(p, t)
THIS FUNCTION CALCULATES THE LIQUID SATURATION VAPOR MIXING RATIO AS A FUNCTION OF TEMPERATURE AND PR...
real(kind=kind_phys), dimension(nk_clds+1, 2), save ptopc
pressure limits of cloud domain interfaces (low, mid, high) in mb (0.1kPa)
subroutine, public progcld_thompson(plyr, plvl, tlyr, qlyr, qstl, rhly, clw, xlat, xlon, slmsk, dz, delp, ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ix, nlay, nlp1, uni_cld, lmfshal, lmfdeep2, cldcov, re_cloud, re_ice, re_snow, lwp_ex, iwp_ex, lwp_fc, iwp_fc, dzlay, gridkm, top_at_1, cldtot, cldcnv, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine added by G. Thompson specifically to account for explicit (microphysics-produced) clo...
real(kind=kind_phys), parameter reliq_def
default liq radius to 10 micron
subroutine, public radiation_clouds_prop(plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, ccnd, ncndl, cnvw, cnvc, tracer1, xlat, xlon, slmsk, dz, delp, ix, lm, nlay, nlp1, deltaq, sup, dcorr_con, me, icloud, kdt, ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, ntclamt, imp_physics, imp_physics_nssl, imp_physics_fer_hires, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, idcor_hogan, idcor_oreopoulos, lcrick, lcnorm, imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, do_mynnedmf, lgfdlmprad, xr_cnvcld, uni_cld, lmfshal, lmfdeep2, cldcov, clouds1, effrl, effri, effrr, effrs, effr_in, effrl_inout, effri_inout, effrs_inout, lwp_ex, iwp_ex, lwp_fc, iwp_fc, dzlay, latdeg, julian, yearlen, gridkm, top_at_1, si, con_ttp, con_pi, con_g, con_rd, con_thgni, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow, clds, mtop, mbot, de_lgth, alpha)
Subroutine radiation_clouds_prop computes cloud related quantities for different cloud microphysics s...
subroutine, public progcld_zhao_carr(plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, clw, xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, uni_cld, lmfshal, lmfdeep2, cldcov, effrl, effri, effrr, effrs, effr_in, dzlay, cldtot, cldcnv, lcrick, lcnorm, con_ttp, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine computes cloud related quantities using zhao/moorthi's prognostic cloud microphysics ...
integer, parameter, public nk_clds
number of cloud vertical domains
real(kind=kind_phys), parameter rsnow_def
default snow radius to 250 micron
real(kind=kind_phys), parameter cldssa_def
default cld single scat albedo
real(kind=kind_phys), parameter climit2
subroutine cloud_fraction_mass_flx_2(ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, cldtot)
integer llyr
upper limit of boundary layer clouds
real(kind=kind_phys), dimension(95), parameter retab
subroutine, public progcld_thompson_wsm6(plyr, plvl, tlyr, qlyr, qstl, rhly, clw, xlat, xlon, slmsk, dz, delp, ntrac, ntcw, ntiw, ntrw, ntsw, ntgl, con_ttp, xr_cnvcld, ix, nlay, nlp1, uni_cld, lmfshal, lmfdeep2, cldcov, cnvw, re_cloud, re_ice, re_snow, lwp_ex, iwp_ex, lwp_fc, iwp_fc, dzlay, cldtot, cldcnv, lcnorm, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine is used by Thompson/WSM6/NSSL cloud microphysics (EMC)
real(kind=kind_phys) gord
subroutine, public adjust_cloudice(cfr, qi, qs, qvs, t, dz, entr, k1, k2, kts, kte)
real(kind=kind_phys), parameter ovcst
real(kind=kind_phys) gfac
subroutine, public gethml(plyr, ptop1, cldtot, cldcnv, dz, de_lgth, alpha, ix, nlay, iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, top_at_1, si, clds, mtop, mbot)
This subroutine computes high, mid, low, total, and boundary cloud fractions and cloud top/bottom lay...
subroutine, public progcld_zhao_carr_pdf(plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, clw, cnvw, cnvc, xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, deltaq, sup, kdt, me, dzlay, cldtot, cldcnv, lcrick, lcnorm, con_thgni, con_ttp, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine computes cloud related quantities using zhao/moorthi's prognostic cloud microphysics ...
integer, parameter, public nf_clds
number of fields in cloud array
subroutine, public progcld_gfdl_lin(plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, clw, cnvw, cnvc, xlat, xlon, slmsk, cldtot, dz, delp, ix, nlay, nlp1, dzlay, cldtot1, cldcnv, lcrick, lcnorm, con_ttp, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine computes cloud related quantities using GFDL Lin MP prognostic cloud microphysics sch...
real(kind=kind_phys), parameter reice_def
default ice radius to 50 micron
subroutine cloud_fraction_xurandall(ix, nlay, plyr, clwf, rhly, qstl, cldtot)
This subroutine computes the Xu-Randall cloud fraction scheme.
subroutine, public adjust_cloudh2o(cfr, qc, qvs, t, dz, entr, k1, k2, kts, kte)
real(kind=kind_phys), parameter rrain_def
default rain radius to 1000 micron
subroutine, public adjust_cloudfinal(cfr, qc, qi, rho, dz, kts, kte)
Do not alter any grid-explicitly resolved hydrometeors, rather only the supposed amounts due to the c...
real(kind=kind_phys), parameter cldasy_def
default cld asymmetry factor
subroutine, public cld_init(si, nlay, imp_physics, me, con_g, con_rd, errflg, errmsg)
This subroutine is an initialization program for cloud-radiation calculations and sets up boundary la...
subroutine, public progclduni(plyr, plvl, tlyr, tvly, ccnd, ncnd, xlat, xlon, slmsk, dz, delp, ix, nlay, nlp1, cldtot, effrl, effri, effrr, effrs, effr_in, dzlay, cldtot1, cldcnv, lcrick, lcnorm, con_ttp, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine computes cloud related quantities using for unified cloud microphysics scheme.
real(kind=kind_phys), parameter climit
subroutine, public cal_cldfra3(cldfra, qv, qc, qi, qs, dz, p, t, xland, gridkm, modify_qvapor, max_relh, kts, kte, debug_flag)
Cloud fraction scheme by G. Thompson (NCAR-RAL), not intended for combining with any cumulus or shall...
subroutine, public progcld_fer_hires(plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, clw, xlat, xlon, slmsk, dz, delp, ntrac, ntcw, ntiw, ntrw, ix, nlay, nlp1, icloud, uni_cld, lmfshal, lmfdeep2, cldcov, re_cloud, re_ice, re_snow, dzlay, cldtot, cldcnv, lcnorm, cld_frac, cld_lwp, cld_reliq, cld_iwp, cld_reice, cld_rwp, cld_rerain, cld_swp, cld_resnow)
This subroutine computes cloud related quantities using Ferrier-Aligo cloud microphysics scheme.
subroutine, public find_cloudlayers(qvs1d, cfr1d, t1d, p1d, dz1d, entrmnt, debugfl, qc1d, qi1d, qs1d, kts, kte)
From cloud fraction array, find clouds of multi-level depth and compute a reasonable value of LWP or ...
subroutine cloud_fraction_mass_flx_1(ix, nlay, lmfdeep2, xrc3, plyr, clwf, rhly, qstl, cldtot)
this module defines fortran unit numbers for input/output data files for the ncep gfs model.
Definition iounitdef.f:53
This module computes the moisture tendencies of water vapor, cloud droplets, rain,...
This module contains the calculation of cloud overlap parameters for both RRTMG and RRTMGP.
This module computes cloud related quantities for radiation computations.