-
Notifications
You must be signed in to change notification settings - Fork 0
/
clubb_api_module.F90
4671 lines (3896 loc) · 222 KB
/
clubb_api_module.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$
!==================================================================================================
!
! ######## ### ### ### ######### ######### ### ######### ###########
! ### ### ### ### ### ### ### ### ### ### ### ### ### ###
! ### ### ### ### ### ### ### ### ### ### ### ### ###
! ### ### ### ### ######### ######### ########### ######### ###
! ### ### ### ### ### ### ### ### ### ### ### ###
! ### ### ### ### ### ### ### ### ### ### ### ### ###
! ######## ########## ######## ######### ######### ### ### ### ###########
!
! The CLUBB API serves as the doorway through which external models can interact with CLUBB.
!
! PLEASE REMEMBER, IF ANY CODE IS CHANGED IN THIS DOCUMENT,
! THE CHANGES MUST BE PROPOGATED TO ALL HOST MODELS.
!
module clubb_api_module
use mt95, only : &
assignment( = ), &
genrand_state, & ! Internal representation of the RNG state.
genrand_srepr, & ! Public representation of the RNG state. Should be used to save the RNG state
genrand_intg, &
genrand_init_api => genrand_init
use array_index, only : &
hydromet_list, &
hydromet_tol, & ! Tolerance values for all hydrometeors [units vary]
iiNg, & ! Hydrometeor array index for graupel concentration, Ng
iiNi, & ! Hydrometeor array index for ice concentration, Ni
iiNr, & ! Hydrometeor array index for rain drop concentration, Nr
iiNs, & ! Hydrometeor array index for snow concentration, Ns
iirg, & ! Hydrometeor array index for graupel mixing ratio, rg
iiri, & ! Hydrometeor array index for ice mixing ratio, ri
iirr, & ! Hydrometeor array index for rain water mixing ratio, rr
iirs, & ! Hydrometeor array index for snow mixing ratio, rs
iiPDF_chi, &
iiPDF_rr, &
iiPDF_w, &
iiPDF_Nr, &
iiPDF_ri, &
iiPDF_Ni, &
iiPDF_Ncn, &
iiPDF_rs, &
iiPDF_Ns, &
iiPDF_rg, &
iiPDF_Ng, &
iisclr_rt, &
iisclr_thl, &
iisclr_CO2, &
iiedsclr_rt, &
iiedsclr_thl, &
iiedsclr_CO2, &
l_frozen_hm, & ! if true, then the hydrometeor is frozen; otherwise liquid
l_mix_rat_hm ! if true, then the quantity is a hydrometeor mixing ratio
use clubb_precision, only : &
time_precision, &
core_rknd, &
stat_nknd, &
stat_rknd, &
dp ! Double Precision
use constants_clubb, only : &
cloud_frac_min, & ! Threshold for cloud fractions
cm3_per_m3, & ! Cubic centimeters per cubic meter
Cp, & ! Dry air specific heat at constant p [J/kg/K]
em_min, & ! Minimum value for em (turbulence kinetic energy)
ep, & ! ep = 0.622 [-]
fstderr, & ! Fortran file unit I/O constant
fstdout, & ! Fortran file unit I/O constant
grav, & ! Gravitational acceleration [m/s^2]
Ls, & ! Latent heat of sublimation [J/kg]
Lv, & ! Latent heat of vaporization [J/kg]
Lf, & ! Latent heat of fusion [J/kg]
pi, & ! The ratio of radii to their circumference
pi_dp, & ! pi in double precision
radians_per_deg_dp, &
Rd, & ! Dry air gas constant [J/kg/K]
Rv, & ! Water vapor gas constant [J/kg/K]
sec_per_day, & ! Seconds in a day.
sec_per_hr, & ! Seconds in an hour.
sec_per_min, & ! Seconds in a minute.
T_freeze_K, & ! Freezing point of water [K]
var_length, & ! Maximum variable name length in CLUBB GrADS or netCDF output
zero, & ! 0.0_core_rknd
zero_threshold, & ! Defining a threshold on a physical quantity to be 0.
! Tolerances
Nc_tol, & ! Tolerance value for N_c [#/kg]
Ng_tol, & ! Tolerance value for N_s [#/kg]
Ni_tol, & ! Tolerance value for N_i [#/kg]
Nr_tol, & ! Tolerance value for N_r [#/kg]
Ns_tol, & ! Tolerance value for N_s [#/kg]
rg_tol, & ! Tolerance value for r_g [kg/kg]
rho_lw, &
ri_tol, & ! Tolerance value for r_i [kg/kg]
rr_tol, & ! Tolerance value for r_r [kg/kg]
rs_tol, & ! Tolerance value for r_s [kg/kg]
rt_tol, & ! [kg/kg]
thl_tol, & ! [K]
w_tol_sqd, & ! [m^2/s^2]
num_hf_draw_points ! Neighboring points to use in hole filling algorithm
use corr_varnce_module, only : &
corr_array_n_cloud, & ! Variable(s)
corr_array_n_below, &
pdf_dim, &
hmp2_ip_on_hmm2_ip, &
Ncnp2_on_Ncnm2, &
hmp2_ip_on_hmm2_ip_slope_type, & ! Types
hmp2_ip_on_hmm2_ip_intrcpt_type
use error_code, only: &
clubb_at_least_debug_level, & ! Procedure
err_code, & ! Error Indicator
clubb_no_error, & ! Constants
clubb_fatal_error
use hydromet_pdf_parameter_module, only : &
hydromet_pdf_parameter, &
precipitation_fractions
use model_flags, only : &
clubb_config_flags_type, & ! Type
iiPDF_ADG1, &
iiPDF_new_hybrid, &
ipdf_pre_advance_fields, &
ipdf_post_advance_fields, &
l_use_boussinesq ! Use Boussinesq form of predictive equations (default is Anelastic).
use parameters_model, only : &
hydromet_dim ! Number of hydrometeor species
use parameters_tunable, only : &
params_list, & ! Variable(s)
nu_vertical_res_dep ! Type(s)
use parameter_indices, only: &
nparams, & ! Variable(s)
iC1, iC1b, iC1c, &
iC2rt, iC2thl, iC2rtthl, iC4, iC_uu_shr, iC_uu_buoy, &
iC6rt, iC6rtb, iC6rtc, iC6thl, iC6thlb, iC6thlc, &
iC7, iC7b, iC7c, iC8, iC8b, iC10, iC11, iC11b, iC11c, &
iC12, iC13, iC14, iC_wp3_pr_turb, iC_wp3_pr_dfsn, iC_wp2_splat, &
iC6rt_Lscale0, iC6thl_Lscale0, &
iC7_Lscale0, iwpxp_L_thresh, ic_K, ic_K1, inu1, &
ic_K2, inu2, ic_K6, inu6, ic_K8, inu8, ic_K9, inu9, &
inu10, ic_K_hm, ic_K_hmb, iK_hm_min_coef, inu_hm, &
islope_coef_spread_DG_means_w, ipdf_component_stdev_factor_w, &
icoef_spread_DG_means_rt, icoef_spread_DG_means_thl, &
ibeta, igamma_coef, igamma_coefb, igamma_coefc, ilmin_coef, &
iomicron, izeta_vrnce_rat, iupsilon_precip_frac_rat, &
ilambda0_stability_coef, imult_coef, itaumin, itaumax, imu, &
iLscale_mu_coef, iLscale_pert_coef, ialpha_corr, iSkw_denom_coef, &
ic_K10, ic_K10h, ithlp2_rad_coef, ithlp2_rad_cloud_frac_thresh, &
iup2_sfc_coef, iSkw_max_mag, iC_invrs_tau_bkgnd, &
iC_invrs_tau_sfc, iC_invrs_tau_shear, iC_invrs_tau_N2, &
iC_invrs_tau_N2_wp2, iC_invrs_tau_N2_xp2, iC_invrs_tau_N2_wpxp, &
iC_invrs_tau_N2_clear_wp3, ialtitude_threshold, irtp2_clip_coef, &
iRichardson_num_min, iRichardson_num_max, iwpxp_Ri_exp, &
ia3_coef_min, ia_const, iCx_min, iCx_max, ibv_efold, iz_displace, &
iC_wp2_pr_dfsn, ixp3_coef_slope, ixp3_coef_base, iC_wp3_pr_tp, &
iC_invrs_tau_wpxp_N2_thresh, iC_invrs_tau_wpxp_Ri
use pdf_parameter_module, only : &
! The CLUBB_CAM preprocessor directives are being commented out because this
! code is now also used for WRF-CLUBB.
!#ifdef CLUBB_CAM /* Code for storing pdf_parameter structs in pbuf as array */
num_pdf_params, &
!#endif
pdf_parameter, &
implicit_coefs_terms
use sponge_layer_damping, only : &
thlm_sponge_damp_settings, & ! Variable(s)
rtm_sponge_damp_settings, &
uv_sponge_damp_settings, &
wp2_sponge_damp_settings, &
wp3_sponge_damp_settings, &
up2_vp2_sponge_damp_settings, &
thlm_sponge_damp_profile, &
rtm_sponge_damp_profile, &
uv_sponge_damp_profile, &
wp2_sponge_damp_profile, &
wp3_sponge_damp_profile, &
up2_vp2_sponge_damp_profile
use stat_file_module, only : &
clubb_i, & ! Used to output multiple columns
clubb_j ! The indices must not exceed nlon (for i) or nlat (for j).
use stats_rad_zm_module, only : &
nvarmax_rad_zm ! Maximum variables allowed
use stats_rad_zt_module, only : &
nvarmax_rad_zt ! Maximum variables allowed
use stats_zm_module, only : &
nvarmax_zm ! Maximum variables allowed
use stats_zt_module, only : &
nvarmax_zt ! Maximum variables allowed
use stats_sfc_module, only : &
nvarmax_sfc
use stats_variables, only: &
stats_metadata_type
use grid_class, only: grid ! Type
use grid_class, only: &
! Interpolate momentum level variables to thermodynamic levels
zm2zt_api => zm2zt, &
! Interpolate thermodynamic level variables to momentum levels
zt2zm_api => zt2zm
use saturation, only: &
! Used to compute the saturation mixing ratio of liquid water.
sat_mixrat_liq_api => sat_mixrat_liq
use T_in_K_module, only : &
! Calculates absolute temperature from liquid water potential
! temperature. (Does not include ice.)
thlm2T_in_K_api => thlm2T_in_K, &
! Calculates liquid water potential temperature from absolute temperature
T_in_K2thlm_api => T_in_K2thlm
use advance_clubb_core_module, only: &
setup_clubb_core_api => setup_clubb_core
use fill_holes, only : &
fill_holes_driver_api => fill_holes_driver
use stats_rad_zm_module, only : &
stats_init_rad_zm_api => stats_init_rad_zm
use stats_rad_zt_module, only : &
stats_init_rad_zt_api => stats_init_rad_zt
use stats_zm_module, only : &
stats_init_zm_api => stats_init_zm
use stats_zt_module, only : &
stats_init_zt_api => stats_init_zt
use stats_sfc_module, only : &
stats_init_sfc_api => stats_init_sfc
use stats_clubb_utilities, only : &
stats_begin_timestep_api => stats_begin_timestep
use stats_type, only: stats ! Type
implicit none
private
public &
! To Implement CLUBB:
set_default_parameters_api, & ! Procedure(s)
read_parameters_api, &
setup_clubb_core_api, &
! CLUBB can be set more specifically using these flags:
iiPDF_ADG1, &
iiPDF_new_hybrid, &
ipdf_pre_advance_fields, &
ipdf_post_advance_fields, &
l_use_boussinesq, &
! The parameters of CLUBB can be retrieved and tuned using these indices:
iC1, iC1b, iC1c, &
iC2rt, iC2thl, iC2rtthl, iC4, iC_uu_shr, iC_uu_buoy, &
iC6rt, iC6rtb, iC6rtc, iC6thl, iC6thlb, iC6thlc, &
iC7, iC7b, iC7c, iC8, iC8b, iC10, iC11, iC11b, iC11c, &
iC12, iC13, iC14, iC_wp3_pr_turb, iC_wp3_pr_dfsn, iC_wp2_splat, &
iC6rt_Lscale0, iC6thl_Lscale0, &
iC7_Lscale0, iwpxp_L_thresh, ic_K, ic_K1, inu1, &
ic_K2, inu2, ic_K6, inu6, ic_K8, inu8, ic_K9, inu9, &
inu10, ic_K_hm, ic_K_hmb, iK_hm_min_coef, inu_hm, &
islope_coef_spread_DG_means_w, ipdf_component_stdev_factor_w, &
icoef_spread_DG_means_rt, icoef_spread_DG_means_thl, &
ibeta, igamma_coef, igamma_coefb, igamma_coefc, ilmin_coef, &
iomicron, izeta_vrnce_rat, iupsilon_precip_frac_rat, &
ilambda0_stability_coef, imult_coef, itaumin, itaumax, imu, &
iLscale_mu_coef, iLscale_pert_coef, ialpha_corr, iSkw_denom_coef, &
ic_K10, ic_K10h, ithlp2_rad_coef, ithlp2_rad_cloud_frac_thresh, &
iup2_sfc_coef, iSkw_max_mag, iC_invrs_tau_bkgnd, &
iC_invrs_tau_sfc, iC_invrs_tau_shear, iC_invrs_tau_N2, &
iC_invrs_tau_N2_wp2, iC_invrs_tau_N2_xp2, iC_invrs_tau_N2_wpxp, &
iC_invrs_tau_N2_clear_wp3, ialtitude_threshold, irtp2_clip_coef, &
iRichardson_num_min, iRichardson_num_max, iwpxp_Ri_exp, &
ia3_coef_min, ia_const, iCx_min, iCx_max, ibv_efold, iz_displace, &
iC_wp2_pr_dfsn, ixp3_coef_slope, ixp3_coef_base, iC_wp3_pr_tp, &
iC_invrs_tau_wpxp_N2_thresh, iC_invrs_tau_wpxp_Ri
public &
advance_clubb_core_api, &
advance_clubb_core_api_single_col, &
advance_clubb_core_api_multi_col, &
pdf_parameter, &
implicit_coefs_terms, &
! A hydromet array is required, and these variables are required for a hydromet array:
hydromet_list, &
hydromet_tol, &
hydromet_dim, &
iiNg, &
iiNi, &
iiNr, &
iiNs, &
iirg, &
iiri, &
iirr, &
iirs, &
iisclr_rt, &
iisclr_thl, &
iisclr_CO2, &
iiedsclr_rt, &
iiedsclr_thl, &
iiedsclr_CO2, &
l_frozen_hm, &
l_mix_rat_hm, &
cleanup_clubb_core_api
public &
! To Implement SILHS:
setup_corr_varnce_array_api, &
setup_pdf_parameters_api, &
hydromet_pdf_parameter, &
init_pdf_hydromet_arrays_api, &
! generate_silhs_sample - SILHS API
genrand_init_api, & ! if you are doing restarts)
genrand_state, &
genrand_srepr, &
genrand_intg, &
! To use the results, you will need these variables:
corr_array_n_cloud, &
corr_array_n_below, &
pdf_dim, &
iiPDF_chi, &
iiPDF_rr, &
iiPDF_w, &
iiPDF_Nr, &
iiPDF_ri, &
iiPDF_Ni, &
iiPDF_Ncn, &
iiPDF_rs, &
iiPDF_Ns, &
iiPDF_rg, &
iiPDF_Ng, &
hmp2_ip_on_hmm2_ip, &
Ncnp2_on_Ncnm2, &
hmp2_ip_on_hmm2_ip_slope_type, & ! Types
hmp2_ip_on_hmm2_ip_intrcpt_type, &
grid, &
stats
public &
! To Interact With CLUBB's Grid:
! For Varying Grids
setup_grid_heights_api, & ! if heights vary with time
setup_grid_api
public &
! To Obtain More Output from CLUBB for Diagnostics:
stats_begin_timestep_api, &
stats_end_timestep_api, &
stats_finalize_api, &
stats_init_api
public :: &
calculate_thlp2_rad_api, params_list, &
update_xp2_mc_api, sat_mixrat_liq_api
public :: &
! To Convert Between Common CLUBB-related quantities:
lin_interpolate_two_points_api, & ! OR
lin_interpolate_on_grid_api, &
T_in_K2thlm_api, &
thlm2T_in_K_api, &
zm2zt_api, &
zt2zm_api
public &
! To Check For and Handle CLUBB's Errors:
calculate_spurious_source_api, &
clubb_at_least_debug_level_api, &
clubb_fatal_error, &
clubb_no_error, &
fill_holes_driver_api, & ! OR
fill_holes_vertical_api, &
fill_holes_hydromet_api, &
set_clubb_debug_level_api, &
vertical_integral_api, &
num_hf_draw_points
public &
! Constants That May be Helpful:
cloud_frac_min, &
cm3_per_m3, &
core_rknd, &
Cp, &
dp, &
em_min, &
ep, &
fstderr, &
fstdout, &
grav, &
Lf, &
Ls, &
Lv, &
pi_dp, &
pi, &
radians_per_deg_dp, &
Rd, &
Rv, &
sec_per_day, &
sec_per_hr, &
sec_per_min, &
T_freeze_K, &
time_precision, &
var_length, &
zero_threshold, &
zero, &
! Tolerances
Nc_tol, &
Ng_tol, &
Ni_tol, &
Nr_tol, &
Ns_tol, &
rg_tol, &
rho_lw, &
ri_tol, &
rr_tol, &
rs_tol, &
rt_tol, &
thl_tol, &
w_tol_sqd
public &
! Attempt to Not Use the Following:
! The CLUBB_CAM preprocessor directives are being commented out because this
! code is now also used for WRF-CLUBB.
!#ifdef CLUBB_CAM /* Code for storing pdf_parameter structs in pbuf as array */
pack_pdf_params_api, &
unpack_pdf_params_api, &
num_pdf_params, &
!#endif
init_pdf_params_api, &
init_precip_fracs_api, &
precipitation_fractions, &
init_pdf_implicit_coefs_terms_api, &
adj_low_res_nu_api, &
assignment( = ), &
clubb_i, &
clubb_j, &
compute_current_date_api, &
gregorian2julian_day_api, &
leap_year_api, &
nvarmax_rad_zm, &
nvarmax_rad_zt, &
nvarmax_sfc, &
nvarmax_zm, &
nvarmax_zt
public &
nparams, &
nu_vertical_res_dep, &
setup_parameters_api, &
stat_nknd, &
stat_rknd, &
stats_accumulate_hydromet_api, &
stats_init_rad_zm_api, &
stats_init_rad_zt_api, &
stats_init_sfc_api, &
stats_init_zm_api, &
stats_init_zt_api, &
stats_metadata_type
public &
! Needed to use the configurable CLUBB flags
clubb_config_flags_type, &
set_default_clubb_config_flags_api, &
initialize_clubb_config_flags_type_api, &
print_clubb_config_flags_api
public &
thlm_sponge_damp_settings, & ! Variable(s)
rtm_sponge_damp_settings, &
uv_sponge_damp_settings, &
wp2_sponge_damp_settings, &
wp3_sponge_damp_settings, &
up2_vp2_sponge_damp_settings, &
thlm_sponge_damp_profile, &
rtm_sponge_damp_profile, &
uv_sponge_damp_profile, &
wp2_sponge_damp_profile, &
wp3_sponge_damp_profile, &
up2_vp2_sponge_damp_profile, &
initialize_tau_sponge_damp_api, & ! Procedure(s)
finalize_tau_sponge_damp_api
public &
copy_single_pdf_params_to_multi, &
copy_multi_pdf_params_to_single
interface setup_pdf_parameters_api
module procedure setup_pdf_parameters_api_single_col
module procedure setup_pdf_parameters_api_multi_col
end interface
interface advance_clubb_core_api
module procedure advance_clubb_core_api_single_col
module procedure advance_clubb_core_api_multi_col
end interface
interface setup_grid_api
module procedure setup_grid_api_single_col
module procedure setup_grid_api_multi_col
end interface
interface setup_parameters_api
module procedure setup_parameters_api_single_col
module procedure setup_parameters_api_multi_col
end interface
interface adj_low_res_nu_api
module procedure adj_low_res_nu_api_single_col
module procedure adj_low_res_nu_api_multi_col
end interface
interface setup_grid_heights_api
module procedure setup_grid_heights_api_single_col
module procedure setup_grid_heights_api_multi_col
end interface
interface update_xp2_mc_api
module procedure update_xp2_mc_api_single_col
module procedure update_xp2_mc_api_multi_col
end interface
contains
!================================================================================================
! advance_clubb_core - Advances the model one timestep.
!================================================================================================
subroutine advance_clubb_core_api_single_col( gr, &
l_implemented, dt, fcor, sfc_elevation, hydromet_dim, & ! intent(in)
thlm_forcing, rtm_forcing, um_forcing, vm_forcing, & ! intent(in)
sclrm_forcing, edsclrm_forcing, wprtp_forcing, & ! intent(in)
wpthlp_forcing, rtp2_forcing, thlp2_forcing, & ! intent(in)
rtpthlp_forcing, wm_zm, wm_zt, & ! intent(in)
wpthlp_sfc, wprtp_sfc, upwp_sfc, vpwp_sfc, & ! intent(in)
wpsclrp_sfc, wpedsclrp_sfc, & ! intent(in)
upwp_sfc_pert, vpwp_sfc_pert, & ! intent(in)
rtm_ref, thlm_ref, um_ref, vm_ref, ug, vg, & ! Intent(in)
p_in_Pa, rho_zm, rho, exner, & ! intent(in)
rho_ds_zm, rho_ds_zt, invrs_rho_ds_zm, & ! intent(in)
invrs_rho_ds_zt, thv_ds_zm, thv_ds_zt, hydromet, & ! intent(in)
rfrzm, radf, & ! intent(in)
#ifdef CLUBBND_CAM
varmu, & ! intent(in)
#endif
wphydrometp, wp2hmp, rtphmp, thlphmp, & ! intent(in)
host_dx, host_dy, & ! intent(in)
clubb_params, nu_vert_res_dep, lmin, & ! intent(in)
clubb_config_flags, & ! intent(in)
stats_metadata, & ! intent(in)
stats_zt, stats_zm, stats_sfc, & ! intent(inout)
um, vm, upwp, vpwp, up2, vp2, up3, vp3, & ! intent(inout)
thlm, rtm, wprtp, wpthlp, & ! intent(inout)
wp2, wp3, rtp2, rtp3, thlp2, thlp3, rtpthlp, & ! intent(inout)
sclrm, &
#ifdef GFDL
sclrm_trsport_only, & ! h1g, 2010-06-16 ! intent(inout)
#endif
sclrp2, sclrp3, sclrprtp, sclrpthlp, & ! intent(inout)
wpsclrp, edsclrm, err_code_api, & ! intent(inout)
rcm, cloud_frac, & ! intent(inout)
wpthvp, wp2thvp, rtpthvp, thlpthvp, & ! intent(inout)
sclrpthvp, & ! intent(inout)
wp2rtp, wp2thlp, uprcp, vprcp, rc_coef, wp4, & ! intent(inout)
wpup2, wpvp2, wp2up2, wp2vp2, ice_supersat_frac, & ! intent(inout)
um_pert, vm_pert, upwp_pert, vpwp_pert, & ! intent(inout)
pdf_params, pdf_params_zm, & ! intent(inout)
pdf_implicit_coefs_terms, & ! intent(inout)
#ifdef GFDL
RH_crit, & !h1g, 2010-06-16 ! intent(inout)
do_liquid_only_in_clubb, & ! intent(in)
#endif
Kh_zm, Kh_zt, & ! intent(out)
#ifdef CLUBB_CAM
qclvar, & ! intent(out)
#endif
thlprcp, wprcp, w_up_in_cloud, w_down_in_cloud, & ! intent(out)
cloudy_updraft_frac, cloudy_downdraft_frac, & ! intent(out)
rcm_in_layer, cloud_cover, invrs_tau_zm ) ! intent(out)
use advance_clubb_core_module, only : advance_clubb_core
use pdf_parameter_module, only: &
implicit_coefs_terms ! Variable Type(s)
use parameters_model, only: &
sclr_dim, & ! Variable(s)
edsclr_dim
use model_flags, only: &
clubb_config_flags_type
use stats_zm_module, only: &
stats_init_zm ! Procedure(s)
use stats_zt_module, only: &
stats_init_zt
use stats_sfc_module, only: &
stats_init_sfc ! Procedure(s)
implicit none
!------------------------- Input Variables -------------------------
type(grid), target, intent(in) :: gr
logical, intent(in) :: &
l_implemented ! Is this part of a larger host model (T/F) ?
real( kind = core_rknd ), intent(in) :: &
dt ! Current timestep duration [s]
real( kind = core_rknd ), intent(in) :: &
fcor, & ! Coriolis forcing [s^-1]
sfc_elevation ! Elevation of ground level [m AMSL]
integer, intent(in) :: &
hydromet_dim ! Total number of hydrometeors [#]
! Input Variables
real( kind = core_rknd ), intent(in), dimension(gr%nz) :: &
thlm_forcing, & ! theta_l forcing (thermodynamic levels) [K/s]
rtm_forcing, & ! r_t forcing (thermodynamic levels) [(kg/kg)/s]
um_forcing, & ! u wind forcing (thermodynamic levels) [m/s/s]
vm_forcing, & ! v wind forcing (thermodynamic levels) [m/s/s]
wprtp_forcing, & ! <w'r_t'> forcing (momentum levels) [m*K/s^2]
wpthlp_forcing, & ! <w'th_l'> forcing (momentum levels) [m*(kg/kg)/s^2]
rtp2_forcing, & ! <r_t'^2> forcing (momentum levels) [(kg/kg)^2/s]
thlp2_forcing, & ! <th_l'^2> forcing (momentum levels) [K^2/s]
rtpthlp_forcing, & ! <r_t'th_l'> forcing (momentum levels) [K*(kg/kg)/s]
wm_zm, & ! w mean wind component on momentum levels [m/s]
wm_zt, & ! w mean wind component on thermo. levels [m/s]
rho_zm, & ! Air density on momentum levels [kg/m^3]
rho, & ! Air density on thermodynamic levels [kg/m^3]
rho_ds_zm, & ! Dry, static density on momentum levels [kg/m^3]
rho_ds_zt, & ! Dry, static density on thermo. levels [kg/m^3]
invrs_rho_ds_zm, & ! Inv. dry, static density @ momentum levs. [m^3/kg]
invrs_rho_ds_zt, & ! Inv. dry, static density @ thermo. levs. [m^3/kg]
thv_ds_zm, & ! Dry, base-state theta_v on momentum levs. [K]
thv_ds_zt, & ! Dry, base-state theta_v on thermo. levs. [K]
rfrzm ! Total ice-phase water mixing ratio [kg/kg]
real( kind = core_rknd ), dimension(gr%nz,hydromet_dim), intent(in) :: &
hydromet ! Collection of hydrometeors [units vary]
real( kind = core_rknd ), dimension(gr%nz), intent(in) :: &
radf ! Buoyancy production at the CL top due to LW radiative cooling [m^2/s^3]
#ifdef CLUBBND_CAM
real( kind = core_rknd ), intent(in) :: &
varmu
#endif
real( kind = core_rknd ), dimension(gr%nz, hydromet_dim), intent(in) :: &
wphydrometp, & ! Covariance of w and a hydrometeor [(m/s) <hm units>]
wp2hmp, & ! Third moment: <w'^2> * <hydro.'> [(m/s)^2 <hm units>]
rtphmp, & ! Covariance of rt and a hydrometeor [(kg/kg) <hm units>]
thlphmp ! Covariance of thl and a hydrometeor [K <hm units>]
real( kind = core_rknd ), intent(in) :: &
wpthlp_sfc, & ! w' theta_l' at surface [(m K)/s]
wprtp_sfc, & ! w' r_t' at surface [(kg m)/( kg s)]
upwp_sfc, & ! u'w' at surface [m^2/s^2]
vpwp_sfc ! v'w' at surface [m^2/s^2]
! Passive scalar variables
real( kind = core_rknd ), intent(in), dimension(gr%nz,sclr_dim) :: &
sclrm_forcing ! Passive scalar forcing [{units vary}/s]
real( kind = core_rknd ), intent(in), dimension(sclr_dim) :: &
wpsclrp_sfc ! Scalar flux at surface [{units vary} m/s]
real( kind = core_rknd ), intent(in) :: &
upwp_sfc_pert, & ! pertubed u'w' at surface [m^2/s^2]
vpwp_sfc_pert ! pertubed v'w' at surface [m^2/s^2]
! Eddy passive scalar variables
real( kind = core_rknd ), intent(in), dimension(gr%nz,edsclr_dim) :: &
edsclrm_forcing ! Eddy passive scalar forcing [{units vary}/s]
real( kind = core_rknd ), intent(in), dimension(edsclr_dim) :: &
wpedsclrp_sfc ! Eddy-Scalar flux at surface [{units vary} m/s]
! Reference profiles (used for nudging, sponge damping, and Coriolis effect)
real( kind = core_rknd ), dimension(gr%nz), intent(in) :: &
rtm_ref, & ! Initial total water mixing ratio [kg/kg]
thlm_ref, & ! Initial liquid water potential temperature [K]
um_ref, & ! Initial u wind; Michael Falk [m/s]
vm_ref, & ! Initial v wind; Michael Falk [m/s]
ug, & ! u geostrophic wind [m/s]
vg ! v geostrophic wind [m/s]
! Host model horizontal grid spacing, if part of host model.
real( kind = core_rknd ), intent(in) :: &
host_dx, & ! East-West horizontal grid spacing [m]
host_dy ! North-South horizontal grid spacing [m]
real( kind = core_rknd ), dimension(nparams), intent(in) :: &
clubb_params ! Array of CLUBB's tunable parameters [units vary]
type(nu_vertical_res_dep), intent(in) :: &
nu_vert_res_dep ! Vertical resolution dependent nu values
real( kind = core_rknd ), intent(in) :: &
lmin ! Min. value for the length scale [m]
type( clubb_config_flags_type ), intent(in) :: &
clubb_config_flags ! Derived type holding all configurable CLUBB flags
type (stats_metadata_type), intent(in) :: &
stats_metadata
!------------------------- Input/Output Variables -------------------------
type(stats), target, intent(inout) :: &
stats_zt, &
stats_zm, &
stats_sfc
! These are prognostic or are planned to be in the future
real( kind = core_rknd ), intent(inout), dimension(gr%nz) :: &
um, & ! u mean wind component (thermodynamic levels) [m/s]
upwp, & ! u'w' (momentum levels) [m^2/s^2]
vm, & ! v mean wind component (thermodynamic levels) [m/s]
vpwp, & ! v'w' (momentum levels) [m^2/s^2]
up2, & ! u'^2 (momentum levels) [m^2/s^2]
vp2, & ! v'^2 (momentum levels) [m^2/s^2]
up3, & ! u'^3 (thermodynamic levels) [m^3/s^3]
vp3, & ! v'^3 (thermodynamic levels) [m^3/s^3]
rtm, & ! total water mixing ratio, r_t (thermo. levels) [kg/kg]
wprtp, & ! w' r_t' (momentum levels) [(kg/kg) m/s]
thlm, & ! liq. water pot. temp., th_l (thermo. levels) [K]
wpthlp, & ! w' th_l' (momentum levels) [(m/s) K]
rtp2, & ! r_t'^2 (momentum levels) [(kg/kg)^2]
rtp3, & ! r_t'^3 (thermodynamic levels) [(kg/kg)^3]
thlp2, & ! th_l'^2 (momentum levels) [K^2]
thlp3, & ! th_l'^3 (thermodynamic levels) [K^3]
rtpthlp, & ! r_t' th_l' (momentum levels) [(kg/kg) K]
wp2, & ! w'^2 (momentum levels) [m^2/s^2]
wp3 ! w'^3 (thermodynamic levels) [m^3/s^3]
! Passive scalar variables
real( kind = core_rknd ), intent(inout), dimension(gr%nz,sclr_dim) :: &
sclrm, & ! Passive scalar mean (thermo. levels) [units vary]
wpsclrp, & ! w'sclr' (momentum levels) [{units vary} m/s]
sclrp2, & ! sclr'^2 (momentum levels) [{units vary}^2]
sclrp3, & ! sclr'^3 (thermodynamic levels) [{units vary}^3]
sclrprtp, & ! sclr'rt' (momentum levels) [{units vary} (kg/kg)]
sclrpthlp ! sclr'thl' (momentum levels) [{units vary} K]
real( kind = core_rknd ), intent(inout), dimension(gr%nz) :: &
p_in_Pa, & ! Air pressure (thermodynamic levels) [Pa]
exner ! Exner function (thermodynamic levels) [-]
real( kind = core_rknd ), intent(inout), dimension(gr%nz) :: &
rcm, & ! cloud water mixing ratio, r_c (thermo. levels) [kg/kg]
cloud_frac, & ! cloud fraction (thermodynamic levels) [-]
wpthvp, & ! < w' th_v' > (momentum levels) [kg/kg K]
wp2thvp, & ! < w'^2 th_v' > (thermodynamic levels) [m^2/s^2 K]
rtpthvp, & ! < r_t' th_v' > (momentum levels) [kg/kg K]
thlpthvp ! < th_l' th_v' > (momentum levels) [K^2]
real( kind = core_rknd ), intent(inout), dimension(gr%nz,sclr_dim) :: &
sclrpthvp ! < sclr' th_v' > (momentum levels) [units vary]
real( kind = core_rknd ), intent(inout), dimension(gr%nz) :: &
wp2rtp, & ! w'^2 rt' (thermodynamic levels) [m^2/s^2 kg/kg]
wp2thlp, & ! w'^2 thl' (thermodynamic levels) [m^2/s^2 K]
uprcp, & ! < u' r_c' > (momentum levels) [(m/s)(kg/kg)]
vprcp, & ! < v' r_c' > (momentum levels) [(m/s)(kg/kg)]
rc_coef, & ! Coef of X'r_c' in Eq. (34) (t-levs.) [K/(kg/kg)]
wp4, & ! w'^4 (momentum levels) [m^4/s^4]
wpup2, & ! w'u'^2 (thermodynamic levels) [m^3/s^3]
wpvp2, & ! w'v'^2 (thermodynamic levels) [m^3/s^3]
wp2up2, & ! w'^2 u'^2 (momentum levels) [m^4/s^4]
wp2vp2, & ! w'^2 v'^2 (momentum levels) [m^4/s^4]
ice_supersat_frac ! ice cloud fraction (thermo. levels) [-]
! Variables used to track perturbed version of winds.
real( kind = core_rknd ), intent(inout), dimension(gr%nz) :: &
um_pert, & ! perturbed <u> [m/s]
vm_pert, & ! perturbed <v> [m/s]
upwp_pert, & ! perturbed <u'w'> [m^2/s^2]
vpwp_pert ! perturbed <v'w'> [m^2/s^2]
type(pdf_parameter), intent(inout) :: &
pdf_params, & ! PDF parameters (thermodynamic levels) [units vary]
pdf_params_zm ! PDF parameters on momentum levels [units vary]
type(implicit_coefs_terms), intent(inout) :: &
pdf_implicit_coefs_terms ! Implicit coefs / explicit terms [units vary]
#ifdef GFDL
real( kind = core_rknd ), intent(inout), dimension(gr%nz,sclr_dim) :: & ! h1g, 2010-06-16
sclrm_trsport_only ! Passive scalar concentration due to pure transport [{units vary}/s]
#endif
real( kind = core_rknd ), intent(inout), dimension(gr%nz,edsclr_dim) :: &
edsclrm ! Eddy passive scalar mean (thermo. levels) [units vary]
!------------------------- Output Variables -------------------------
real( kind = core_rknd ), intent(out), dimension(gr%nz) :: &
rcm_in_layer, & ! rcm in cloud layer [kg/kg]
cloud_cover ! cloud cover [-]
! Variables that need to be output for use in host models
real( kind = core_rknd ), intent(out), dimension(gr%nz) :: &
wprcp, & ! w'r_c' (momentum levels) [(kg/kg) m/s]
w_up_in_cloud, & ! Average cloudy updraft velocity [m/s]
w_down_in_cloud, & ! Average cloudy downdraft velocity [m/s]
cloudy_updraft_frac, & ! cloudy updraft fraction [-]
cloudy_downdraft_frac, & ! cloudy downdraft fraction [-]
invrs_tau_zm ! One divided by tau on zm levels [1/s]
real( kind = core_rknd ), dimension(gr%nz), intent(out) :: &
Kh_zt, & ! Eddy diffusivity coefficient on thermodynamic levels [m^2/s]
Kh_zm ! Eddy diffusivity coefficient on momentum levels [m^2/s]
#ifdef CLUBB_CAM
real( kind = core_rknd), intent(out), dimension(gr%nz) :: &
qclvar ! cloud water variance
#endif
real( kind = core_rknd ), dimension(gr%nz), intent(out) :: &
thlprcp ! thl'rc' [K kg/kg]
!!! Output Variable
integer, intent(inout) :: err_code_api ! Diagnostic, for if some calculation goes amiss.
#ifdef GFDL
! hlg, 2010-06-16
real( kind = core_rknd ), intent(inOUT), dimension(gr%nz, min(1,sclr_dim) , 2) :: &
RH_crit ! critical relative humidity for droplet and ice nucleation
logical, intent(in) :: do_liquid_only_in_clubb
#endif
!------------------------- Local Variables -------------------------
type(stats), dimension(1) :: &
stats_zt_col, &
stats_zm_col, &
stats_sfc_col
real( kind = core_rknd ), dimension(1) :: &
fcor_col, & ! Coriolis forcing [s^-1]
sfc_elevation_col ! Elevation of ground level [m AMSL]
! Input Variables
real( kind = core_rknd ), dimension(1,gr%nz) :: &
thlm_forcing_col, & ! theta_l forcing (thermodynamic levels) [K/s]
rtm_forcing_col, & ! r_t forcing (thermodynamic levels) [(kg/kg)/s]
um_forcing_col, & ! u wind forcing (thermodynamic levels) [m/s/s]
vm_forcing_col, & ! v wind forcing (thermodynamic levels) [m/s/s]
wprtp_forcing_col, & ! <w'r_t'> forcing (momentum levels) [m*K/s^2]
wpthlp_forcing_col, & ! <w'th_l'> forcing (momentum levels) [m*(kg/kg)/s^2]
rtp2_forcing_col, & ! <r_t'^2> forcing (momentum levels) [(kg/kg)^2/s]
thlp2_forcing_col, & ! <th_l'^2> forcing (momentum levels) [K^2/s]
rtpthlp_forcing_col, & ! <r_t'th_l'> forcing (momentum levels) [K*(kg/kg)/s]
wm_zm_col, & ! w mean wind component on momentum levels [m/s]
wm_zt_col, & ! w mean wind component on thermo. levels [m/s]
rho_zm_col, & ! Air density on momentum levels [kg/m^3]
rho_col, & ! Air density on thermodynamic levels [kg/m^3]
rho_ds_zm_col, & ! Dry, static density on momentum levels [kg/m^3]
rho_ds_zt_col, & ! Dry, static density on thermo. levels [kg/m^3]
invrs_rho_ds_zm_col, & ! Inv. dry, static density @ momentum levs. [m^3/kg]
invrs_rho_ds_zt_col, & ! Inv. dry, static density @ thermo. levs. [m^3/kg]
thv_ds_zm_col, & ! Dry, base-state theta_v on momentum levs. [K]
thv_ds_zt_col, & ! Dry, base-state theta_v on thermo. levs. [K]
rfrzm_col ! Total ice-phase water mixing ratio [kg/kg]
real( kind = core_rknd ), dimension(1,gr%nz,hydromet_dim) :: &
hydromet_col ! Collection of hydrometeors [units vary]
real( kind = core_rknd ), dimension(1,gr%nz) :: &
radf_col ! Buoyancy production at the CL top due to LW radiative cooling [m^2/s^3]
#ifdef CLUBBND_CAM
real( kind = core_rknd ), dimension(1) :: &
varmu_col
#endif
real( kind = core_rknd ), dimension(1,gr%nz, hydromet_dim) :: &
wphydrometp_col, & ! Covariance of w and a hydrometeor [(m/s) <hm units>]
wp2hmp_col, & ! Third moment: <w'^2> * <hydro.'> [(m/s)^2 <hm units>]
rtphmp_col, & ! Covariance of rt and a hydrometeor [(kg/kg) <hm units>]
thlphmp_col ! Covariance of thl and a hydrometeor [K <hm units>]
real( kind = core_rknd ), dimension(1) :: &
wpthlp_sfc_col, & ! w' theta_l' at surface [(m K)/s]
wprtp_sfc_col, & ! w' r_t' at surface [(kg m)/( kg s)]
upwp_sfc_col, & ! u'w' at surface [m^2/s^2]
vpwp_sfc_col ! v'w' at surface [m^2/s^2]
! Passive scalar variables
real( kind = core_rknd ), dimension(1,gr%nz,sclr_dim) :: &
sclrm_forcing_col ! Passive scalar forcing [{units vary}/s]
real( kind = core_rknd ), dimension(1,sclr_dim) :: &
wpsclrp_sfc_col ! Scalar flux at surface [{units vary} m/s]
! Eddy passive scalar variables
real( kind = core_rknd ), dimension(1,gr%nz,edsclr_dim) :: &
edsclrm_forcing_col ! Eddy passive scalar forcing [{units vary}/s]
real( kind = core_rknd ), dimension(1) :: &
upwp_sfc_pert_col, & ! pertubed u'w' at surface [m^2/s^2]
vpwp_sfc_pert_col ! pertubed v'w' at surface [m^2/s^2]
real( kind = core_rknd ), dimension(1,edsclr_dim) :: &
wpedsclrp_sfc_col ! Eddy-Scalar flux at surface [{units vary} m/s]
! Reference profiles (used for nudging, sponge damping, and Coriolis effect)
real( kind = core_rknd ), dimension(1,gr%nz) :: &
rtm_ref_col, & ! Initial total water mixing ratio [kg/kg]
thlm_ref_col, & ! Initial liquid water potential temperature [K]
um_ref_col, & ! Initial u wind; Michael Falk [m/s]
vm_ref_col, & ! Initial v wind; Michael Falk [m/s]
ug_col, & ! u geostrophic wind [m/s]
vg_col ! v geostrophic wind [m/s]
! Host model horizontal grid spacing, if part of host model.
real( kind = core_rknd ), dimension(1) :: &
host_dx_col, & ! East-West horizontal grid spacing [m]
host_dy_col ! North-South horizontal grid spacing [m]
! These are prognostic or are planned to be in the future
real( kind = core_rknd ), dimension(1,gr%nz) :: &
um_col, & ! u mean wind component (thermodynamic levels) [m/s]
upwp_col, & ! u'w' (momentum levels) [m^2/s^2]
vm_col, & ! v mean wind component (thermodynamic levels) [m/s]
vpwp_col, & ! v'w' (momentum levels) [m^2/s^2]
up2_col, & ! u'^2 (momentum levels) [m^2/s^2]
vp2_col, & ! v'^2 (momentum levels) [m^2/s^2]
up3_col, & ! u'^3 (thermodynamic levels) [m^3/s^3]
vp3_col, & ! v'^3 (thermodynamic levels) [m^3/s^3]
rtm_col, & ! total water mixing ratio, r_t (thermo. levels) [kg/kg]
wprtp_col, & ! w' r_t' (momentum levels) [(kg/kg) m/s]
thlm_col, & ! liq. water pot. temp., th_l (thermo. levels) [K]
wpthlp_col, & ! w' th_l' (momentum levels) [(m/s) K]
rtp2_col, & ! r_t'^2 (momentum levels) [(kg/kg)^2]
rtp3_col, & ! r_t'^3 (thermodynamic levels) [(kg/kg)^3]
thlp2_col, & ! th_l'^2 (momentum levels) [K^2]
thlp3_col, & ! th_l'^3 (thermodynamic levels) [K^3]
rtpthlp_col, & ! r_t' th_l' (momentum levels) [(kg/kg) K]
wp2_col, & ! w'^2 (momentum levels) [m^2/s^2]
wp3_col ! w'^3 (thermodynamic levels) [m^3/s^3]
! Passive scalar variables
real( kind = core_rknd ), dimension(1,gr%nz,sclr_dim) :: &
sclrm_col, & ! Passive scalar mean (thermo. levels) [units vary]
wpsclrp_col, & ! w'sclr' (momentum levels) [{units vary} m/s]
sclrp2_col, & ! sclr'^2 (momentum levels) [{units vary}^2]
sclrp3_col, & ! sclr'^3 (thermodynamic levels) [{units vary}^3]
sclrprtp_col, & ! sclr'rt' (momentum levels) [{units vary} (kg/kg)]
sclrpthlp_col ! sclr'thl' (momentum levels) [{units vary} K]
real( kind = core_rknd ), dimension(1,gr%nz) :: &
p_in_Pa_col, & ! Air pressure (thermodynamic levels) [Pa]
exner_col ! Exner function (thermodynamic levels) [-]
real( kind = core_rknd ), dimension(1,gr%nz) :: &
rcm_col, & ! cloud water mixing ratio, r_c (thermo. levels) [kg/kg]
cloud_frac_col, & ! cloud fraction (thermodynamic levels) [-]
wpthvp_col, & ! < w' th_v' > (momentum levels) [kg/kg K]
wp2thvp_col, & ! < w'^2 th_v' > (thermodynamic levels) [m^2/s^2 K]
rtpthvp_col, & ! < r_t' th_v' > (momentum levels) [kg/kg K]
thlpthvp_col ! < th_l' th_v' > (momentum levels) [K^2]
real( kind = core_rknd ), dimension(1,gr%nz,sclr_dim) :: &
sclrpthvp_col ! < sclr' th_v' > (momentum levels) [units vary]
real( kind = core_rknd ), dimension(1,gr%nz) :: &
wp2rtp_col, & ! w'^2 rt' (thermodynamic levels) [m^2/s^2 kg/kg]
wp2thlp_col, & ! w'^2 thl' (thermodynamic levels) [m^2/s^2 K]
uprcp_col, & ! < u' r_c' > (momentum levels) [(m/s)(kg/kg)]
vprcp_col, & ! < v' r_c' > (momentum levels) [(m/s)(kg/kg)]