-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmicro_pumas_v1.F90
4939 lines (4284 loc) · 199 KB
/
micro_pumas_v1.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module micro_pumas_v1
!---------------------------------------------------------------------------------
! Parameterization of Unified Microphysics Across Scales version 1 (PUMASv1)
!
! References:
!
! Gettelman, A., H. Morrison, T. Eidhammer, K. Thayer-Calder, J. Sun,
!
! R. Forbes, Z. McGraw, J. Zhu, T. Storelvmo, and J. Dennis (2023):
!
! Importance of Ice Nucleation and Precipitation on Climate with the
!
! Parameterization of Unified Microphysics Across Scales version 1
!
! (PUMASv1). Geosci. Model Dev., 16, 1735-1754.
!
! https://doi.org/10.5194/gmd-16-1735-2023
!
!
! for questions contact Hugh Morrison, Andrew Gettelman
! e-mail: [email protected], [email protected]
!---------------------------------------------------------------------------------
!
! NOTE: Modified to allow other microphysics packages (e.g. CARMA) to do ice
! microphysics in cooperation with the MG liquid microphysics. This is
! controlled by the do_cldice variable.
!
! If do_cldice is false, then MG microphysics should not update CLDICE or
! NUMICE; it is assumed that the other microphysics scheme will have updated
! CLDICE and NUMICE. The other microphysics should handle the following
! processes that would have been done by MG:
! - Detrainment (liquid and ice)
! - Homogeneous ice nucleation
! - Heterogeneous ice nucleation
! - Bergeron process
! - Melting of ice
! - Freezing of cloud drops
! - Autoconversion (ice -> snow)
! - Growth/Sublimation of ice
! - Sedimentation of ice
!
! This option has not been updated since the introduction of prognostic
! precipitation, and probably should be adjusted to cover snow as well.
!
!---------------------------------------------------------------------------------
! Version 3.O based on micro_mg2_0.F90 and WRF3.8.1 module_mp_morr_two_moment.F
!---------------------------------------------------------------------------------
! Based on micro_mg (restructuring of former cldwat2m_micro)
! Author: Andrew Gettelman, Hugh Morrison.
! Contributions from: Xiaohong Liu and Steve Ghan
! December 2005-May 2010
! Description in: Morrison and Gettelman, 2008. J. Climate (MG2008)
! Gettelman et al., 2010 J. Geophys. Res. - Atmospheres (G2010)
! for questions contact Hugh Morrison, Andrew Gettelman
! e-mail: [email protected], [email protected]
!---------------------------------------------------------------------------------
! Code comments added by HM, 093011
! General code structure:
!
! Code is divided into two main subroutines:
! subroutine micro_pumas_init --> initializes microphysics routine, should be called
! once at start of simulation
! subroutine micro_pumas_tend --> main microphysics routine to be called each time step
! this also calls several smaller subroutines to calculate
! microphysical processes and other utilities
!
! List of external functions:
! qsat_water --> for calculating saturation vapor pressure with respect to liquid water
! qsat_ice --> for calculating saturation vapor pressure with respect to ice
! gamma --> standard mathematical gamma function
! .........................................................................
! List of inputs through use statement in fortran90:
! Variable Name Description Units
! .........................................................................
! gravit acceleration due to gravity m s-2
! rair dry air gas constant for air J kg-1 K-1
! tmelt temperature of melting point for water K
! cpair specific heat at constant pressure for dry air J kg-1 K-1
! rh2o gas constant for water vapor J kg-1 K-1
! latvap latent heat of vaporization J kg-1
! latice latent heat of fusion J kg-1
! qsat_water external function for calculating liquid water
! saturation vapor pressure/humidity -
! qsat_ice external function for calculating ice
! saturation vapor pressure/humidity pa
! rhmini relative humidity threshold parameter for
! nucleating ice -
! .........................................................................
! NOTE: List of all inputs/outputs passed through the call/subroutine statement
! for micro_pumas_tend is given below at the start of subroutine micro_pumas_tend.
!---------------------------------------------------------------------------------
! Procedures required:
! 1) An implementation of the gamma function (if not intrinsic).
! 2) saturation vapor pressure and specific humidity over water
! 3) svp over ice
#ifndef HAVE_GAMMA_INTRINSICS
use shr_spfn_mod, only: gamma => shr_spfn_gamma
#endif
use wv_sat_methods, only: &
qsat_water => wv_sat_qsat_water_vect, &
qsat_ice => wv_sat_qsat_ice_vect
! Parameters from the utilities module.
use micro_pumas_utils, only: &
r8, &
pi, &
omsm, &
qsmall, &
mincld, &
rhosn, &
rhoi, &
rhow, &
rhows, &
ac, bc, &
ai, bi, &
aj, bj, &
ar, br, &
as, bs, &
ag, bg, &
ah, bh, &
rhog,rhoh, &
mi0, &
rising_factorial, &
VLENS
implicit none
private
save
public :: &
micro_pumas_init, &
micro_pumas_get_cols, &
micro_pumas_tend
! Switches for specification rather than prediction of droplet and crystal number
! note: number will be adjusted as needed to keep mean size within bounds,
! even when specified droplet or ice number is used
!
! If constant cloud ice number is set (nicons = .true.),
! then all microphysical processes except mass transfer due to ice nucleation
! (mnuccd) are based on the fixed cloud ice number. Calculation of
! mnuccd follows from the prognosed ice crystal number ni.
logical :: nccons ! nccons = .true. to specify constant cloud droplet number
logical :: nicons ! nicons = .true. to specify constant cloud ice number
logical :: ngcons ! ngcons = .true. to specify constant graupel number
logical :: nrcons ! constant rain number
logical :: nscons ! constant snow number
! specified ice and droplet number concentrations
! note: these are local in-cloud values, not grid-mean
real(r8) :: ncnst ! droplet num concentration when nccons=.true. (m-3)
real(r8) :: ninst ! ice num concentration when nicons=.true. (m-3)
real(r8) :: ngnst ! graupel num concentration when ngcons=.true. (m-3)
real(r8) :: nrnst
real(r8) :: nsnst
! IFS Switches....
! Switch to turn off evaporation of sedimenting condensate
! Found to interact badly in some models with diagnostic cloud fraction
logical :: evap_sed_off
! Remove RH conditional from ice nucleation
logical :: icenuc_rh_off
! Internally: Meyers Ice Nucleation
logical :: icenuc_use_meyers
! Scale evaporation as IFS does (*0.3)
logical :: evap_scl_ifs
! Evap RH threhold following ifs
logical :: evap_rhthrsh_ifs
! Rain freezing at 0C following ifs
logical :: rainfreeze_ifs
! Snow sedimentation = 1 m/s
logical :: ifs_sed
! Precipitation fall speed, prevent zero velocity if precip above
logical :: precip_fall_corr
!--ag
!=========================================================
! Private module parameters
!=========================================================
!Range of cloudsat reflectivities (dBz) for analytic simulator
real(r8), parameter :: csmin = -30._r8
real(r8), parameter :: csmax = 26._r8
real(r8), parameter :: mindbz = -99._r8
real(r8), parameter :: minrefl = 1.26e-10_r8 ! minrefl = 10._r8**(mindbz/10._r8)
integer, parameter :: MG_PRECIP_FRAC_INCLOUD = 101
integer, parameter :: MG_PRECIP_FRAC_OVERLAP = 102
! Reflectivity min for 10cm (Rain) radar reflectivity
real(r8), parameter :: minrefl10 = 1.e-26_r8
! autoconversion size threshold for cloud ice to snow (m)
real(r8) :: dcs
! minimum mass of new crystal due to freezing of cloud droplets done
! externally (kg)
real(r8), parameter :: mi0l_min = 4._r8/3._r8*pi*rhow*(4.e-6_r8)**3
! Ice number sublimation parameter. Assume some decrease in ice number with sublimation if non-zero. Else, no decrease in number with sublimation.
real(r8), parameter :: sublim_factor =0.0_r8 !number sublimation factor.
! Parameters related to GPU computing
integer, parameter :: RQUEUE = 101 ! GPU stream ID for rain
integer, parameter :: SQUEUE = 102 ! GPU stream ID for snow
integer, parameter :: LQUEUE = 103 ! GPU stream ID for liquid
integer, parameter :: IQUEUE = 104 ! GPU stream ID for ice
integer, parameter :: GQUEUE = 105 ! GPU stream ID for hail/graupel
!=========================================================
! Constants set in initialization
!=========================================================
! Set using arguments to micro_pumas_init
real(r8) :: g ! gravity
real(r8) :: r ! dry air gas constant
real(r8) :: rv ! water vapor gas constant
real(r8) :: cpp ! specific heat of dry air
real(r8) :: tmelt ! freezing point of water (K)
! latent heats of:
real(r8) :: xxlv ! vaporization
real(r8) :: xlf ! freezing
real(r8) :: xxls ! sublimation
real(r8) :: rhmini ! Minimum rh for ice cloud fraction > 0.
! flags
logical :: microp_uniform
logical :: do_cldice
logical :: use_hetfrz_classnuc
logical :: do_hail
logical :: do_graupel
real(r8) :: rhosu ! typical 850mn air density
real(r8) :: icenuct ! ice nucleation temperature: currently -5 degrees C
real(r8) :: snowmelt ! what temp to melt all snow: currently 2 degrees C
real(r8) :: rainfrze ! what temp to freeze all rain: currently -5 degrees C
! additional constants to help speed up code
real(r8) :: gamma_br_plus1
real(r8) :: gamma_br_plus4
real(r8) :: gamma_bs_plus1
real(r8) :: gamma_bs_plus4
real(r8) :: gamma_bi_plus1
real(r8) :: gamma_bi_plus4
real(r8) :: gamma_bj_plus1
real(r8) :: gamma_bj_plus4
real(r8) :: gamma_bg_plus1
real(r8) :: gamma_bg_plus4
real(r8) :: xxlv_squared
real(r8) :: xxls_squared
character(len=16) :: micro_mg_precip_frac_method ! type of precipitation fraction method
real(r8) :: micro_mg_berg_eff_factor ! berg efficiency factor
real(r8) :: micro_mg_accre_enhan_fact ! accretion enhancment factor
real(r8) :: micro_mg_autocon_fact ! autoconversion prefactor
real(r8) :: micro_mg_autocon_nd_exp ! autoconversion Nd exponent factor
real(r8) :: micro_mg_autocon_lwp_exp !autoconversion LWP exponent
real(r8) :: micro_mg_homog_size ! size of freezing homogeneous ice
real(r8) :: micro_mg_vtrmi_factor
real(r8) :: micro_mg_vtrms_factor
real(r8) :: micro_mg_effi_factor
real(r8) :: micro_mg_iaccr_factor
real(r8) :: micro_mg_max_nicons
logical :: remove_supersat ! If true, remove supersaturation after sedimentation loop
character(len=16) :: warm_rain ! 'tau','emulated','sb2001' or 'kk2000'
!Parameters for Implicit Sedimentation Calculation
real(r8), parameter :: vfactor = 1.0 ! Rain/Snow/Graupel Factor
real(r8), parameter :: vfac_drop = 1.0 ! Cloud Liquid Factor
real(r8), parameter :: vfac_ice = 1.0 ! Cloud Ice Factor
logical :: do_implicit_fall ! = .true.
logical :: accre_sees_auto != .true.
!$acc declare create (nccons,nicons,ngcons,nrcons,nscons,ncnst,ninst,ngnst, &
!$acc nrnst,nsnst,evap_sed_off,icenuc_rh_off,evap_scl_ifs, &
!$acc icenuc_use_meyers,evap_rhthrsh_ifs,rainfreeze_ifs, &
!$acc ifs_sed,precip_fall_corr,dcs, &
!$acc g,r,rv,cpp,tmelt,xxlv,xlf,xxls,rhmini,microp_uniform, &
!$acc do_cldice,use_hetfrz_classnuc,do_hail,do_graupel,rhosu, &
!$acc icenuct,snowmelt,rainfrze,xxlv_squared,xxls_squared, &
!$acc gamma_br_plus1,gamma_br_plus4,gamma_bs_plus1, &
!$acc gamma_bs_plus4,gamma_bi_plus1,gamma_bi_plus4, &
!$acc gamma_bj_plus1,gamma_bj_plus4,gamma_bg_plus1, &
!$acc gamma_bg_plus4,micro_mg_berg_eff_factor, &
!$acc micro_mg_accre_enhan_fact,micro_mg_autocon_fact, &
!$acc micro_mg_autocon_nd_exp,micro_mg_autocon_lwp_exp, &
!$acc micro_mg_homog_size,micro_mg_vtrmi_factor, &
!$acc micro_mg_vtrms_factor, &
!$acc micro_mg_effi_factor,micro_mg_iaccr_factor, &
!$acc micro_mg_max_nicons,remove_supersat,do_implicit_fall, &
!$acc accre_sees_auto)
!===============================================================================
contains
!===============================================================================
subroutine micro_pumas_init( &
kind, gravit, rair, rh2o, cpair, &
tmelt_in, latvap, latice, &
rhmini_in, micro_mg_dcs, &
micro_mg_do_hail_in,micro_mg_do_graupel_in, &
microp_uniform_in, do_cldice_in, use_hetfrz_classnuc_in, &
micro_mg_precip_frac_method_in, micro_mg_berg_eff_factor_in, &
micro_mg_accre_enhan_fact_in, micro_mg_autocon_fact_in, &
micro_mg_autocon_nd_exp_in, micro_mg_autocon_lwp_exp_in, micro_mg_homog_size_in, &
micro_mg_vtrmi_factor_in, micro_mg_vtrms_factor_in, micro_mg_effi_factor_in, &
micro_mg_iaccr_factor_in, micro_mg_max_nicons_in, &
remove_supersat_in, warm_rain_in, &
micro_mg_evap_sed_off_in, micro_mg_icenuc_rh_off_in, micro_mg_icenuc_use_meyers_in, &
micro_mg_evap_scl_ifs_in, micro_mg_evap_rhthrsh_ifs_in, &
micro_mg_rainfreeze_ifs_in, micro_mg_ifs_sed_in, micro_mg_precip_fall_corr, &
micro_mg_accre_sees_auto_in, micro_mg_implicit_fall_in, &
nccons_in, nicons_in, ncnst_in, ninst_in, ngcons_in, ngnst_in, &
nrcons_in, nrnst_in, nscons_in, nsnst_in, &
stochastic_emulated_filename_quantile, stochastic_emulated_filename_input_scale, &
stochastic_emulated_filename_output_scale, &
iulog, errstring)
use micro_pumas_utils, only: micro_pumas_utils_init
use pumas_stochastic_collect_tau, only: pumas_stochastic_kernel_init
use tau_neural_net_quantile, only: initialize_tau_emulators
!-----------------------------------------------------------------------
!
! Purpose:
! initialize constants for MG microphysics
!
! Author: Andrew Gettelman Dec 2005
!
!-----------------------------------------------------------------------
integer, intent(in) :: kind ! Kind used for reals
real(r8), intent(in) :: gravit
real(r8), intent(in) :: rair
real(r8), intent(in) :: rh2o
real(r8), intent(in) :: cpair
real(r8), intent(in) :: tmelt_in ! Freezing point of water (K)
real(r8), intent(in) :: latvap
real(r8), intent(in) :: latice
real(r8), intent(in) :: rhmini_in ! Minimum rh for ice cloud fraction > 0.
real(r8), intent(in) :: micro_mg_dcs
!MG3 dense precipitating ice. Note, only 1 can be true, or both false.
logical, intent(in) :: micro_mg_do_graupel_in ! .true. = configure with graupel
! .false. = no graupel (hail possible)
logical, intent(in) :: micro_mg_do_hail_in ! .true. = configure with hail
! .false. = no hail (graupel possible)
logical, intent(in) :: microp_uniform_in ! .true. = configure uniform for sub-columns
! .false. = use w/o sub-columns (standard)
logical, intent(in) :: do_cldice_in ! .true. = do all processes (standard)
! .false. = skip all processes affecting
! cloud ice
logical, intent(in) :: use_hetfrz_classnuc_in ! use heterogeneous freezing
character(len=16),intent(in) :: micro_mg_precip_frac_method_in ! type of precipitation fraction method
real(r8), intent(in) :: micro_mg_berg_eff_factor_in ! berg efficiency factor
real(r8), intent(in) :: micro_mg_accre_enhan_fact_in !accretion enhancment factor
real(r8), intent(in) :: micro_mg_autocon_fact_in !autconversion prefactor
real(r8), intent(in) :: micro_mg_autocon_nd_exp_in !autconversion exponent factor
real(r8), intent(in) :: micro_mg_autocon_lwp_exp_in !autconversion exponent factor
real(r8), intent(in) :: micro_mg_homog_size_in ! size of homoegenous freezing ice
real(r8), intent(in) :: micro_mg_vtrmi_factor_in !factor for ice fall velocity
real(r8), intent(in) :: micro_mg_vtrms_factor_in !factor for snow fall velocity
real(r8), intent(in) :: micro_mg_effi_factor_in !factor for ice effective radius
real(r8), intent(in) :: micro_mg_iaccr_factor_in ! ice accretion factor
real(r8), intent(in) :: micro_mg_max_nicons_in ! maximum number ice crystal allowed
logical, intent(in) :: remove_supersat_in ! If true, remove supersaturation after sedimentation loop
character(len=*), intent(in) :: warm_rain_in
! IFS-like Switches
logical, intent(in) :: micro_mg_evap_sed_off_in ! Turn off evaporation/sublimation based on cloud fraction for sedimenting condensate
logical, intent(in) :: micro_mg_icenuc_rh_off_in ! Remove RH conditional from ice nucleation
logical, intent(in) :: micro_mg_icenuc_use_meyers_in ! Internally: Meyers Ice Nucleation
logical, intent(in) :: micro_mg_evap_scl_ifs_in ! Scale evaporation as IFS does (*0.3)
logical, intent(in) :: micro_mg_evap_rhthrsh_ifs_in ! Evap RH threhold following ifs
logical, intent(in) :: micro_mg_rainfreeze_ifs_in ! Rain freezing temp following ifs
logical, intent(in) :: micro_mg_ifs_sed_in ! snow sedimentation = 1m/s following ifs
logical, intent(in) :: micro_mg_precip_fall_corr ! ensure rain fall speed non-zero if rain above in column
logical, intent(in) :: micro_mg_accre_sees_auto_in ! autoconverted rain is passed to accretion
logical, intent(in) :: micro_mg_implicit_fall_in !Implicit fall speed (sedimentation) calculation for hydrometors
logical, intent(in) :: nccons_in
logical, intent(in) :: nicons_in
real(r8), intent(in) :: ncnst_in
real(r8), intent(in) :: ninst_in
logical, intent(in) :: ngcons_in
real(r8), intent(in) :: ngnst_in
logical, intent(in) :: nrcons_in
real(r8), intent(in) :: nrnst_in
logical, intent(in) :: nscons_in
real(r8), intent(in) :: nsnst_in
character(len=*), intent(in) :: stochastic_emulated_filename_quantile, &
stochastic_emulated_filename_input_scale, &
stochastic_emulated_filename_output_scale ! Files for emulated machine learning
integer, intent(in) :: iulog
character(128), intent(out) :: errstring ! Output status (non-blank for error return)
!-----------------------------------------------------------------------
dcs = micro_mg_dcs
! Initialize subordinate utilities module.
call micro_pumas_utils_init(kind, rair, rh2o, cpair, tmelt_in, latvap, latice, &
dcs, errstring)
if (trim(errstring) /= "") return
! declarations for MG code (transforms variable names)
g= gravit ! gravity
r= rair ! dry air gas constant: note units(phys_constants are in J/K/kmol)
rv= rh2o ! water vapor gas constant
cpp = cpair ! specific heat of dry air
tmelt = tmelt_in
rhmini = rhmini_in
micro_mg_precip_frac_method = micro_mg_precip_frac_method_in
micro_mg_berg_eff_factor = micro_mg_berg_eff_factor_in
micro_mg_accre_enhan_fact = micro_mg_accre_enhan_fact_in
micro_mg_autocon_fact = micro_mg_autocon_fact_in
micro_mg_autocon_nd_exp = micro_mg_autocon_nd_exp_in
micro_mg_autocon_lwp_exp = micro_mg_autocon_lwp_exp_in
micro_mg_homog_size = micro_mg_homog_size_in
micro_mg_vtrmi_factor = micro_mg_vtrmi_factor_in
micro_mg_vtrms_factor = micro_mg_vtrms_factor_in
micro_mg_effi_factor = micro_mg_effi_factor_in
micro_mg_iaccr_factor = micro_mg_iaccr_factor_in
micro_mg_max_nicons = micro_mg_max_nicons_in
remove_supersat = remove_supersat_in
warm_rain = warm_rain_in
do_implicit_fall = micro_mg_implicit_fall_in
accre_sees_auto = micro_mg_accre_sees_auto_in
nccons = nccons_in
nicons = nicons_in
ncnst = ncnst_in
ninst = ninst_in
ngcons = ngcons_in
ngnst = ngnst_in
nscons = nscons_in
nsnst = nsnst_in
nrcons = nrcons_in
nrnst = nrnst_in
! latent heats
xxlv = latvap ! latent heat vaporization
xlf = latice ! latent heat freezing
xxls = xxlv + xlf ! latent heat of sublimation
! flags
microp_uniform = microp_uniform_in
do_cldice = do_cldice_in
use_hetfrz_classnuc = use_hetfrz_classnuc_in
do_hail = micro_mg_do_hail_in
do_graupel = micro_mg_do_graupel_in
evap_sed_off = micro_mg_evap_sed_off_in
icenuc_rh_off = micro_mg_icenuc_rh_off_in
icenuc_use_meyers = micro_mg_icenuc_use_meyers_in
evap_scl_ifs = micro_mg_evap_scl_ifs_in
evap_rhthrsh_ifs = micro_mg_evap_rhthrsh_ifs_in
rainfreeze_ifs = micro_mg_rainfreeze_ifs_in
ifs_sed = micro_mg_ifs_sed_in
precip_fall_corr = micro_mg_precip_fall_corr
! typical air density at 850 mb
rhosu = 85000._r8/(rair * tmelt)
! Maximum temperature at which snow is allowed to exist
snowmelt = tmelt + 2._r8
! Minimum temperature at which rain is allowed to exist
if (rainfreeze_ifs) then
rainfrze = tmelt
else
rainfrze = tmelt - 40._r8
end if
! Ice nucleation temperature
icenuct = tmelt - 5._r8
! Define constants to help speed up code (this limits calls to gamma function)
gamma_br_plus1=gamma(1._r8+br)
gamma_br_plus4=gamma(4._r8+br)
gamma_bs_plus1=gamma(1._r8+bs)
gamma_bs_plus4=gamma(4._r8+bs)
gamma_bi_plus1=gamma(1._r8+bi)
gamma_bi_plus4=gamma(4._r8+bi)
gamma_bj_plus1=gamma(1._r8+bj)
gamma_bj_plus4=gamma(4._r8+bj)
gamma_bg_plus1=gamma(1._r8)
gamma_bg_plus4=gamma(4._r8)
if (do_hail) then
gamma_bg_plus1 = gamma(1._r8+bh)
gamma_bg_plus4 = gamma(4._r8+bh)
end if
if (do_graupel) then
gamma_bg_plus1 = gamma(1._r8+bg)
gamma_bg_plus4 = gamma(4._r8+bg)
end if
xxlv_squared=xxlv**2
xxls_squared=xxls**2
!$acc update device (nccons,nicons,ngcons,nrcons,nscons,ncnst,ninst,ngnst, &
!$acc nrnst,nsnst,evap_sed_off,icenuc_rh_off,evap_scl_ifs, &
!$acc icenuc_use_meyers,evap_rhthrsh_ifs,rainfreeze_ifs, &
!$acc ifs_sed,precip_fall_corr,dcs, &
!$acc g,r,rv,cpp,tmelt,xxlv,xlf,xxls,rhmini,microp_uniform, &
!$acc do_cldice,use_hetfrz_classnuc,do_hail,do_graupel,rhosu, &
!$acc icenuct,snowmelt,rainfrze,xxlv_squared,xxls_squared, &
!$acc gamma_br_plus1,gamma_br_plus4,gamma_bs_plus1, &
!$acc gamma_bs_plus4,gamma_bi_plus1,gamma_bi_plus4, &
!$acc gamma_bj_plus1,gamma_bj_plus4,gamma_bg_plus1, &
!$acc gamma_bg_plus4,micro_mg_berg_eff_factor, &
!$acc micro_mg_accre_enhan_fact,micro_mg_autocon_fact, &
!$acc micro_mg_autocon_nd_exp,micro_mg_autocon_lwp_exp, &
!$acc micro_mg_homog_size,micro_mg_vtrmi_factor, &
!$acc micro_mg_vtrms_factor, &
!$acc micro_mg_effi_factor,micro_mg_iaccr_factor, &
!$acc micro_mg_max_nicons,remove_supersat,do_implicit_fall, &
!$acc accre_sees_auto)
if (trim(warm_rain) == 'emulated') then
call initialize_tau_emulators(stochastic_emulated_filename_quantile, stochastic_emulated_filename_input_scale, &
stochastic_emulated_filename_output_scale, iulog, errstring)
end if
end subroutine micro_pumas_init
!===============================================================================
!microphysics routine for each timestep goes here...
subroutine micro_pumas_tend ( &
mgncol, nlev, deltatin, &
t, q, &
qcn, qin, &
ncn, nin, &
qrn, qsn, &
nrn, nsn, &
qgr, ngr, &
relvar, accre_enhan, &
p, pdel, pint, &
cldn, liqcldf, icecldf, qsatfac, &
qcsinksum_rate1ord, &
naai, npccn, &
rndst, nacon, &
tlat, qvlat, &
qctend, qitend, &
nctend, nitend, &
qrtend, qstend, &
nrtend, nstend, &
qgtend, ngtend, &
effc, effc_fn, effi, &
sadice, sadsnow, &
prect, preci, &
nevapr, am_evp_st, &
prain, &
cmeout, deffi, &
pgamrad, lamcrad, &
qsout, dsout, &
qgout, ngout, dgout, &
lflx, iflx, &
gflx, &
rflx, sflx, qrout, &
reff_rain, reff_snow, reff_grau, &
nrout, nsout, &
refl, arefl, areflz, &
frefl, csrfl, acsrfl, &
fcsrfl, refl10cm, reflz10cm, rercld, &
ncai, ncal, &
qrout2, qsout2, &
nrout2, nsout2, &
drout2, dsout2, &
qgout2, ngout2, dgout2, freqg, &
freqs, freqr, &
nfice, qcrat, &
proc_rates, &
errstring, & ! Below arguments are "optional" (pass null pointers to omit).
tnd_qsnow, tnd_nsnow, re_ice, &
prer_evap, &
frzimm, frzcnt, frzdep)
use pumas_stochastic_collect_tau, only: ncd, pumas_stochastic_collect_tau_tend
use tau_neural_net_quantile, only: tau_emulated_cloud_rain_interactions
use cam_logfile, only: iulog
use ML_fixer_check, only: ML_fixer_calc
! Constituent properties.
use micro_pumas_utils, only: &
mg_liq_props, &
mg_ice_props, &
mg_rain_props, &
mg_graupel_props, &
mg_hail_props, &
mg_snow_props
! Size calculation functions.
use micro_pumas_utils, only: &
size_dist_param_liq, &
size_dist_param_basic, &
avg_diameter, &
avg_diameter_vec
! Microphysical processes.
use micro_pumas_utils, only: &
ice_deposition_sublimation, &
sb2001v2_liq_autoconversion,&
sb2001v2_accre_cld_water_rain,&
kk2000_liq_autoconversion, &
ice_autoconversion, &
immersion_freezing, &
contact_freezing, &
snow_self_aggregation, &
accrete_cloud_water_snow, &
secondary_ice_production, &
accrete_rain_snow, &
heterogeneous_rain_freezing, &
accrete_cloud_water_rain, &
self_collection_rain, &
accrete_cloud_ice_snow, &
evaporate_sublimate_precip, &
bergeron_process_snow, &
graupel_collecting_snow, &
graupel_collecting_rain, &
graupel_collecting_cld_water, &
graupel_riming_liquid_snow, &
graupel_rain_riming_snow, &
graupel_rime_splintering, &
vapor_deposition_onto_snow, &
evaporate_sublimate_precip_graupel
use micro_pumas_diags, only: proc_rates_type
!Authors: Hugh Morrison, Andrew Gettelman, NCAR, Peter Caldwell, LLNL
! e-mail: [email protected], [email protected]
! input arguments
integer, intent(in) :: mgncol ! number of microphysics columns
integer, intent(in) :: nlev ! number of layers
real(r8), intent(in) :: deltatin ! time step (s)
real(r8), intent(in) :: t(mgncol,nlev) ! input temperature (K)
real(r8), intent(in) :: q(mgncol,nlev) ! input h20 vapor mixing ratio (kg/kg)
! note: all input cloud variables are grid-averaged
real(r8), intent(in) :: qcn(mgncol,nlev) ! cloud water mixing ratio (kg/kg)
real(r8), intent(in) :: qin(mgncol,nlev) ! cloud ice mixing ratio (kg/kg)
real(r8), intent(in) :: ncn(mgncol,nlev) ! cloud water number conc (1/kg)
real(r8), intent(in) :: nin(mgncol,nlev) ! cloud ice number conc (1/kg)
real(r8), intent(in) :: qrn(mgncol,nlev) ! rain mixing ratio (kg/kg)
real(r8), intent(in) :: qsn(mgncol,nlev) ! snow mixing ratio (kg/kg)
real(r8), intent(in) :: nrn(mgncol,nlev) ! rain number conc (1/kg)
real(r8), intent(in) :: nsn(mgncol,nlev) ! snow number conc (1/kg)
real(r8), intent(in) :: qgr(mgncol,nlev) ! graupel/hail mixing ratio (kg/kg)
real(r8), intent(in) :: ngr(mgncol,nlev) ! graupel/hail number conc (1/kg)
real(r8), intent(in) :: relvar(mgncol,nlev) ! cloud water relative variance (-)
real(r8), intent(in) :: accre_enhan(mgncol,nlev) ! optional accretion
! enhancement factor (-)
real(r8), intent(in) :: p(mgncol,nlev) ! air pressure (pa)
real(r8), intent(in) :: pdel(mgncol,nlev) ! pressure difference across level (pa)
real(r8), intent(in) :: pint(mgncol,nlev+1) ! pressure at interfaces
real(r8), intent(in) :: cldn(mgncol,nlev) ! cloud fraction (no units)
real(r8), intent(in) :: liqcldf(mgncol,nlev) ! liquid cloud fraction (no units)
real(r8), intent(in) :: icecldf(mgncol,nlev) ! ice cloud fraction (no units)
real(r8), intent(in) :: qsatfac(mgncol,nlev) ! subgrid cloud water saturation scaling factor (no units)
! used for scavenging
! Inputs for aerosol activation
real(r8), intent(in) :: naai(mgncol,nlev) ! ice nucleation number (from microp_aero_ts) (1/kg*s)
real(r8), intent(in) :: npccn(mgncol,nlev) ! ccn activated number tendency (from microp_aero_ts) (1/kg*s)
! Note that for these variables, the dust bin is assumed to be the last index.
! (For example, in CAM, the last dimension is always size 4.)
real(r8), intent(in) :: rndst(:,:,:) ! radius of each dust bin, for contact freezing (from microp_aero_ts) (m)
real(r8), intent(in) :: nacon(:,:,:) ! number in each dust bin, for contact freezing (from microp_aero_ts) (1/m^3)
! output arguments
real(r8), intent(out) :: qcsinksum_rate1ord(mgncol,nlev) ! 1st order rate for
! direct cw to precip conversion
real(r8), intent(out) :: tlat(mgncol,nlev) ! latent heating rate (W/kg)
real(r8), intent(out) :: qvlat(mgncol,nlev) ! microphysical tendency qv (1/s)
real(r8), intent(out) :: qctend(mgncol,nlev) ! microphysical tendency qc (1/s)
real(r8), intent(out) :: qitend(mgncol,nlev) ! microphysical tendency qi (1/s)
real(r8), intent(out) :: nctend(mgncol,nlev) ! microphysical tendency nc (1/(kg*s))
real(r8), intent(out) :: nitend(mgncol,nlev) ! microphysical tendency ni (1/(kg*s))
real(r8), intent(out) :: qrtend(mgncol,nlev) ! microphysical tendency qr (1/s)
real(r8), intent(out) :: qstend(mgncol,nlev) ! microphysical tendency qs (1/s)
real(r8), intent(out) :: nrtend(mgncol,nlev) ! microphysical tendency nr (1/(kg*s))
real(r8), intent(out) :: nstend(mgncol,nlev) ! microphysical tendency ns (1/(kg*s))
real(r8), intent(out) :: qgtend(mgncol,nlev) ! microphysical tendency qg (1/s)
real(r8), intent(out) :: ngtend(mgncol,nlev) ! microphysical tendency ng (1/(kg*s))
real(r8), intent(out) :: effc(mgncol,nlev) ! droplet effective radius (micron)
real(r8), intent(out) :: effc_fn(mgncol,nlev) ! droplet effective radius, assuming nc = 1.e8 kg-1
real(r8), intent(out) :: effi(mgncol,nlev) ! cloud ice effective radius (micron)
real(r8), intent(out) :: sadice(mgncol,nlev) ! cloud ice surface area density (cm2/cm3)
real(r8), intent(out) :: sadsnow(mgncol,nlev) ! cloud snow surface area density (cm2/cm3)
real(r8), intent(out) :: prect(mgncol) ! surface precip rate (m/s)
real(r8), intent(out) :: preci(mgncol) ! cloud ice/snow precip rate (m/s)
real(r8), intent(out) :: nevapr(mgncol,nlev) ! evaporation rate of rain + snow (1/s)
real(r8), intent(out) :: am_evp_st(mgncol,nlev) ! stratiform evaporation area (frac)
real(r8), intent(out) :: prain(mgncol,nlev) ! production of rain + snow (1/s)
real(r8), intent(out) :: cmeout(mgncol,nlev) ! evap/sub of cloud (1/s)
real(r8), intent(out) :: deffi(mgncol,nlev) ! ice effective diameter for optics (radiation) (micron)
real(r8), intent(out) :: pgamrad(mgncol,nlev) ! ice gamma parameter for optics (radiation) (no units)
real(r8), intent(out) :: lamcrad(mgncol,nlev) ! slope of droplet distribution for optics (radiation) (1/m)
real(r8), intent(out) :: qsout(mgncol,nlev) ! snow mixing ratio (kg/kg)
real(r8), intent(out) :: dsout(mgncol,nlev) ! snow diameter (m)
real(r8), intent(out) :: lflx(mgncol,nlev+1) ! grid-box average liquid condensate flux (kg m^-2 s^-1)
real(r8), intent(out) :: iflx(mgncol,nlev+1) ! grid-box average ice condensate flux (kg m^-2 s^-1)
real(r8), intent(out) :: rflx(mgncol,nlev+1) ! grid-box average rain flux (kg m^-2 s^-1)
real(r8), intent(out) :: sflx(mgncol,nlev+1) ! grid-box average snow flux (kg m^-2 s^-1)
real(r8), intent(out) :: gflx(mgncol,nlev+1) ! grid-box average graupel/hail flux (kg m^-2 s^-1)
real(r8), intent(out) :: qrout(mgncol,nlev) ! grid-box average rain mixing ratio (kg/kg)
real(r8), intent(out) :: reff_rain(mgncol,nlev) ! rain effective radius (micron)
real(r8), intent(out) :: reff_snow(mgncol,nlev) ! snow effective radius (micron)
real(r8), intent(out) :: reff_grau(mgncol,nlev) ! graupel effective radius (micron)
real(r8), intent(out) :: nrout(mgncol,nlev) ! rain number concentration (1/m3)
real(r8), intent(out) :: nsout(mgncol,nlev) ! snow number concentration (1/m3)
real(r8), intent(out) :: refl(mgncol,nlev) ! analytic radar reflectivity (94GHZ, cloud radar)
real(r8), intent(out) :: arefl(mgncol,nlev) ! average reflectivity will zero points outside valid range
real(r8), intent(out) :: areflz(mgncol,nlev) ! average reflectivity in z.
real(r8), intent(out) :: frefl(mgncol,nlev) ! fractional occurrence of radar reflectivity
real(r8), intent(out) :: csrfl(mgncol,nlev) ! cloudsat reflectivity
real(r8), intent(out) :: acsrfl(mgncol,nlev) ! cloudsat average
real(r8), intent(out) :: fcsrfl(mgncol,nlev) ! cloudsat fractional occurrence of radar reflectivity
real(r8), intent(out) :: refl10cm(mgncol,nlev) ! 10cm (rain) analytic radar reflectivity
real(r8), intent(out) :: reflz10cm(mgncol,nlev) ! 10cm (rain) analytic radar reflectivity
real(r8), intent(out) :: rercld(mgncol,nlev) ! effective radius calculation for rain + cloud
real(r8), intent(out) :: ncai(mgncol,nlev) ! output number conc of ice nuclei available (1/m3)
real(r8), intent(out) :: ncal(mgncol,nlev) ! output number conc of CCN (1/m3)
real(r8), intent(out) :: qrout2(mgncol,nlev) ! copy of qrout as used to compute drout2
real(r8), intent(out) :: qsout2(mgncol,nlev) ! copy of qsout as used to compute dsout2
real(r8), intent(out) :: nrout2(mgncol,nlev) ! copy of nrout as used to compute drout2
real(r8), intent(out) :: nsout2(mgncol,nlev) ! copy of nsout as used to compute dsout2
real(r8), intent(out) :: drout2(mgncol,nlev) ! mean rain particle diameter (m)
real(r8), intent(out) :: dsout2(mgncol,nlev) ! mean snow particle diameter (m)
real(r8), intent(out) :: freqs(mgncol,nlev) ! fractional occurrence of snow
real(r8), intent(out) :: freqr(mgncol,nlev) ! fractional occurrence of rain
real(r8), intent(out) :: nfice(mgncol,nlev) ! fractional occurrence of ice
real(r8), intent(out) :: qcrat(mgncol,nlev) ! limiter for qc process rates (1=no limit --> 0. no qc)
real(r8), intent(out) :: qgout(mgncol,nlev) ! graupel/hail mixing ratio (kg/kg)
real(r8), intent(out) :: dgout(mgncol,nlev) ! graupel/hail diameter (m)
real(r8), intent(out) :: ngout(mgncol,nlev) ! graupel/hail number concentration (1/m3)
real(r8), intent(out) :: qgout2(mgncol,nlev) ! copy of qgout as used to compute dgout2
real(r8), intent(out) :: ngout2(mgncol,nlev) ! copy of ngout as used to compute dgout2
real(r8), intent(out) :: dgout2(mgncol,nlev) ! mean graupel/hail particle diameter (m)
real(r8), intent(out) :: freqg(mgncol,nlev) ! fractional occurrence of graupel
real(r8), intent(out) :: prer_evap(mgncol,nlev)
type (proc_rates_type), intent(inout) :: proc_rates
character(128), intent(out) :: errstring ! output status (non-blank for error return)
! Tendencies calculated by external schemes that can replace MG's native
! process tendencies.
! Used with CARMA cirrus microphysics
! (or similar external microphysics model)
real(r8), intent(in) :: tnd_qsnow(:,:) ! snow mass tendency (kg/kg/s)
real(r8), intent(in) :: tnd_nsnow(:,:) ! snow number tendency (#/kg/s)
real(r8), intent(in) :: re_ice(:,:) ! ice effective radius (m)
! From external ice nucleation.
real(r8), intent(in) :: frzimm(:,:) ! Number tendency due to immersion freezing (1/cm3)
real(r8), intent(in) :: frzcnt(:,:) ! Number tendency due to contact freezing (1/cm3)
real(r8), intent(in) :: frzdep(:,:) ! Number tendency due to deposition nucleation (1/cm3)
! local workspace
! all units mks unless otherwise stated
! local copies of input variables
real(r8) :: qc(mgncol,nlev) ! cloud liquid mixing ratio (kg/kg)
real(r8) :: qi(mgncol,nlev) ! cloud ice mixing ratio (kg/kg)
real(r8) :: nc(mgncol,nlev) ! cloud liquid number concentration (1/kg)
real(r8) :: ni(mgncol,nlev) ! cloud liquid number concentration (1/kg)
real(r8) :: qr(mgncol,nlev) ! rain mixing ratio (kg/kg)
real(r8) :: qs(mgncol,nlev) ! snow mixing ratio (kg/kg)
real(r8) :: nr(mgncol,nlev) ! rain number concentration (1/kg)
real(r8) :: ns(mgncol,nlev) ! snow number concentration (1/kg)
real(r8) :: qg(mgncol,nlev) ! graupel mixing ratio (kg/kg)
real(r8) :: ng(mgncol,nlev) ! graupel number concentration (1/kg)
real(r8) :: rhogtmp ! hail or graupel density (kg m-3)
! general purpose variables
real(r8) :: deltat ! sub-time step (s)
real(r8) :: rdeltat ! reciprocal of sub-time step (1/s)
! physical properties of the air at a given point
real(r8) :: rho(mgncol,nlev) ! density (kg m-3)
real(r8) :: dv(mgncol,nlev) ! diffusivity of water vapor
real(r8) :: mu(mgncol,nlev) ! viscosity
real(r8) :: sc(mgncol,nlev) ! schmidt number
real(r8) :: rhof(mgncol,nlev) ! density correction factor for fallspeed
! cloud fractions
real(r8) :: precip_frac(mgncol,nlev) ! precip fraction assuming maximum overlap
real(r8) :: cldm(mgncol,nlev) ! cloud fraction
real(r8) :: icldm(mgncol,nlev) ! ice cloud fraction
real(r8) :: lcldm(mgncol,nlev) ! liq cloud fraction
real(r8) :: qsfm(mgncol,nlev) ! subgrid cloud water saturation scaling factor
! mass mixing ratios
real(r8) :: qcic(mgncol,nlev) ! in-cloud cloud liquid
real(r8) :: qiic(mgncol,nlev) ! in-cloud cloud ice
real(r8) :: qsic(mgncol,nlev) ! in-precip snow
real(r8) :: qric(mgncol,nlev) ! in-precip rain
real(r8) :: qgic(mgncol,nlev) ! in-precip graupel/hail
! number concentrations
real(r8) :: ncic(mgncol,nlev) ! in-cloud droplet
real(r8) :: niic(mgncol,nlev) ! in-cloud cloud ice
real(r8) :: nsic(mgncol,nlev) ! in-precip snow
real(r8) :: nric(mgncol,nlev) ! in-precip rain
real(r8) :: ngic(mgncol,nlev) ! in-precip graupel/hail
! Size distribution parameters for:
! cloud ice
real(r8) :: lami(mgncol,nlev) ! slope
real(r8) :: n0i(mgncol,nlev) ! intercept
! cloud liquid
real(r8) :: lamc(mgncol,nlev) ! slope
real(r8) :: pgam(mgncol,nlev) ! spectral width parameter
! snow
real(r8) :: lams(mgncol,nlev) ! slope
real(r8) :: n0s(mgncol,nlev) ! intercept
! rain
real(r8) :: lamr(mgncol,nlev) ! slope
real(r8) :: n0r(mgncol,nlev) ! intercept
! graupel/hail
real(r8) :: lamg(mgncol,nlev) ! slope
real(r8) :: n0g(mgncol,nlev) ! intercept
real(r8) :: bgtmp ! tmp fall speed parameter
! Rates/tendencies due to:
! Instantaneous snow melting
real(r8) :: minstsm(mgncol,nlev) ! mass mixing ratio
real(r8) :: ninstsm(mgncol,nlev) ! number concentration
! Instantaneous graupel melting
real(r8) :: minstgm(mgncol,nlev) ! mass mixing ratio
real(r8) :: ninstgm(mgncol,nlev) ! number concentration
! Instantaneous rain freezing
real(r8) :: minstrf(mgncol,nlev) ! mass mixing ratio
real(r8) :: ninstrf(mgncol,nlev) ! number concentration
! deposition of cloud ice
real(r8) :: vap_dep(mgncol,nlev) ! deposition from vapor to ice PMC 12/3/12
! sublimation of cloud ice
real(r8) :: ice_sublim(mgncol,nlev) ! sublimation from ice to vapor PMC 12/3/12
! vapor deposition onto
real(r8) :: vap_deps(mgncol,nlev) ! Vapor deposition onto snow.
! ice nucleation
real(r8) :: nnuccd(mgncol,nlev) ! number rate from deposition/cond.-freezing
real(r8) :: mnuccd(mgncol,nlev) ! mass mixing ratio
! freezing of cloud water
real(r8) :: mnuccc(mgncol,nlev) ! mass mixing ratio
real(r8) :: nnuccc(mgncol,nlev) ! number concentration
! contact freezing of cloud water
real(r8) :: mnucct(mgncol,nlev) ! mass mixing ratio
real(r8) :: nnucct(mgncol,nlev) ! number concentration
! deposition nucleation in mixed-phase clouds (from external scheme)
real(r8) :: mnudep(mgncol,nlev) ! mass mixing ratio
real(r8) :: nnudep(mgncol,nlev) ! number concentration
! ice multiplication
real(r8) :: msacwi(mgncol,nlev) ! mass mixing ratio
real(r8) :: nsacwi(mgncol,nlev) ! number concentration
! autoconversion of cloud droplets
real(r8) :: prc(mgncol,nlev) ! mass mixing ratio
real(r8) :: nprc(mgncol,nlev) ! number concentration (rain)
real(r8) :: nprc1(mgncol,nlev) ! number concentration (cloud droplets)
! self-aggregation of snow
real(r8) :: nsagg(mgncol,nlev) ! number concentration
! self-collection of rain
real(r8) :: nragg(mgncol,nlev) ! number concentration
! collection of droplets by snow
real(r8) :: psacws(mgncol,nlev) ! mass mixing ratio
real(r8) :: npsacws(mgncol,nlev) ! number concentration
! collection of rain by snow
real(r8) :: pracs(mgncol,nlev) ! mass mixing ratio
real(r8) :: npracs(mgncol,nlev) ! number concentration
! freezing of rain
real(r8) :: mnuccr(mgncol,nlev) ! mass mixing ratio
real(r8) :: nnuccr(mgncol,nlev) ! number concentration
! freezing of rain to form ice (mg add 4/26/13)
real(r8) :: mnuccri(mgncol,nlev) ! mass mixing ratio
real(r8) :: nnuccri(mgncol,nlev) ! number concentration
! accretion of droplets by rain
real(r8) :: pra(mgncol,nlev) ! mass mixing ratio
real(r8) :: npra(mgncol,nlev) ! number concentration
! autoconversion of cloud ice to snow
real(r8) :: prci(mgncol,nlev) ! mass mixing ratio
real(r8) :: nprci(mgncol,nlev) ! number concentration
! accretion of cloud ice by snow
real(r8) :: prai(mgncol,nlev) ! mass mixing ratio
real(r8) :: nprai(mgncol,nlev) ! number concentration
! evaporation of rain
real(r8) :: pre(mgncol,nlev) ! mass mixing ratio
! sublimation of snow
real(r8) :: prds(mgncol,nlev) ! mass mixing ratio
! number evaporation
real(r8) :: nsubi(mgncol,nlev) ! cloud ice
real(r8) :: nsubc(mgncol,nlev) ! droplet
real(r8) :: nsubs(mgncol,nlev) ! snow
real(r8) :: nsubr(mgncol,nlev) ! rain
! bergeron process
real(r8) :: berg(mgncol,nlev) ! mass mixing ratio (cloud ice)
real(r8) :: bergs(mgncol,nlev) ! mass mixing ratio (snow)
!graupel/hail processes
real(r8) :: npracg(mgncol,nlev) ! change n collection rain by graupel (precipf)
real(r8) :: nscng(mgncol,nlev) ! change n conversion to graupel due to collection droplets by snow (lcldm)
real(r8) :: ngracs(mgncol,nlev) ! change n conversion to graupel due to collection rain by snow (precipf)
real(r8) :: nmultg(mgncol,nlev) ! ice mult due to acc droplets by graupel (lcldm)
real(r8) :: nmultrg(mgncol,nlev) ! ice mult due to acc rain by graupel (precipf)
real(r8) :: npsacwg(mgncol,nlev) ! change n collection droplets by graupel (lcldm)
real(r8) :: psacr(mgncol,nlev) ! conversion due to coll of snow by rain (precipf)
real(r8) :: pracg(mgncol,nlev) ! change in q collection rain by graupel (precipf)
real(r8) :: psacwg(mgncol,nlev) ! change in q collection droplets by graupel (lcldm)
real(r8) :: pgsacw(mgncol,nlev) ! conversion q to graupel due to collection droplets by snow (lcldm)
real(r8) :: pgracs(mgncol,nlev) ! conversion q to graupel due to collection rain by snow (precipf)
real(r8) :: prdg(mgncol,nlev) ! dep of graupel (precipf)
real(r8) :: qmultg(mgncol,nlev) ! change q due to ice mult droplets/graupel (lcldm)
real(r8) :: qmultrg(mgncol,nlev) ! change q due to ice mult rain/graupel (precipf)
! fallspeeds
! number-weighted
real(r8) :: uns(mgncol,nlev) ! snow
real(r8) :: unr(mgncol,nlev) ! rain
real(r8) :: ung(mgncol,nlev) ! graupel/hail
! air density corrected fallspeed parameters
real(r8) :: arn(mgncol,nlev) ! rain
real(r8) :: asn(mgncol,nlev) ! snow
real(r8) :: agn(mgncol,nlev) ! graupel
real(r8) :: acn(mgncol,nlev) ! cloud droplet
real(r8) :: ain(mgncol,nlev) ! cloud ice
real(r8) :: ajn(mgncol,nlev) ! cloud small ice
! Mass of liquid droplets used with external heterogeneous freezing.
real(r8) :: mi0l(mgncol,nlev)
! saturation vapor pressures
real(r8) :: esl(mgncol,nlev) ! liquid
real(r8) :: esi(mgncol,nlev) ! ice
real(r8) :: esnA(mgncol,nlev) ! checking for RH after rain evap
! saturation vapor mixing ratios
real(r8) :: qvl(mgncol,nlev) ! liquid
real(r8) :: qvi(mgncol,nlev) ! ice
real(r8) :: qvnA(mgncol,nlev), qvnAI(mgncol,nlev) ! checking for RH after rain evap
! relative humidity
real(r8) :: relhum(mgncol,nlev)