-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathstats_lh_zt_module.F90
700 lines (549 loc) · 24.5 KB
/
stats_lh_zt_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
!-----------------------------------------------------------------------
! $Id$
!===============================================================================
module stats_lh_zt_module
implicit none
private ! Default Scope
public :: stats_init_lh_zt
! Constant parameters
integer, parameter, public :: nvarmax_lh_zt = 100 ! Maximum variables allowed
contains
!-----------------------------------------------------------------------
subroutine stats_init_lh_zt( vars_lh_zt, l_error )
! Description:
! Initializes array indices for stats_zt
! Note:
! All code that is within subroutine stats_init_zt, including variable
! allocation code, is not called if l_stats is false. This subroutine is
! called only when l_stats is true.
!-----------------------------------------------------------------------
use constants_clubb, only: &
fstderr ! Constant(s)
use stats_variables, only: &
stats_lh_zt ! Variable
use stats_variables, only: &
iAKm, & ! Variable(s)
ilh_AKm, &
iAKstd, &
iAKstd_cld, &
iAKm_rcm, &
iAKm_rcc
use stats_variables, only: &
ilh_thlm_mc, & ! Variable(s)
ilh_rvm_mc, &
ilh_rcm_mc, &
ilh_Ncm_mc, &
ilh_rrm_mc, &
ilh_Nrm_mc, &
ilh_rsm_mc, &
ilh_Nsm_mc, &
ilh_rgm_mc, &
ilh_Ngm_mc, &
ilh_rim_mc, &
ilh_Nim_mc, &
ilh_Vrr, &
ilh_VNr, &
ilh_rcm_avg
use stats_variables, only: &
ilh_rrm, & ! Variable(s)
ilh_Nrm, &
ilh_rim, &
ilh_Nim, &
ilh_rsm, &
ilh_Nsm, &
ilh_rgm, &
ilh_Ngm, &
ilh_thlm, &
ilh_rcm, &
ilh_Ncm, &
ilh_Ncnm, &
ilh_rvm, &
ilh_wm, &
ilh_wp2_zt, &
ilh_rcp2_zt, &
ilh_rtp2_zt, &
ilh_thlp2_zt, &
ilh_rrp2_zt, &
ilh_Nrp2_zt, &
ilh_Ncp2_zt, &
ilh_Ncnp2_zt, &
ilh_cloud_frac, &
ilh_chi, &
ilh_eta, &
ilh_chip2, &
ilh_rrm_auto, &
ilh_rrm_accr, &
ilh_rrm_evap, &
ilh_Nrm_auto, &
ilh_Nrm_evap
use stats_variables, only: &
ilh_cloud_frac_unweighted, &
ilh_precip_frac_unweighted,&
ilh_mixt_frac_unweighted
use stats_variables, only: &
ilh_rrm_src_adj, & ! Variable(s)
ilh_rrm_evap_adj, &
ilh_Nrm_src_adj, &
ilh_Nrm_evap_adj, &
ilh_rrm_mc_nonadj
use stats_variables, only: &
ilh_precip_frac, &
ilh_mixt_frac, &
ilh_m_vol_rad_rain
use stats_variables, only: &
isilhs_variance_category, & ! Variable
ilh_samp_frac_category
use stats_type_utilities, only: &
stat_assign ! Procedure
implicit none
! External
intrinsic :: trim
! Local Constants
integer, parameter :: &
silhs_num_importance_categories = 8
! Input Variable
character(len= * ), dimension(nvarmax_lh_zt), intent(in) :: vars_lh_zt
! Input / Output Variable
logical, intent(inout) :: l_error
! Local Varables
integer :: i, k, tot_loops, icategory
character( len = 1 ) :: category_num_as_string
! ---- Begin Code ----
! Default initialization for array indices for stats_lh_zt is zero (see module
! stats_variables)
allocate( isilhs_variance_category(silhs_num_importance_categories), &
ilh_samp_frac_category(silhs_num_importance_categories) )
isilhs_variance_category(:) = 0
ilh_samp_frac_category(:) = 0
! Assign pointers for statistics variables stats_zt
tot_loops = stats_lh_zt%num_output_fields
if ( any( vars_lh_zt == "silhs_variance_category" ) ) then
! Correct for number of variables found under "silhs_variance_category".
! Subtract 1 from the loop size for each SILHS importance category.
tot_loops = tot_loops - silhs_num_importance_categories
! Add 1 for "silhs_variance_category" to the loop size.
tot_loops = tot_loops + 1
end if
if ( any( vars_lh_zt == "lh_samp_frac_category" ) ) then
! Correct for number of variables found under "lh_samp_frac_category".
! Subtract 1 from the loop size for each SILHS importance category.
tot_loops = tot_loops - silhs_num_importance_categories
! Add 1 for "lh_samp_frac_category" to the loop size.
tot_loops = tot_loops + 1
end if
k = 1
do i = 1, tot_loops
select case ( trim( vars_lh_zt(i) ) )
case ( 'AKm' ) ! Vince Larson 22 May 2005
iAKm = k
call stat_assign( var_index=iAKm, var_name="AKm", &
var_description="Analytic Kessler ac [kg/kg]", var_units="kg/kg", l_silhs=.true., &
grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_AKm' ) ! Vince Larson 22 May 2005
ilh_AKm = k
call stat_assign( var_index=ilh_AKm, var_name="lh_AKm", &
var_description="LH Kessler estimate [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'AKstd' )
iAKstd = k
call stat_assign( var_index=iAKstd, var_name="AKstd", &
var_description="Exact standard deviation of gba Kessler [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'AKstd_cld' )
iAKstd_cld = k
call stat_assign( var_index=iAKstd_cld, var_name="AKstd_cld", &
var_description="Exact w/in cloud std of gba Kessler [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'AKm_rcm' )
iAKm_rcm = k
call stat_assign( var_index=iAKm_rcm, var_name="AKm_rcm", &
var_description="Exact local gba auto based on rcm [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'AKm_rcc' )
iAKm_rcc = k
call stat_assign( var_index=iAKm_rcc, var_name="AKm_rcc", &
var_description="Exact local gba based on w/in cloud rc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rvm_mc' )
ilh_rvm_mc = k
call stat_assign( var_index=ilh_rvm_mc, var_name="lh_rvm_mc", &
var_description="Latin hypercube estimate of rvm_mc [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_thlm_mc' )
ilh_thlm_mc = k
call stat_assign( var_index=ilh_thlm_mc, var_name="lh_thlm_mc", &
var_description="Latin hypercube estimate of thlm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rcm_mc' )
ilh_rcm_mc = k
call stat_assign( var_index=ilh_rcm_mc, var_name="lh_rcm_mc", &
var_description="Latin hypercube estimate of rcm_mc [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ncm_mc' )
ilh_Ncm_mc = k
call stat_assign( var_index=ilh_Ncm_mc, var_name="lh_Ncm_mc", &
var_description="Latin hypercube estimate of Ncm_mc [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_mc' )
ilh_rrm_mc = k
call stat_assign( var_index=ilh_rrm_mc, var_name="lh_rrm_mc", &
var_description="Latin hypercube estimate of rrm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm_mc' )
ilh_Nrm_mc = k
call stat_assign( var_index=ilh_Nrm_mc, var_name="lh_Nrm_mc", &
var_description="Latin hypercube estimate of Nrm_mc [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case('lh_rsm_mc')
ilh_rsm_mc = k
call stat_assign( var_index=ilh_rsm_mc, var_name="lh_rsm_mc", &
var_description="Latin hypercube estimate of rsm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nsm_mc' )
ilh_Nsm_mc = k
call stat_assign( var_index=ilh_Nsm_mc, var_name="lh_Nsm_mc", &
var_description="Latin hypercube estimate of Nsm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rgm_mc' )
ilh_rgm_mc = k
call stat_assign( var_index=ilh_rgm_mc, var_name="lh_rgm_mc", &
var_description="Latin hypercube estimate of rgm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ngm_mc' )
ilh_Ngm_mc = k
call stat_assign( var_index=ilh_Ngm_mc, var_name="lh_Ngm_mc", &
var_description="Latin hypercube estimate of Ngm_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rim_mc' )
ilh_rim_mc = k
call stat_assign( var_index=ilh_rim_mc, var_name="lh_rim_mc", &
var_description="Latin hypercube estimate of rim_mc [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nim_mc' )
ilh_Nim_mc = k
call stat_assign( var_index=ilh_Nim_mc, var_name="lh_Nim_mc", &
var_description="Latin hypercube estimate of Nim_mc [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Vrr' )
ilh_Vrr = k
call stat_assign( var_index=ilh_Vrr, var_name="lh_Vrr", &
var_description="Latin hypercube estimate of rrm sedimentation velocity [m/s]", &
var_units="m/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_VNr' )
ilh_VNr = k
call stat_assign( var_index=ilh_VNr, var_name="lh_VNr", &
var_description="Latin hypercube estimate of Nrm sedimentation velocity [m/s]", &
var_units="m/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rcm_avg' )
ilh_rcm_avg = k
call stat_assign( var_index=ilh_rcm_avg, var_name="lh_rcm_avg", &
var_description="Latin hypercube average estimate of rcm [kg/kg]", &
var_units="kg/kg", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm' )
ilh_rrm = k
call stat_assign( var_index=ilh_rrm, var_name="lh_rrm", &
var_description="Latin hypercube estimate of rrm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm' )
ilh_Nrm = k
call stat_assign( var_index=ilh_Nrm, var_name="lh_Nrm", &
var_description="Latin hypercube estimate of Nrm [count/kg]", var_units="count/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rim' )
ilh_rim = k
call stat_assign( var_index=ilh_rim, var_name="lh_rim", &
var_description="Latin hypercube estimate of rim [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nim' )
ilh_Nim = k
call stat_assign( var_index=ilh_Nim, var_name="lh_Nim", &
var_description="Latin hypercube estimate of Nim [count/kg]", var_units="count/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rsm' )
ilh_rsm = k
call stat_assign( var_index=ilh_rsm, var_name="lh_rsm", &
var_description="Latin hypercube estimate of rsm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nsm' )
ilh_Nsm = k
call stat_assign( var_index=ilh_Nsm, var_name="lh_Nsm", &
var_description="Latin hypercube estimate of Nsm [count/kg]", &
var_units="count/kg", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rgm' )
ilh_rgm = k
call stat_assign( var_index=ilh_rgm, var_name="lh_rgm", &
var_description="Latin hypercube estimate of rgm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ngm' )
ilh_Ngm = k
call stat_assign( var_index=ilh_Ngm, var_name="lh_Ngm", &
var_description="Latin hypercube estimate of Ngm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_thlm' )
ilh_thlm = k
call stat_assign( var_index=ilh_thlm, var_name="lh_thlm", &
var_description="Latin hypercube estimate of thlm [K]", var_units="K", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rcm' )
ilh_rcm = k
call stat_assign( var_index=ilh_rcm, var_name="lh_rcm", &
var_description="Latin hypercube estimate of rcm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ncm' )
ilh_Ncm = k
call stat_assign( var_index=ilh_Ncm, var_name="lh_Ncm", &
var_description="Latin hypercube estimate of Ncm [count/kg]", var_units="count/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ncnm' )
ilh_Ncnm = k
call stat_assign( var_index=ilh_Ncnm, var_name="lh_Ncnm", &
var_description="Latin hypercube estimate of Ncnm [count/kg]", var_units="count/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rvm' )
ilh_rvm = k
call stat_assign( var_index=ilh_rvm, var_name="lh_rvm", &
var_description="Latin hypercube estimate of rvm [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_wm' )
ilh_wm = k
call stat_assign( var_index=ilh_wm, var_name="lh_wm", &
var_description="Latin hypercube estimate of vertical velocity [m/s]", &
var_units="m/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_cloud_frac' )
ilh_cloud_frac = k
! Note: count is the udunits compatible unit
call stat_assign( var_index=ilh_cloud_frac, var_name="lh_cloud_frac", &
var_description="Latin hypercube estimate of cloud fraction [count]", &
var_units="count", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_cloud_frac_unweighted' )
ilh_cloud_frac_unweighted = k
call stat_assign( var_index=ilh_cloud_frac_unweighted, &
var_name="lh_cloud_frac_unweighted", var_description="Unweighted fraction of &
&silhs sample points that are in cloud [-]", var_units="-", l_silhs=.false., &
grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_chi' )
ilh_chi = k
call stat_assign( var_index=ilh_chi, var_name="lh_chi", &
var_description="Latin hypercube estimate of Mellor's s (extended liq) [kg/kg]", &
var_units="kg/kg", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_eta' )
ilh_eta = k
call stat_assign( var_index=ilh_eta, var_name="lh_eta", &
var_description="Latin hypercube estimate of Mellor's t [kg/kg]", var_units="kg/kg", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_chip2' )
ilh_chip2 = k
call stat_assign( var_index=ilh_chip2, var_name="lh_chip2", &
var_description="Latin hypercube estimate of variance of chi(s) [kg/kg]", &
var_units="kg/kg", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_wp2_zt' )
ilh_wp2_zt = k
call stat_assign( var_index=ilh_wp2_zt, var_name="lh_wp2_zt", &
var_description="Variance of the latin hypercube estimate of w [m^2/s^2]", &
var_units="m^2/s^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ncnp2_zt' )
ilh_Ncnp2_zt = k
call stat_assign( var_index=ilh_Ncnp2_zt, var_name="lh_Ncnp2_zt", &
var_description="Variance of the latin hypercube estimate of Ncn [count^2/kg^2]", &
var_units="count^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Ncp2_zt' )
ilh_Ncp2_zt = k
call stat_assign( var_index=ilh_Ncp2_zt, var_name="lh_Ncp2_zt", &
var_description="Variance of the latin hypercube estimate of Nc [count^2/kg^2]", &
var_units="count^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrp2_zt' )
ilh_Nrp2_zt = k
call stat_assign( var_index=ilh_Nrp2_zt, var_name="lh_Nrp2_zt", &
var_description="Variance of the latin hypercube estimate of Nr [count^2/kg^2]", &
var_units="count^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rcp2_zt' )
ilh_rcp2_zt = k
call stat_assign( var_index=ilh_rcp2_zt, var_name="lh_rcp2_zt", &
var_description="Variance of the latin hypercube estimate of rc [kg^2/kg^2]", &
var_units="kg^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rtp2_zt' )
ilh_rtp2_zt = k
call stat_assign( var_index=ilh_rtp2_zt, var_name="lh_rtp2_zt", &
var_description="Variance of the latin hypercube estimate of rt [kg^2/kg^2]", &
var_units="kg^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_thlp2_zt' )
ilh_thlp2_zt = k
call stat_assign( var_index=ilh_thlp2_zt, var_name="lh_thlp2_zt", &
var_description="Variance of the latin hypercube estimate of thl [K^2]", &
var_units="K^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrp2_zt' )
ilh_rrp2_zt = k
call stat_assign( var_index=ilh_rrp2_zt, var_name="lh_rrp2_zt", &
var_description="Variance of the latin hypercube estimate of rr [kg^2/kg^2]", &
var_units="kg^2/kg^2", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_auto' )
ilh_rrm_auto = k
call stat_assign( var_index=ilh_rrm_auto, var_name="lh_rrm_auto", &
var_description="Latin hypercube estimate of autoconversion [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_accr' )
ilh_rrm_accr = k
call stat_assign( var_index=ilh_rrm_accr, var_name="lh_rrm_accr", &
var_description="Latin hypercube estimate of accretion [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_evap' )
ilh_rrm_evap = k
call stat_assign( var_index=ilh_rrm_evap, var_name="lh_rrm_evap", &
var_description="Latin hypercube estimate of evaporation [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm_auto' )
ilh_Nrm_auto = k
call stat_assign( var_index=ilh_Nrm_auto, var_name="lh_Nrm_auto", &
var_description="Latin hypercube estimate of Nrm autoconversion [num/kg/s]", &
var_units="num/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm_evap' )
ilh_Nrm_evap = k
call stat_assign( var_index=ilh_Nrm_evap, var_name="lh_Nrm_evap", &
var_description="Latin hypercube estimate of Nrm evaporation [num/kg/s]", &
var_units="num/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_src_adj' )
ilh_rrm_src_adj = k
call stat_assign( var_index=ilh_rrm_src_adj, var_name="lh_rrm_src_adj", &
var_description="Latin hypercube estimate of source adjustment (KK only!) [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_evap_adj' )
ilh_rrm_evap_adj = k
call stat_assign( var_index=ilh_rrm_evap_adj, var_name="lh_rrm_evap_adj", &
var_description="Latin hypercube estimate of evap adjustment (KK only!) [kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm_src_adj' )
ilh_Nrm_src_adj = k
call stat_assign( var_index=ilh_Nrm_src_adj, var_name="lh_Nrm_src_adj", &
var_description="Latin hypercube estimate of Nrm source adjustment (KK only!) &
&[kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_Nrm_evap_adj' )
ilh_Nrm_evap_adj = k
call stat_assign( var_index=ilh_Nrm_evap_adj, var_name="lh_Nrm_evap_adj", &
var_description="Latin hypercube estimate of Nrm evap adjustment (KK only!) &
&[kg/kg/s]", &
var_units="kg/kg/s", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_precip_frac' )
ilh_precip_frac = k
call stat_assign( var_index=ilh_precip_frac, var_name="lh_precip_frac", &
var_description="Latin hypercube estimate of precipitation fraction [-]", &
var_units="-", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_precip_frac_unweighted' )
ilh_precip_frac_unweighted = k
call stat_assign( var_index=ilh_precip_frac_unweighted, &
var_name="lh_precip_frac_unweighted", &
var_description="Unweighted fraction of sample points in precipitation [-]", &
var_units="-", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_mixt_frac' )
ilh_mixt_frac = k
call stat_assign( var_index=ilh_mixt_frac, var_name="lh_mixt_frac", &
var_description="Latin hypercube estimate of mixture fraction (weight of 1st PDF &
&component [-]", &
var_units="-", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_mixt_frac_unweighted' )
ilh_mixt_frac_unweighted = k
call stat_assign( var_index=ilh_mixt_frac_unweighted, var_name="lh_mixt_frac_unweighted", &
var_description="Unweighted fraction of sample points in first PDF component [-]", &
var_units="-", l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_m_vol_rad_rain' )
ilh_m_vol_rad_rain = k
call stat_assign( var_index=ilh_m_vol_rad_rain, var_name="lh_m_vol_rad_rain", &
var_description="SILHS est. of rain radius", var_units="m", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'lh_rrm_mc_nonadj' )
ilh_rrm_mc_nonadj = k
call stat_assign( var_index=ilh_rrm_mc_nonadj, var_name="lh_rrm_mc_nonadj", &
var_description="SILHS est. of rrm_mc_nonadj [kg/kg/s]", var_units="kg/kg/s", &
l_silhs=.true., grid_kind=stats_lh_zt )
k = k + 1
case ( 'silhs_variance_category' )
do icategory=1, silhs_num_importance_categories
isilhs_variance_category(icategory) = k
write(category_num_as_string,'(I1)') icategory
call stat_assign( var_index=isilhs_variance_category(icategory), &
var_name="silhs_var_cat_"//category_num_as_string, &
var_description="Variance of SILHS variable in importance category " // &
category_num_as_string, var_units="various", l_silhs=.false., grid_kind=stats_lh_zt )
k = k + 1
end do
case ( 'lh_samp_frac_category' )
do icategory=1, silhs_num_importance_categories
ilh_samp_frac_category(icategory) = k
write(category_num_as_string,'(I1)') icategory
call stat_assign( var_index=ilh_samp_frac_category(icategory), &
var_name="lh_samp_frac_"//category_num_as_string, &
var_description="Number of samples in importance category " // &
category_num_as_string // " [-]", var_units="-", l_silhs=.false., &
grid_kind=stats_lh_zt )
k = k + 1
end do
case default
write(fstderr,*) 'Error: unrecognized variable in vars_lh_zt: ', trim( vars_lh_zt(i) )
l_error = .true. ! This will stop the run.
end select
end do ! i = 1, stats_lh_zt%num_output_fields
return
end subroutine stats_init_lh_zt
end module stats_lh_zt_module