forked from ESCOMP/CLUBB_CESM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstats_variables.F90
1510 lines (1318 loc) · 46 KB
/
stats_variables.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
!-------------------------------------------------------------------------------
! $Id$
!-------------------------------------------------------------------------------
! Description:
! Holds pointers and other variables for statistics to be written to
! GrADS files and netCDF files.
!-------------------------------------------------------------------------------
module stats_variables
use stats_type, only: &
stats ! Type
use clubb_precision, only: &
core_rknd ! Variable(s)
implicit none
private ! Set Default Scope
! Sampling and output frequencies
real( kind = core_rknd ), public :: &
stats_tsamp = 0._core_rknd, & ! Sampling interval [s]
stats_tout = 0._core_rknd ! Output interval [s]
!$omp threadprivate(stats_tsamp, stats_tout)
logical, public :: &
l_stats = .false., & ! Main flag to turn statistics on/off
l_output_rad_files = .false., & ! Flag to turn off radiation statistics output
l_netcdf = .false., & ! Output to NetCDF format
l_grads = .false., & ! Output to GrADS format
l_silhs_out = .false., & ! Output SILHS files (stats_lh_zt and stats_lh_sfc)
l_allow_small_stats_tout = .false. ! Do not stop if output timestep is too low for
! requested format, e.g. l_grads = .true. and
! stats_tout < 60.0
!$omp threadprivate(l_stats, l_output_rad_files, l_netcdf, l_grads, l_silhs_out, &
!$omp l_allow_small_stats_tout)
logical, public :: &
l_stats_samp = .false., & ! Sample flag for current time step
l_stats_last = .false. ! Last time step of output period
!$omp threadprivate(l_stats_samp, l_stats_last)
character(len=200), public :: &
fname_zt = '', & ! Name of the stats file for thermodynamic grid fields
fname_lh_zt = '', & ! Name of the stats file for LH variables on the stats_zt grid
fname_lh_sfc = '', & ! Name of the stats file for LH variables on the stats_zt grid
fname_zm = '', & ! Name of the stats file for momentum grid fields
fname_rad_zt = '', & ! Name of the stats file for the stats_zt radiation grid fields
fname_rad_zm = '', & ! Name of the stats file for the stats_zm radiation grid fields
fname_sfc = '' ! Name of the stats file for surface only fields
!$omp threadprivate(fname_zt, fname_lh_zt, fname_lh_sfc, fname_zm, fname_rad_zt, &
!$omp fname_rad_zm, fname_sfc)
! Indices for statistics in stats_zt file
integer, public :: &
ithlm = 0, &
ithvm = 0, &
irtm = 0, &
ircm = 0, &
irvm = 0, &
ium = 0, &
ivm = 0, &
iwm_zt = 0, &
iwm_zm = 0, &
ium_ref = 0,&
ivm_ref = 0, &
iug = 0, &
ivg = 0, &
icloud_frac = 0, &
iice_supersat_frac = 0, &
ircm_in_layer = 0, &
ircm_in_cloud = 0, &
icloud_cover = 0, &
ip_in_Pa = 0, &
iexner = 0, &
irho_ds_zt = 0, &
ithv_ds_zt = 0, &
iLscale = 0, &
iwp3 = 0, &
ithlp3 = 0, &
irtp3 = 0, &
iwpthlp2 = 0, &
iwp2thlp = 0, &
iwprtp2 = 0, &
iwp2rtp = 0, &
iSkw_zt = 0, &
iSkthl_zt = 0, &
iSkrt_zt = 0, &
ircm_supersat_adj = 0
!$omp threadprivate(ithlm, ithvm, irtm, ircm, irvm, ium, ivm, ium_ref, ivm_ref, &
!$omp iwm_zt, iwm_zm, iug, ivg, icloud_frac, iice_supersat_frac, ircm_in_layer, &
!$omp ircm_in_cloud, icloud_cover, &
!$omp ip_in_Pa, iexner, irho_ds_zt, ithv_ds_zt, iLscale, iwp3, ithlp3, irtp3, &
!$omp iwpthlp2, iwp2thlp, iwprtp2, iwp2rtp, iSkw_zt, iSkthl_zt, iSkrt_zt, ircm_supersat_adj )
integer, public :: &
iLscale_up = 0, &
iLscale_down = 0, &
iLscale_pert_1 = 0, &
iLscale_pert_2 = 0, &
itau_zt = 0, &
iKh_zt = 0, &
iwp2thvp = 0, &
iwp2rcp = 0, &
iwprtpthlp = 0, &
irc_coef = 0, &
isigma_sqd_w_zt = 0, &
irho = 0
!$omp threadprivate( iLscale_up, iLscale_down, &
!$omp iLscale_pert_1, iLscale_pert_2, &
!$omp itau_zt, iKh_zt, iwp2thvp, iwp2rcp, iwprtpthlp, irc_coef, &
!$omp isigma_sqd_w_zt, irho )
integer, public :: &
itau_no_N2_zm = 0, &
itau_xp2_zm = 0, &
itau_wp2_zm = 0, &
itau_wp3_zm = 0
!$omp threadprivate( itau_no_N2_zm,itau_wp2_zm, itau_xp2_zm, itau_wp3_zm )
integer, dimension(:), allocatable, public :: &
ihm_1, &
ihm_2
!$omp threadprivate( ihm_1, ihm_2 )
integer, public :: &
iprecip_frac = 0, &
iprecip_frac_1 = 0, &
iprecip_frac_2 = 0, &
iNcnm = 0
!$omp threadprivate( iprecip_frac, iprecip_frac_1, iprecip_frac_2, iNcnm )
integer, dimension(:), allocatable, public :: &
imu_hm_1, &
imu_hm_2, &
imu_hm_1_n, &
imu_hm_2_n, &
isigma_hm_1, &
isigma_hm_2, &
isigma_hm_1_n, &
isigma_hm_2_n, &
icorr_w_hm_1, &
icorr_w_hm_2, &
icorr_chi_hm_1, &
icorr_chi_hm_2, &
icorr_eta_hm_1, &
icorr_eta_hm_2, &
icorr_Ncn_hm_1, &
icorr_Ncn_hm_2, &
icorr_w_hm_1_n, &
icorr_w_hm_2_n, &
icorr_chi_hm_1_n, &
icorr_chi_hm_2_n, &
icorr_eta_hm_1_n, &
icorr_eta_hm_2_n, &
icorr_Ncn_hm_1_n, &
icorr_Ncn_hm_2_n
!$omp threadprivate( imu_hm_1, imu_hm_2, imu_hm_1_n, imu_hm_2_n, &
!$omp isigma_hm_1, isigma_hm_2, isigma_hm_1_n, isigma_hm_2_n, &
!$omp icorr_w_hm_1, icorr_w_hm_2, icorr_chi_hm_1, icorr_chi_hm_2, &
!$omp icorr_eta_hm_1, icorr_eta_hm_2, icorr_Ncn_hm_1, icorr_Ncn_hm_2, &
!$omp icorr_w_hm_1_n, icorr_w_hm_2_n, icorr_chi_hm_1_n, icorr_chi_hm_2_n, &
!$omp icorr_eta_hm_1_n, icorr_eta_hm_2_n, icorr_Ncn_hm_1_n, icorr_Ncn_hm_2_n )
integer, dimension(:,:), allocatable, public :: &
icorr_hmx_hmy_1, &
icorr_hmx_hmy_2, &
icorr_hmx_hmy_1_n, &
icorr_hmx_hmy_2_n
!$omp threadprivate( icorr_hmx_hmy_1, icorr_hmx_hmy_2, &
!$omp icorr_hmx_hmy_1_n, icorr_hmx_hmy_2_n )
integer, public :: &
imu_Ncn_1 = 0, &
imu_Ncn_2 = 0, &
imu_Ncn_1_n = 0, &
imu_Ncn_2_n = 0, &
isigma_Ncn_1 = 0, &
isigma_Ncn_2 = 0, &
isigma_Ncn_1_n = 0, &
isigma_Ncn_2_n = 0
!$omp threadprivate( imu_Ncn_1, imu_Ncn_2, imu_Ncn_1_n, imu_Ncn_2_n, &
!$omp isigma_Ncn_1, isigma_Ncn_2, isigma_Ncn_1_n, isigma_Ncn_2_n )
integer, public :: &
icorr_w_chi_1_ca = 0, &
icorr_w_chi_2_ca = 0, &
icorr_w_eta_1_ca = 0, &
icorr_w_eta_2_ca = 0, &
icorr_w_Ncn_1 = 0, &
icorr_w_Ncn_2 = 0, &
icorr_chi_eta_1_ca = 0, &
icorr_chi_eta_2_ca = 0, &
icorr_chi_Ncn_1 = 0, &
icorr_chi_Ncn_2 = 0, &
icorr_eta_Ncn_1 = 0, &
icorr_eta_Ncn_2 = 0
!$omp threadprivate( icorr_w_chi_1_ca, icorr_w_chi_2_ca, icorr_w_eta_1_ca, &
!$omp icorr_w_eta_2_ca, icorr_w_Ncn_1, icorr_w_Ncn_2, icorr_chi_eta_1_ca, &
!$omp icorr_chi_eta_2_ca, icorr_chi_Ncn_1, icorr_chi_Ncn_2, icorr_eta_Ncn_1, &
!$omp icorr_eta_Ncn_2 )
integer, public :: &
icorr_w_Ncn_1_n = 0, &
icorr_w_Ncn_2_n = 0, &
icorr_chi_Ncn_1_n = 0, &
icorr_chi_Ncn_2_n = 0, &
icorr_eta_Ncn_1_n = 0, &
icorr_eta_Ncn_2_n = 0
!$omp threadprivate( icorr_w_Ncn_1_n, icorr_w_Ncn_2_n, icorr_chi_Ncn_1_n, &
!$omp icorr_chi_Ncn_2_n, icorr_eta_Ncn_1_n, icorr_eta_Ncn_2_n )
integer, dimension(:), allocatable, public :: &
isilhs_variance_category, &
ilh_samp_frac_category
!$omp threadprivate( isilhs_variance_category, ilh_samp_frac_category )
integer, public :: &
iNcm = 0, & ! Brian
iNccnm = 0, &
iNc_in_cloud = 0, &
iNc_activated = 0, &
isnowslope = 0, & ! Adam Smith, 22 April 2008
ised_rcm = 0, & ! Brian
irsat = 0, & ! Brian
irsati = 0, &
irrm = 0, & ! Brian
im_vol_rad_rain = 0, & ! Brian
im_vol_rad_cloud = 0, & ! COAMPS only. dschanen 6 Dec 2006
iprecip_rate_zt = 0, & ! Brian
iAKm = 0, & ! analytic Kessler. Vince Larson 22 May 2005
ilh_AKm = 0, & ! LH Kessler. Vince Larson 22 May 2005
iradht = 0, & ! Radiative heating.
iradht_LW = 0, & ! " " Long-wave component
iradht_SW = 0, & ! " " Short-wave component
irel_humidity = 0
!$omp threadprivate( iNcm, iNccnm, iNc_in_cloud, iNc_activated, isnowslope, &
!$omp ised_rcm, irsat, irsati, irrm, &
!$omp im_vol_rad_rain, im_vol_rad_cloud, &
!$omp iprecip_rate_zt, iAKm, ilh_AKm, &
!$omp iradht, iradht_LW, iradht_SW, &
!$omp irel_humidity )
integer, public :: &
iAKstd = 0, &
iAKstd_cld = 0, &
iAKm_rcm = 0, &
iAKm_rcc = 0
!$omp threadprivate( iAKstd, iAKstd_cld, iAKm_rcm, iAKm_rcc )
integer, public :: &
irfrzm = 0
!$omp threadprivate(irfrzm)
! Skewness functions on stats_zt grid
integer, public :: &
iC11_Skw_fnc = 0
!$omp threadprivate(iC11_Skw_fnc)
integer, public :: &
icloud_frac_zm = 0, &
iice_supersat_frac_zm = 0, &
ircm_zm = 0, &
irtm_zm = 0, &
ithlm_zm = 0
!$omp threadprivate(icloud_frac_zm, iice_supersat_frac_zm, ircm_zm, irtm_zm, ithlm_zm)
integer, public :: &
iw_1_zm = 0, &
iw_2_zm = 0, &
ivarnce_w_1_zm = 0, &
ivarnce_w_2_zm = 0, &
imixt_frac_zm = 0
!$omp threadprivate(iw_1_zm, iw_2_zm, ivarnce_w_1_zm, ivarnce_w_2_zm, &
!$omp imixt_frac_zm)
integer, public :: &
ilh_rcm_avg = 0, &
ik_lh_start = 0
!$omp threadprivate(ilh_rcm_avg, ik_lh_start)
integer, public :: &
iNrm = 0, & ! Rain droplet number concentration
iNim = 0, & ! Ice number concentration
iNsm = 0, & ! Snow number concentration
iNgm = 0 ! Graupel number concentration
!$omp threadprivate(iNrm, iNim, iNsm, iNgm)
integer, public :: &
iT_in_K ! Absolute temperature
!$omp threadprivate(iT_in_K)
integer, public :: &
ieff_rad_cloud = 0, &
ieff_rad_ice = 0, &
ieff_rad_snow = 0, &
ieff_rad_rain = 0, &
ieff_rad_graupel = 0
!$omp threadprivate(ieff_rad_cloud, ieff_rad_ice, ieff_rad_snow)
!$omp threadprivate(ieff_rad_rain, ieff_rad_graupel)
integer, public :: &
irsm = 0, &
irgm = 0, &
irim = 0, &
idiam = 0, & ! Diameter of ice crystal [m]
imass_ice_cryst = 0, & ! Mass of a single ice crystal [kg]
ircm_icedfs = 0, & ! Change in liquid water due to ice [kg/kg/s]
iu_T_cm = 0 ! Fallspeed of ice crystal in cm/s [cm s^{-1}]
!$omp threadprivate(irsm, irgm, irim, idiam, &
!$omp imass_ice_cryst, ircm_icedfs, iu_T_cm)
! thlm/rtm budget terms
integer, public :: &
irtm_bt = 0, & ! rtm total time tendency
irtm_ma = 0, & ! rtm mean advect. term
irtm_ta = 0, & ! rtm turb. advect. term
irtm_forcing = 0, & ! rtm large scale forcing term
irtm_mc = 0, & ! rtm change from microphysics
irtm_sdmp = 0, & ! rtm change from sponge damping
irvm_mc = 0, & ! rvm change from microphysics
ircm_mc = 0, & ! rcm change from microphysics
ircm_sd_mg_morr = 0, & ! rcm sedimentation tendency
irtm_mfl = 0, & ! rtm change due to monotonic flux limiter
irtm_tacl = 0, & ! rtm correction from turbulent advection (wprtp) clipping
irtm_cl = 0, & ! rtm clipping term
irtm_pd = 0, & ! thlm postive definite adj term
ithlm_bt = 0, & ! thlm total time tendency
ithlm_ma = 0, & ! thlm mean advect. term
ithlm_ta = 0, & ! thlm turb. advect. term
ithlm_forcing = 0, & ! thlm large scale forcing term
ithlm_sdmp = 0, & ! thlm change from sponge damping
ithlm_mc = 0, & ! thlm change from microphysics
ithlm_mfl = 0, & ! thlm change due to monotonic flux limiter
ithlm_tacl = 0, & ! thlm correction from turbulent advection (wpthlp) clipping
ithlm_cl = 0 ! thlm clipping term
!$omp threadprivate(irtm_bt, irtm_ma, irtm_ta, irtm_forcing, &
!$omp irtm_mc, irtm_sdmp, irtm_mfl, irtm_tacl, irtm_cl, irtm_pd, &
!$omp irvm_mc, ircm_mc, ircm_sd_mg_morr, &
!$omp ithlm_bt, ithlm_ma, ithlm_ta, ithlm_forcing, &
!$omp ithlm_mc, ithlm_sdmp, ithlm_mfl, ithlm_tacl, ithlm_cl)
!monatonic flux limiter diagnostic terms
integer, public :: &
ithlm_mfl_min = 0, &
ithlm_mfl_max = 0, &
iwpthlp_entermfl = 0, &
iwpthlp_exit_mfl = 0, &
iwpthlp_mfl_min = 0, &
iwpthlp_mfl_max = 0, &
irtm_mfl_min = 0, &
irtm_mfl_max = 0, &
iwprtp_enter_mfl = 0, &
iwprtp_exit_mfl = 0, &
iwprtp_mfl_min = 0, &
iwprtp_mfl_max = 0, &
ithlm_enter_mfl = 0, &
ithlm_exit_mfl = 0, &
ithlm_old = 0, &
ithlm_without_ta = 0, &
irtm_enter_mfl = 0, &
irtm_exit_mfl = 0, &
irtm_old = 0, &
irtm_without_ta = 0
!$omp threadprivate(ithlm_mfl_min, ithlm_mfl_max, iwpthlp_entermfl)
!$omp threadprivate(iwpthlp_exit_mfl, iwpthlp_mfl_min, iwpthlp_mfl_max)
!$omp threadprivate(irtm_mfl_min, irtm_mfl_max, iwprtp_enter_mfl)
!$omp threadprivate(iwprtp_exit_mfl, iwprtp_mfl_min, iwprtp_mfl_max)
!$omp threadprivate(ithlm_enter_mfl, ithlm_exit_mfl, ithlm_old, ithlm_without_ta)
!$omp threadprivate(irtm_enter_mfl, irtm_exit_mfl, irtm_old, irtm_without_ta)
integer, public :: &
iwp3_bt = 0, &
iwp3_ma = 0, &
iwp3_ta = 0, &
iwp3_tp = 0, &
iwp3_ac = 0, &
iwp3_bp1 = 0, &
iwp3_bp2 = 0, &
iwp3_pr1 = 0, &
iwp3_pr2 = 0, &
iwp3_pr3 = 0, &
iwp3_dp1 = 0, &
iwp3_sdmp = 0, &
iwp3_cl = 0, &
iwp3_splat = 0
!$omp threadprivate(iwp3_bt, iwp3_ma, iwp3_ta, iwp3_tp, iwp3_ac, iwp3_bp1)
!$omp threadprivate(iwp3_bp2, iwp3_pr1, iwp3_pr2, iwp3_pr3, iwp3_dp1)
!$omp threadprivate(iwp3_sdmp, iwp3_cl, iwp3_splat)
integer, public :: &
irtp3_bt = 0, &
irtp3_tp = 0, &
irtp3_ac = 0, &
irtp3_dp = 0, &
ithlp3_bt = 0, &
ithlp3_tp = 0, &
ithlp3_ac = 0, &
ithlp3_dp = 0
!$omp threadprivate( irtp3_bt, irtp3_tp, irtp3_ac, irtp3_dp )
!$omp threadprivate( ithlp3_bt, ithlp3_tp, ithlp3_ac, ithlp3_dp )
! Rain mixing ratio budgets
integer, public :: &
irrm_bt = 0, &
irrm_ma = 0, &
irrm_ta = 0, &
irrm_sd = 0, &
irrm_ts = 0, &
irrm_sd_morr = 0, &
irrm_evap = 0, &
irrm_auto = 0, &
irrm_accr = 0, &
irrm_evap_adj = 0, &
irrm_src_adj = 0, &
irrm_mc_nonadj = 0, &
irrm_mc = 0, &
irrm_hf = 0, &
irrm_wvhf = 0, &
irrm_cl = 0
!$omp threadprivate(irrm_bt, irrm_ma, irrm_ta, irrm_sd)
!$omp threadprivate(irrm_ts, irrm_sd_morr)
!$omp threadprivate(irrm_evap, irrm_auto, irrm_accr)
!$omp threadprivate(irrm_evap_adj, irrm_src_adj, irrm_mc_nonadj)
!$omp threadprivate(irrm_mc, irrm_hf, irrm_wvhf, irrm_cl)
integer, public :: &
iNrm_bt = 0, &
iNrm_ma = 0, &
iNrm_ta = 0, &
iNrm_sd = 0, &
iNrm_ts = 0, &
iNrm_evap = 0, &
iNrm_auto = 0, &
iNrm_evap_adj = 0, &
iNrm_src_adj = 0, &
iNrm_mc = 0, &
iNrm_cl = 0
!$omp threadprivate(iNrm_bt, iNrm_ma, iNrm_ta, iNrm_sd, iNrm_ts, iNrm_evap)
!$omp threadprivate(iNrm_auto, iNrm_evap_adj, iNrm_src_adj )
!$omp threadprivate(iNrm_mc, iNrm_cl)
! Snow/Ice/Graupel mixing ratio budgets
integer, public :: &
irsm_bt = 0, &
irsm_ma = 0, &
irsm_sd = 0, &
irsm_sd_morr = 0, &
irsm_ta = 0, &
irsm_mc = 0, &
irsm_hf = 0, &
irsm_wvhf = 0, &
irsm_cl = 0, &
irsm_sd_morr_int = 0
!$omp threadprivate(irsm_bt, irsm_ma, irsm_sd, irsm_sd_morr, irsm_ta)
!$omp threadprivate(irsm_mc, irsm_hf, irsm_wvhf, irsm_cl, irsm_sd_morr_int)
integer, public :: &
irgm_bt = 0, &
irgm_ma = 0, &
irgm_sd = 0, &
irgm_sd_morr = 0, &
irgm_ta = 0, &
irgm_mc = 0, &
irgm_hf = 0, &
irgm_wvhf = 0, &
irgm_cl = 0
!$omp threadprivate(irgm_bt, irgm_ma, irgm_sd, irgm_sd_morr)
!$omp threadprivate(irgm_ta, irgm_mc)
!$omp threadprivate(irgm_hf, irgm_wvhf, irgm_cl)
integer, public :: &
irim_bt = 0, &
irim_ma = 0, &
irim_sd = 0, &
irim_sd_mg_morr = 0, &
irim_ta = 0, &
irim_mc = 0, &
irim_hf = 0, &
irim_wvhf = 0, &
irim_cl = 0
!$omp threadprivate(irim_bt, irim_ma, irim_sd, irim_sd_mg_morr, irim_ta)
!$omp threadprivate(irim_mc, irim_hf, irim_wvhf, irim_cl)
integer, public :: &
iNsm_bt = 0, &
iNsm_ma = 0, &
iNsm_sd = 0, &
iNsm_ta = 0, &
iNsm_mc = 0, &
iNsm_cl = 0
!$omp threadprivate(iNsm_bt, iNsm_ma, iNsm_sd, iNsm_ta, &
!$omp iNsm_mc, iNsm_cl)
integer, public :: &
iNgm_bt = 0, &
iNgm_ma = 0, &
iNgm_sd = 0, &
iNgm_ta = 0, &
iNgm_mc = 0, &
iNgm_cl = 0
!$omp threadprivate(iNgm_bt, iNgm_ma, iNgm_sd, &
!$omp iNgm_ta, iNgm_mc, iNgm_cl)
integer, public :: &
iNim_bt = 0, &
iNim_ma = 0, &
iNim_sd = 0, &
iNim_ta = 0, &
iNim_mc = 0, &
iNim_cl = 0
!$omp threadprivate(iNim_bt, iNim_ma, iNim_sd, iNim_ta, &
!$omp iNim_mc, iNim_cl)
integer, public :: &
iNcm_bt = 0, &
iNcm_ma = 0, &
iNcm_ta = 0, &
iNcm_mc = 0, &
iNcm_cl = 0, &
iNcm_act = 0
!$omp threadprivate(iNcm_bt, iNcm_ma, iNcm_ta, &
!$omp iNcm_mc, iNcm_cl, iNcm_act)
! Covariances between w, r_t, theta_l and KK microphysics tendencies.
! Additionally, covariances between r_r and N_r and KK rain drop mean
! volume radius. These are all calculated on thermodynamic grid levels.
integer, public :: &
iw_KK_evap_covar_zt = 0, & ! Covariance of w and KK evaporation tendency.
irt_KK_evap_covar_zt = 0, & ! Covariance of r_t and KK evaporation tendency.
ithl_KK_evap_covar_zt = 0, & ! Covariance of theta_l and KK evap. tendency.
iw_KK_auto_covar_zt = 0, & ! Covariance of w and KK autoconversion tendency.
irt_KK_auto_covar_zt = 0, & ! Covariance of r_t and KK autoconversion tendency.
ithl_KK_auto_covar_zt = 0, & ! Covariance of theta_l and KK autoconv. tendency.
iw_KK_accr_covar_zt = 0, & ! Covariance of w and KK accretion tendency.
irt_KK_accr_covar_zt = 0, & ! Covariance of r_t and KK accretion tendency.
ithl_KK_accr_covar_zt = 0, & ! Covariance of theta_l and KK accretion tendency.
irr_KK_mvr_covar_zt = 0, & ! Covariance of r_r and KK mean volume radius.
iNr_KK_mvr_covar_zt = 0, & ! Covariance of N_r and KK mean volume radius.
iKK_mvr_variance_zt = 0 ! Variance of KK rain drop mean volume radius.
!$omp threadprivate( iw_KK_evap_covar_zt, irt_KK_evap_covar_zt, &
!$omp ithl_KK_evap_covar_zt, iw_KK_auto_covar_zt, irt_KK_auto_covar_zt, &
!$omp ithl_KK_auto_covar_zt, iw_KK_accr_covar_zt, irt_KK_accr_covar_zt, &
!$omp ithl_KK_accr_covar_zt, irr_KK_mvr_covar_zt, iNr_KK_mvr_covar_zt, &
!$omp iKK_mvr_variance_zt )
! Wind budgets
integer, public :: &
ivm_bt = 0, &
ivm_ma = 0, &
ivm_ta = 0, &
ivm_gf = 0, &
ivm_cf = 0, &
ivm_f = 0, &
ivm_sdmp = 0, &
ivm_ndg = 0, &
ivm_mfl = 0
!$omp threadprivate(ivm_bt, ivm_ma, ivm_ta, ivm_gf, ivm_cf, ivm_f, &
!$omp ivm_sdmp, ivm_ndg, ivm_mfl)
integer, public :: &
ium_bt = 0, &
ium_ma = 0, &
ium_ta = 0, &
ium_gf = 0, &
ium_cf = 0, &
ium_f = 0, &
ium_sdmp = 0, &
ium_ndg = 0, &
ium_mfl = 0
!$omp threadprivate(ium_bt, ium_ma, ium_ta, ium_gf, ium_cf, ium_f, &
!$omp ium_sdmp, ium_ndg, ium_mfl)
! PDF parameters
integer, public :: &
imixt_frac = 0, &
iw_1 = 0, &
iw_2 = 0, &
ivarnce_w_1 = 0, &
ivarnce_w_2 = 0, &
ithl_1 = 0, &
ithl_2 = 0, &
ivarnce_thl_1 = 0, &
ivarnce_thl_2 = 0, &
irt_1 = 0, &
irt_2 = 0, &
ivarnce_rt_1 = 0, &
ivarnce_rt_2 = 0, &
irc_1 = 0, &
irc_2 = 0, &
irsatl_1 = 0, &
irsatl_2 = 0, &
icloud_frac_1 = 0, &
icloud_frac_2 = 0
!$omp threadprivate(imixt_frac, iw_1, iw_2, ivarnce_w_1, ivarnce_w_2, ithl_1, ithl_2, &
!$omp ivarnce_thl_1, ivarnce_thl_2, irt_1, irt_2, ivarnce_rt_1, ivarnce_rt_2, irc_1, irc_2, &
!$omp irsatl_1, irsatl_2, icloud_frac_1, icloud_frac_2 )
integer, public :: &
ichi_1 = 0, &
ichi_2 = 0, &
istdev_chi_1 = 0, &
istdev_chi_2 = 0, &
ichip2 = 0, &
istdev_eta_1 = 0, &
istdev_eta_2 = 0, &
icovar_chi_eta_1 = 0, &
icovar_chi_eta_2 = 0, &
icorr_w_chi_1 = 0, &
icorr_w_chi_2 = 0, &
icorr_w_eta_1 = 0, &
icorr_w_eta_2 = 0, &
icorr_chi_eta_1 = 0, &
icorr_chi_eta_2 = 0, &
icorr_w_rt_1 = 0, &
icorr_w_rt_2 = 0, &
icorr_w_thl_1 = 0, &
icorr_w_thl_2 = 0, &
icorr_rt_thl_1 = 0, &
icorr_rt_thl_2 = 0, &
icrt_1 = 0, &
icrt_2 = 0, &
icthl_1 = 0, &
icthl_2 = 0
!$omp threadprivate( ichi_1, ichi_2, istdev_chi_1, istdev_chi_2, ichip2, &
!$omp istdev_eta_1, istdev_eta_2, icovar_chi_eta_1, icovar_chi_eta_2, &
!$omp icorr_w_chi_1, icorr_w_chi_2, icorr_w_eta_1, icorr_w_eta_2, &
!$omp icorr_chi_eta_1, icorr_chi_eta_2, icorr_w_rt_1, icorr_w_rt_2, &
!$omp icorr_w_thl_1, icorr_w_thl_2, icorr_rt_thl_1, icorr_rt_thl_2, &
!$omp icrt_1, icrt_2, icthl_1, icthl_2 )
integer, public :: &
iF_w = 0, &
iF_rt = 0, &
iF_thl = 0, &
imin_F_w = 0, &
imax_F_w = 0, &
imin_F_rt = 0, &
imax_F_rt = 0, &
imin_F_thl = 0, &
imax_F_thl = 0
!$omp threadprivate( iF_w, iF_rt, iF_thl, imin_F_w, imax_F_w, imin_F_rt, &
!$omp imax_F_rt, imin_F_thl, imax_F_thl )
integer, public :: &
icoef_wprtp2_implicit = 0, &
iterm_wprtp2_explicit = 0, &
icoef_wpthlp2_implicit = 0, &
iterm_wpthlp2_explicit = 0, &
icoef_wprtpthlp_implicit = 0, &
iterm_wprtpthlp_explicit = 0, &
icoef_wp2rtp_implicit = 0, &
iterm_wp2rtp_explicit = 0, &
icoef_wp2thlp_implicit = 0, &
iterm_wp2thlp_explicit = 0
!$omp threadprivate( icoef_wprtp2_implicit, iterm_wprtp2_explicit, &
!$omp icoef_wpthlp2_implicit, iterm_wpthlp2_explicit, &
!$omp icoef_wprtpthlp_implicit, iterm_wprtpthlp_explicit, &
!$omp icoef_wp2rtp_implicit, iterm_wp2rtp_explicit, &
!$omp icoef_wp2thlp_implicit, iterm_wp2thlp_explicit )
integer, public :: &
iwp2_zt = 0, &
ithlp2_zt = 0, &
iwpthlp_zt = 0, &
iwprtp_zt = 0, &
irtp2_zt = 0, &
irtpthlp_zt = 0, &
iup2_zt = 0, &
ivp2_zt = 0, &
iupwp_zt = 0, &
ivpwp_zt = 0
!$omp threadprivate( iwp2_zt, ithlp2_zt, iwpthlp_zt, iwprtp_zt, irtp2_zt, &
!$omp irtpthlp_zt, iup2_zt, ivp2_zt, iupwp_zt, ivpwp_zt )
integer, dimension(:), allocatable, public :: &
iwp2hmp
!$omp threadprivate( iwp2hmp )
integer, dimension(:), allocatable, public :: &
ihydrometp2, &
iwphydrometp, &
irtphmp, &
ithlphmp
!$omp threadprivate( ihydrometp2, iwphydrometp, irtphmp, ithlphmp )
integer, dimension(:,:), allocatable, public :: &
ihmxphmyp
!$omp threadprivate( ihmxphmyp )
integer, dimension(:), allocatable, public :: &
ihmp2_zt
!$omp threadprivate( ihmp2_zt )
integer, public :: &
ichi = 0
!$omp threadprivate(ichi)
integer, target, allocatable, dimension(:), public :: &
isclrm, & ! Passive scalar mean (1)
isclrm_f ! Passive scalar forcing (1)
!$omp threadprivate(isclrm, isclrm_f)
! Used to calculate clear-sky radiative fluxes.
integer, public :: &
ifulwcl = 0, ifdlwcl = 0, ifdswcl = 0, ifuswcl = 0
!$omp threadprivate( ifulwcl, ifdlwcl, ifdswcl, ifuswcl )
integer, target, allocatable, dimension(:), public :: &
iedsclrm, & ! Eddy-diff. scalar term (1)
iedsclrm_f ! Eddy-diffusivity scalar forcing (1)
!$omp threadprivate(iedsclrm, iedsclrm_f)
integer, public :: &
ilh_thlm_mc = 0, & ! Latin hypercube estimate of thlm_mc
ilh_rvm_mc = 0, & ! Latin hypercube estimate of rvm_mc
ilh_rcm_mc = 0, & ! Latin hypercube estimate of rcm_mc
ilh_Ncm_mc = 0, & ! Latin hypercube estimate of Ncm_mc
ilh_rrm_mc = 0, & ! Latin hypercube estimate of rrm_mc
ilh_Nrm_mc = 0, & ! Latin hypercube estimate of Nrm_mc
ilh_rsm_mc = 0, & ! Latin hypercube estimate of rsm_mc
ilh_Nsm_mc = 0, & ! Latin hypercube estimate of Nsm_mc
ilh_rgm_mc = 0, & ! Latin hypercube estimate of rgm_mc
ilh_Ngm_mc = 0, & ! Latin hypercube estimate of Ngm_mc
ilh_rim_mc = 0, & ! Latin hypercube estimate of rim_mc
ilh_Nim_mc = 0 ! Latin hypercube estimate of Nim_mc
!$omp threadprivate( ilh_thlm_mc, ilh_rvm_mc, ilh_rcm_mc, ilh_Ncm_mc, &
!$omp ilh_rrm_mc, ilh_Nrm_mc, ilh_rsm_mc, ilh_Nsm_mc, &
!$omp ilh_rgm_mc, ilh_Ngm_mc, ilh_rim_mc, ilh_Nim_mc )
integer, public :: &
ilh_rrm_auto = 0, & ! Latin hypercube estimate of autoconversion
ilh_rrm_accr = 0, & ! Latin hypercube estimate of accretion
ilh_rrm_evap = 0, & ! Latin hypercube estimate of evaporation
ilh_Nrm_auto = 0, & ! Latin hypercube estimate of Nrm autoconversion
ilh_Nrm_evap = 0, & ! Latin hypercube estimate of Nrm evaporation
ilh_m_vol_rad_rain = 0, &
ilh_rrm_mc_nonadj = 0
!$omp threadprivate( ilh_rrm_auto, ilh_rrm_accr, ilh_rrm_evap, &
!$omp ilh_Nrm_auto, ilh_Nrm_evap, ilh_m_vol_rad_rain, &
!$omp ilh_rrm_mc_nonadj )
integer, public :: &
ilh_rrm_src_adj = 0, & ! Latin hypercube estimate of source adjustment (KK only!)
ilh_rrm_evap_adj = 0, & ! Latin hypercube estimate of evap adjustment (KK only!)
ilh_Nrm_src_adj = 0, & ! Latin hypercube estimate of Nrm source adjustmet (KK only!)
ilh_Nrm_evap_adj = 0 ! Latin hypercube estimate of Nrm evap adjustment (KK only!)
!$omp threadprivate( ilh_rrm_src_adj, ilh_rrm_evap_adj, ilh_Nrm_src_adj, &
!$omp ilh_Nrm_evap_adj )
integer, public :: &
ilh_Vrr = 0, & ! Latin hypercube estimate of rrm sedimentation velocity
ilh_VNr = 0 ! Latin hypercube estimate of Nrm sedimentation velocity
!$omp threadprivate(ilh_Vrr, ilh_VNr)
integer, public :: &
ilh_rrm = 0, &
ilh_Nrm = 0, &
ilh_rim = 0, &
ilh_Nim = 0, &
ilh_rsm = 0, &
ilh_Nsm = 0, &
ilh_rgm = 0, &
ilh_Ngm = 0, &
ilh_thlm = 0, &
ilh_rcm = 0, &
ilh_Ncm = 0, &
ilh_Ncnm = 0, &
ilh_rvm = 0, &
ilh_wm = 0, &
ilh_cloud_frac = 0, &
ilh_chi = 0, &
ilh_eta = 0, &
ilh_precip_frac = 0, &
ilh_mixt_frac = 0
!$omp threadprivate(ilh_rrm, ilh_Nrm, ilh_rim, ilh_Nim, ilh_rsm, ilh_Nsm, &
!$omp ilh_rgm, ilh_Ngm, &
!$omp ilh_thlm, ilh_rcm, ilh_Ncm, ilh_Ncnm, ilh_rvm, ilh_wm, ilh_cloud_frac, &
!$omp ilh_chi, ilh_eta, ilh_precip_frac, ilh_mixt_frac )
integer, public :: &
ilh_cloud_frac_unweighted = 0, &
ilh_precip_frac_unweighted = 0, &
ilh_mixt_frac_unweighted = 0
!$omp threadprivate( ilh_cloud_frac_unweighted, ilh_precip_frac_unweighted, &
!$omp ilh_mixt_frac_unweighted )
integer, public :: &
ilh_wp2_zt = 0, &
ilh_Nrp2_zt = 0, &
ilh_Ncnp2_zt = 0, &
ilh_Ncp2_zt = 0, &
ilh_rcp2_zt = 0, &
ilh_rtp2_zt = 0, &
ilh_thlp2_zt = 0, &
ilh_rrp2_zt = 0, &
ilh_chip2 = 0 ! Eric Raut
!$omp threadprivate( ilh_wp2_zt, ilh_Nrp2_zt, ilh_Ncnp2_zt, ilh_Ncp2_zt, &
!$omp ilh_rcp2_zt, ilh_rtp2_zt, ilh_thlp2_zt, ilh_rrp2_zt, ilh_chip2 )
! SILHS covariance estimate indicies
integer, public :: &
ilh_rtp2_mc = 0, &
ilh_thlp2_mc = 0, &
ilh_wprtp_mc = 0, &
ilh_wpthlp_mc = 0, &
ilh_rtpthlp_mc = 0
!$omp threadprivate( ilh_rtp2_mc, ilh_thlp2_mc, ilh_wprtp_mc, ilh_wpthlp_mc, ilh_rtpthlp_mc )
! Indices for Morrison budgets
integer, public :: &
iPSMLT = 0, &
iEVPMS = 0, &
iPRACS = 0, &
iEVPMG = 0, &
iPRACG = 0, &
iPGMLT = 0, &
iMNUCCC = 0, &
iPSACWS = 0, &
iPSACWI = 0, &
iQMULTS = 0, &
iQMULTG = 0, &
iPSACWG = 0, &
iPGSACW = 0, &
iPRD = 0, &
iPRCI = 0, &
iPRAI = 0, &
iQMULTR = 0, &
iQMULTRG = 0, &
iMNUCCD = 0, &
iPRACI = 0, &
iPRACIS = 0, &
iEPRD = 0, &
iMNUCCR = 0, &
iPIACR = 0, &
iPIACRS = 0, &
iPGRACS = 0, &
iPRDS = 0, &
iEPRDS = 0, &
iPSACR = 0, &
iPRDG = 0, &
iEPRDG = 0
!$omp threadprivate( iPSMLT, iEVPMS, iPRACS, iEVPMG, iPRACG, iPGMLT, iMNUCCC, iPSACWS, iPSACWI, &
!$omp iQMULTS, iQMULTG, iPSACWG, iPGSACW, iPRD, iPRCI, iPRAI, iQMULTR, &
!$omp iQMULTRG, iMNUCCD, iPRACI, iPRACIS, iEPRD, iMNUCCR, iPIACR, iPIACRS, &
!$omp iPGRACS, iPRDS, iEPRDS, iPSACR, iPRDG, iEPRDG )
! More indices for Morrison budgets!!
integer, public :: &
iNGSTEN = 0, &
iNRSTEN = 0, &
iNISTEN = 0, &
iNSSTEN = 0, &
iNCSTEN = 0, &
iNPRC1 = 0, &
iNRAGG = 0, &
iNPRACG = 0, &
iNSUBR = 0, &
iNSMLTR = 0, &
iNGMLTR = 0, &
iNPRACS = 0, &
iNNUCCR = 0, &
iNIACR = 0, &
iNIACRS = 0, &
iNGRACS = 0, &
iNSMLTS = 0, &
iNSAGG = 0, &
iNPRCI = 0, &
iNSCNG = 0, &
iNSUBS = 0, &
iPRC = 0, &
iPRA = 0, &
iPRE = 0
!$omp threadprivate( iNGSTEN, iNRSTEN, iNISTEN, iNSSTEN, iNCSTEN, iNPRC1, iNRAGG, &
!$omp iNPRACG, iNSUBR, iNSMLTR, iNGMLTR, iNPRACS, iNNUCCR, iNIACR, &
!$omp iNIACRS, iNGRACS, iNSMLTS, iNSAGG, iNPRCI, iNSCNG, iNSUBS, iPRC, iPRA, iPRE )
! More indices for Morrison budgets!!
integer, public :: &
iPCC = 0, &
iNNUCCC = 0, &
iNPSACWS = 0, &
iNPRA = 0, &
iNPRC = 0, &
iNPSACWI = 0, &
iNPSACWG = 0, &
iNPRAI = 0, &
iNMULTS = 0, &
iNMULTG = 0, &
iNMULTR = 0, &
iNMULTRG = 0, &
iNNUCCD = 0, &
iNSUBI = 0, &
iNGMLTG = 0, &
iNSUBG = 0, &
iNACT = 0
integer, public :: &
iSIZEFIX_NR = 0, &
iSIZEFIX_NC = 0, &
iSIZEFIX_NI = 0, &
iSIZEFIX_NS = 0, &
iSIZEFIX_NG = 0, &
iNEGFIX_NR = 0, &
iNEGFIX_NC = 0, &
iNEGFIX_NI = 0, &
iNEGFIX_NS = 0, &
iNEGFIX_NG = 0, &
iNIM_MORR_CL = 0, &
iQC_INST = 0, &
iQR_INST = 0, &
iQI_INST = 0, &
iQS_INST = 0, &
iQG_INST = 0, &
iNC_INST = 0, &
iNR_INST = 0, &
iNI_INST = 0, &
iNS_INST = 0, &
iNG_INST = 0, &
iT_in_K_mc = 0, &
ihl_on_Cp_residual = 0, &
iqto_residual = 0
!$omp threadprivate(iPCC, iNNUCCC, iNPSACWS, iNPRA, iNPRC, iNPSACWI, iNPSACWG, iNPRAI, &
!$omp iNMULTS, iNMULTG, iNMULTR, iNMULTRG, iNNUCCD, iNSUBI, iNGMLTG, iNSUBG, iNACT, &
!$omp iSIZEFIX_NR, iSIZEFIX_NC, iSIZEFIX_NI, iSIZEFIX_NS, iSIZEFIX_NG, iNEGFIX_NR, &
!$omp iNEGFIX_NC, iNEGFIX_NI, iNEGFIX_NS, iNEGFIX_NG, iNIM_MORR_CL, iQC_INST, iQR_INST, &
!$omp iQI_INST, iQS_INST, iQG_INST, iNC_INST, iNR_INST, iNI_INST, iNS_INST, &
!$omp iNG_INST, iT_in_K_mc, ihl_on_Cp_residual, iqto_residual )
! Indices for statistics in stats_zm file
integer, public :: &
iwp2 = 0, &
irtp2 = 0, &
ithlp2 = 0, &
irtpthlp = 0, &
iwprtp = 0, &
iwpthlp = 0, &
iwp4 = 0, &
iwpthvp = 0, &
irtpthvp = 0, &
ithlpthvp = 0, &
itau_zm = 0, &
iKh_zm = 0, &
iwprcp = 0, &
irc_coef_zm = 0, &
ithlprcp = 0, &
irtprcp = 0, &
ircp2 = 0, &