-
Notifications
You must be signed in to change notification settings - Fork 11
/
GFS_typedefs.F90
3982 lines (3617 loc) · 210 KB
/
GFS_typedefs.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
module GFS_typedefs
use machine, only: kind_phys, kind_evod
use module_radsw_parameters, only: topfsw_type, sfcfsw_type
use module_radlw_parameters, only: topflw_type, sfcflw_type
use ozne_def, only: levozp, oz_coeff
use h2o_def, only: levh2o, h2o_coeff
use gfdl_cld_mp_mod, only: rhow
#ifdef USE_COSP
use cosp2_test, only: Ncolumns
use mod_cosp_config, only: Nlvgrid, ntau, npres, nhgt, &
SR_BINS, PARASOL_NREFL, &
cloudsat_DBZE_BINS, &
numMODISReffLiqBins, &
numMODISReffIceBins, &
CFODD_NDBZE, CFODD_NICOD
#endif
implicit none
!--- version of physics
character(len=64) :: version = 'v2017 OPERATIONAL GFS PHYSICS'
!--- parameter constants used for default initializations
real(kind=kind_phys), parameter :: zero = 0.0_kind_phys
real(kind=kind_phys), parameter :: huge = 9.9999D15
real(kind=kind_phys), parameter :: clear_val = zero
!real(kind=kind_phys), parameter :: clear_val = -9.9999e80
real(kind=kind_phys), parameter :: rann_init = 0.6_kind_phys
real(kind=kind_phys), parameter :: cn_one = 1._kind_phys
real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys
real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys
real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys
!----------------
! Data Containers
!----------------
! !--- GFS external initialization type
! GFS_init_type
! !--- GFS Derived Data Types (DDTs)
! GFS_statein_type !< prognostic state data in from dycore
! GFS_stateout_type !< prognostic state or tendencies return to dycore
! GFS_sfcprop_type !< surface fields
! GFS_coupling_type !< fields to/from coupling with other components (e.g. land/ice/ocean/etc.)
! !---GFS specific containers
! GFS_control_type !< model control parameters
! GFS_grid_type !< grid and interpolation related data
! GFS_tbd_type !< to be determined data that doesn't fit in any one container
! GFS_clprop_type !< cloud fields needed by radiation from physics
! GFS_radtend_type !< radiation tendencies needed in physics
! GFS_diag_type !< fields targetted for diagnostic output
!--------------------------------------------------------------------------------
! GFS_init_type
!--------------------------------------------------------------------------------
! This container is the minimum set of data required from the dycore/atmosphere
! component to allow proper initialization of the GFS physics
!--------------------------------------------------------------------------------
type GFS_init_type
integer :: me !< my MPI-rank
integer :: master !< master MPI-rank
integer :: tile_num !< tile number for this MPI rank
integer :: isc !< starting i-index for this MPI-domain
integer :: jsc !< starting j-index for this MPI-domain
integer :: nx !< number of points in i-dir for this MPI rank
integer :: ny !< number of points in j-dir for this MPI rank
integer :: levs !< number of vertical levels
integer :: cnx !< number of points in i-dir for this cubed-sphere face
!< equal to gnx for lat-lon grids
integer :: cny !< number of points in j-dir for this cubed-sphere face
!< equal to gny for lat-lon grids
integer :: gnx !< number of global points in x-dir (i) along the equator
integer :: gny !< number of global points in y-dir (j) along any meridian
integer :: nlunit !< fortran unit number for file opens
integer :: logunit !< fortran unit number for writing logfile
integer :: bdat(8) !< model begin date in GFS format (same as idat)
integer :: cdat(8) !< model current date in GFS format (same as jdat)
integer :: iau_offset !< iau running window length
real(kind=kind_phys) :: dt_dycore !< dynamics time step in seconds
real(kind=kind_phys) :: dt_phys !< physics time step in seconds
!--- blocking data
integer, pointer :: blksz(:) !< for explicit data blocking
!< default blksz(1)=[nx*ny]
!--- ak/bk for pressure level calculations
real(kind=kind_phys), pointer :: ak(:) !< from surface (k=1) to TOA (k=levs)
real(kind=kind_phys), pointer :: bk(:) !< from surface (k=1) to TOA (k=levs)
!--- grid metrics
real(kind=kind_phys), pointer :: xlon(:,:) !< column longitude for MPI rank
real(kind=kind_phys), pointer :: xlat(:,:) !< column latitude for MPI rank
real(kind=kind_phys), pointer :: area(:,:) !< column area for length scale calculations
character(len=32), pointer :: tracer_names(:) !< tracers names to dereference tracer id
!< based on name location in array
character(len=65) :: fn_nml !< namelist filename
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
end type GFS_init_type
!----------------------------------------------------------------
! GFS_statein_type
! prognostic state variables with layer and level specific data
!----------------------------------------------------------------
type GFS_statein_type
!--- level geopotential and pressures
real (kind=kind_phys), pointer :: phii (:,:) => null() !< interface geopotential height
real (kind=kind_phys), pointer :: prsi (:,:) => null() !< model level pressure in Pa
real (kind=kind_phys), pointer :: prsik (:,:) => null() !< Exner function at interface
!--- layer geopotential and pressures
real (kind=kind_phys), pointer :: phil (:,:) => null() !< layer geopotential height
real (kind=kind_phys), pointer :: prsl (:,:) => null() !< model layer mean pressure Pa
real (kind=kind_phys), pointer :: prslk (:,:) => null() !< exner function = (p/p0)**rocp
!--- prognostic variables
real (kind=kind_phys), pointer :: pgr (:) => null() !< surface pressure (Pa) real
real (kind=kind_phys), pointer :: ugrs (:,:) => null() !< u component of layer wind
real (kind=kind_phys), pointer :: vgrs (:,:) => null() !< v component of layer wind
real (kind=kind_phys), pointer :: vvl (:,:) => null() !< layer mean vertical velocity in pa/sec
real (kind=kind_phys), pointer :: tgrs (:,:) => null() !< model layer mean temperature in k
real (kind=kind_phys), pointer :: qgrs (:,:,:) => null() !< layer mean tracer concentration
! dissipation estimate
real (kind=kind_phys), pointer :: diss_est(:,:) => null() !< model layer mean temperature in k
! soil state variables - for soil SPPT - sfc-perts, mgehne
real (kind=kind_phys), pointer :: smc (:,:) => null() !< soil moisture content
real (kind=kind_phys), pointer :: stc (:,:) => null() !< soil temperature content
real (kind=kind_phys), pointer :: slc (:,:) => null() !< soil liquid water content
real (kind=kind_phys), pointer :: exch_h (:,:) => null() !< 3D heat exchange coefficient
!--- precipitation
real (kind=kind_phys), pointer :: prew (:) => null() !< water
real (kind=kind_phys), pointer :: prer (:) => null() !< rain
real (kind=kind_phys), pointer :: prei (:) => null() !< ice
real (kind=kind_phys), pointer :: pres (:) => null() !< snow
real (kind=kind_phys), pointer :: preg (:) => null() !< graupel
!--- precipitation flux
real (kind=kind_phys), pointer :: prefluxw (:,:) => null() !< water
real (kind=kind_phys), pointer :: prefluxr (:,:) => null() !< rain
real (kind=kind_phys), pointer :: prefluxi (:,:) => null() !< ice
real (kind=kind_phys), pointer :: prefluxs (:,:) => null() !< snow
real (kind=kind_phys), pointer :: prefluxg (:,:) => null() !< graupel
!--- sea surface temperature
real (kind=kind_phys), pointer :: sst (:) => null() !< sea surface temperature
real (kind=kind_phys), pointer :: ci (:) => null() !< sea ice fraction
logical, pointer :: dycore_hydrostatic => null() !< whether the dynamical core is hydrostatic
integer, pointer :: nwat => null() !< number of water species used in the model
contains
procedure :: create => statein_create !< allocate array data
end type GFS_statein_type
!------------------------------------------------------------------
! GFS_stateout_type
! prognostic state or tendencies after physical parameterizations
!------------------------------------------------------------------
type GFS_stateout_type
!-- Out (physics only)
real (kind=kind_phys), pointer :: gu0 (:,:) => null() !< updated zonal wind
real (kind=kind_phys), pointer :: gv0 (:,:) => null() !< updated meridional wind
real (kind=kind_phys), pointer :: gt0 (:,:) => null() !< updated temperature
real (kind=kind_phys), pointer :: gq0 (:,:,:) => null() !< updated tracers
contains
procedure :: create => stateout_create !< allocate array data
end type GFS_stateout_type
!---------------------------------------------------------------------------------------
! GFS_sfcprop_type
! surface properties that may be read in and/or updated by climatology or observations
!---------------------------------------------------------------------------------------
type GFS_sfcprop_type
!--- In (radiation and physics)
real (kind=kind_phys), pointer :: slmsk (:) => null() !< sea/land mask array (sea:0,land:1,sea-ice:2)
real (kind=kind_phys), pointer :: oceanfrac(:) => null() !< ocean fraction [0:1]
real (kind=kind_phys), pointer :: landfrac(:) => null() !< land fraction [0:1]
real (kind=kind_phys), pointer :: lakefrac(:) => null() !< lake fraction [0:1]
real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface temperature in k
!< [tsea in gbphys.f]
real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K
real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface temperature over ice fraction
real (kind=kind_phys), pointer :: qsfc (:) => null() !< surface specific humidity in kg/kg
!
real (kind=kind_phys), pointer :: tsclim (:) => null() !< climatological SST in k
real (kind=kind_phys), pointer :: mldclim (:) => null() !< climatological ocean mixed layer depth in m
real (kind=kind_phys), pointer :: qfluxadj (:) => null() !< climatological qflux used for SOM
real (kind=kind_phys), pointer :: ts_som (:) => null() !< predicted SST in SOM or MLM
real (kind=kind_phys), pointer :: ts_clim_iano (:) => null() !< climatological SST plus initial anomaly with decay
real (kind=kind_phys), pointer :: tml (:) => null() !< ocean mixed layer temp
real (kind=kind_phys), pointer :: tml0 (:) => null() !< ocean mixed layer temp at initial or previous time step
real (kind=kind_phys), pointer :: mld (:) => null() !< ocean mixed layer depth (MLD)
real (kind=kind_phys), pointer :: mld0 (:) => null() !< MLD at initial or previous time step
real (kind=kind_phys), pointer :: huml (:) => null() !< ocean zonal current * MLD
real (kind=kind_phys), pointer :: hvml (:) => null() !< ocean meridional current *MLD
real (kind=kind_phys), pointer :: tmoml (:) => null() !< ocean temp at the above 200 m
real (kind=kind_phys), pointer :: tmoml0 (:) => null() !< ocean temp at the above 200 m at initial or previous time step
!
real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction
real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph
real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm
real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm
real (kind=kind_phys), pointer :: zorll (:) => null() !< land surface roughness in cm
real (kind=kind_phys), pointer :: ztrl (:) => null() !< surface roughness for t and q in cm
real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid
real (kind=kind_phys), pointer :: hprim (:) => null() !< topographic standard deviation in m !
real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics
!--- In (radiation only)
real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction
real (kind=kind_phys), pointer :: snoalb (:) => null() !< maximum snow albedo in fraction
real (kind=kind_phys), pointer :: alvsf (:) => null() !< mean vis albedo with strong cosz dependency
real (kind=kind_phys), pointer :: alnsf (:) => null() !< mean nir albedo with strong cosz dependency
real (kind=kind_phys), pointer :: alvwf (:) => null() !< mean vis albedo with weak cosz dependency
real (kind=kind_phys), pointer :: alnwf (:) => null() !< mean nir albedo with weak cosz dependency
real (kind=kind_phys), pointer :: facsf (:) => null() !< fractional coverage with strong cosz dependency
real (kind=kind_phys), pointer :: facwf (:) => null() !< fractional coverage with weak cosz dependency
!--- In (physics only)
real (kind=kind_phys), pointer :: slope (:) => null() !< sfc slope type for lsm
real (kind=kind_phys), pointer :: shdmin (:) => null() !< min fractional coverage of green veg
real (kind=kind_phys), pointer :: shdmax (:) => null() !< max fractnl cover of green veg (not used)
real (kind=kind_phys), pointer :: tg3 (:) => null() !< deep soil temperature
real (kind=kind_phys), pointer :: vfrac (:) => null() !< vegetation fraction
real (kind=kind_phys), pointer :: vtype (:) => null() !< vegetation type
real (kind=kind_phys), pointer :: stype (:) => null() !< soil type
real (kind=kind_phys), pointer :: uustar (:) => null() !< boundary layer parameter
real (kind=kind_phys), pointer :: oro (:) => null() !< orography
real (kind=kind_phys), pointer :: oro_uf (:) => null() !< unfiltered orography
!--- IN/out MYJ scheme
real (kind=kind_phys), pointer :: QZ0 (:) => null() !< vapor mixing ratio at z=z0
real (kind=kind_phys), pointer :: THZ0 (:) => null() !< Potential temperature at z=z0
real (kind=kind_phys), pointer :: UZ0 (:) => null() !< zonal wind at z=z0
real (kind=kind_phys), pointer :: VZ0 (:) => null() !< meridional wind at z=z0
!-- In/Out
real (kind=kind_phys), pointer :: hice (:) => null() !< sea ice thickness
real (kind=kind_phys), pointer :: weasd (:) => null() !< water equiv of accumulated snow depth (kg/m**2)
!< over land and sea ice
real (kind=kind_phys), pointer :: canopy (:) => null() !< canopy water
real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme
real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme
real (kind=kind_phys), pointer :: f10m (:) => null() !< fm at 10m - Ratio of sigma level 1 wind and 10m wind
real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation
real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation
real (kind=kind_phys), pointer :: slc (:,:) => null() !< liquid soil moisture
real (kind=kind_phys), pointer :: smc (:,:) => null() !< total soil moisture
real (kind=kind_phys), pointer :: stc (:,:) => null() !< soil temperature
!--- Out
real (kind=kind_phys), pointer :: t2m (:) => null() !< 2 meter temperature
real (kind=kind_phys), pointer :: q2m (:) => null() !< 2 meter humidity
! -- In/Out for Noah MP
real (kind=kind_phys), pointer :: snowxy (:) => null() !<
real (kind=kind_phys), pointer :: tvxy (:) => null() !< veg temp
real (kind=kind_phys), pointer :: tgxy (:) => null() !< ground temp
real (kind=kind_phys), pointer :: canicexy(:) => null() !<
real (kind=kind_phys), pointer :: canliqxy(:) => null() !<
real (kind=kind_phys), pointer :: eahxy (:) => null() !<
real (kind=kind_phys), pointer :: tahxy (:) => null() !<
real (kind=kind_phys), pointer :: cmxy (:) => null() !<
real (kind=kind_phys), pointer :: chxy (:) => null() !<
real (kind=kind_phys), pointer :: fwetxy (:) => null() !<
real (kind=kind_phys), pointer :: sneqvoxy(:) => null() !<
real (kind=kind_phys), pointer :: alboldxy(:) => null() !<
real (kind=kind_phys), pointer :: qsnowxy (:) => null() !<
real (kind=kind_phys), pointer :: wslakexy(:) => null() !<
real (kind=kind_phys), pointer :: zwtxy (:) => null() !<
real (kind=kind_phys), pointer :: waxy (:) => null() !<
real (kind=kind_phys), pointer :: wtxy (:) => null() !<
real (kind=kind_phys), pointer :: lfmassxy(:) => null() !<
real (kind=kind_phys), pointer :: rtmassxy(:) => null() !<
real (kind=kind_phys), pointer :: stmassxy(:) => null() !<
real (kind=kind_phys), pointer :: woodxy (:) => null() !<
real (kind=kind_phys), pointer :: stblcpxy(:) => null() !<
real (kind=kind_phys), pointer :: fastcpxy(:) => null() !<
real (kind=kind_phys), pointer :: xsaixy (:) => null() !<
real (kind=kind_phys), pointer :: xlaixy (:) => null() !<
real (kind=kind_phys), pointer :: taussxy (:) => null() !<
real (kind=kind_phys), pointer :: smcwtdxy(:) => null() !<
real (kind=kind_phys), pointer :: deeprechxy(:)=> null() !<
real (kind=kind_phys), pointer :: rechxy (:) => null() !<
real (kind=kind_phys), pointer :: albdvis (:) => null() !<
real (kind=kind_phys), pointer :: albdnir (:) => null() !<
real (kind=kind_phys), pointer :: albivis (:) => null() !<
real (kind=kind_phys), pointer :: albinir (:) => null() !<
real (kind=kind_phys), pointer :: emiss (:) => null() !<
real (kind=kind_phys), pointer :: snicexy (:,:) => null() !<
real (kind=kind_phys), pointer :: snliqxy (:,:) => null() !<
real (kind=kind_phys), pointer :: tsnoxy (:,:) => null() !<
real (kind=kind_phys), pointer :: smoiseq (:,:) => null() !<
real (kind=kind_phys), pointer :: zsnsoxy (:,:) => null() !<
!--- NSSTM variables (only allocated when [Model%nstf_name(1) > 0])
real (kind=kind_phys), pointer :: tref (:) => null() !< nst_fld%Tref - Reference Temperature
real (kind=kind_phys), pointer :: z_c (:) => null() !< nst_fld%z_c - Sub layer cooling thickness
real (kind=kind_phys), pointer :: c_0 (:) => null() !< nst_fld%c_0 - coefficient1 to calculate d(Tz)/d(Ts)
real (kind=kind_phys), pointer :: c_d (:) => null() !< nst_fld%c_d - coefficient2 to calculate d(Tz)/d(Ts)
real (kind=kind_phys), pointer :: w_0 (:) => null() !< nst_fld%w_0 - coefficient3 to calculate d(Tz)/d(Ts)
real (kind=kind_phys), pointer :: w_d (:) => null() !< nst_fld%w_d - coefficient4 to calculate d(Tz)/d(Ts)
real (kind=kind_phys), pointer :: xt (:) => null() !< nst_fld%xt heat content in DTL
real (kind=kind_phys), pointer :: xs (:) => null() !< nst_fld%xs salinity content in DTL
real (kind=kind_phys), pointer :: xu (:) => null() !< nst_fld%xu u current content in DTL
real (kind=kind_phys), pointer :: xv (:) => null() !< nst_fld%xv v current content in DTL
real (kind=kind_phys), pointer :: xz (:) => null() !< nst_fld%xz DTL thickness
real (kind=kind_phys), pointer :: zm (:) => null() !< nst_fld%zm MXL thickness
real (kind=kind_phys), pointer :: xtts (:) => null() !< nst_fld%xtts d(xt)/d(ts)
real (kind=kind_phys), pointer :: xzts (:) => null() !< nst_fld%xzts d(xz)/d(ts)
real (kind=kind_phys), pointer :: d_conv (:) => null() !< nst_fld%d_conv thickness of Free Convection Layer (FCL)
real (kind=kind_phys), pointer :: ifd (:) => null() !< nst_fld%ifd index to start DTM run or not
real (kind=kind_phys), pointer :: dt_cool(:) => null() !< nst_fld%dt_cool Sub layer cooling amount
real (kind=kind_phys), pointer :: qrain (:) => null() !< nst_fld%qrain sensible heat flux due to rainfall (watts)
!---- precipitation rates from previous time step for NoahMP LSM
real (kind=kind_phys), pointer :: draincprv (:) => null() !< convective precipitation rate from previous timestep
real (kind=kind_phys), pointer :: drainncprv (:) => null() !< explicit rainfall rate from previous timestep
real (kind=kind_phys), pointer :: diceprv (:) => null() !< ice precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dsnowprv (:) => null() !< snow precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dgraupelprv(:) => null() !< graupel precipitation rate from previous timestep
contains
procedure :: create => sfcprop_create !< allocate array data
end type GFS_sfcprop_type
!---------------------------------------------------------------------
! GFS_coupling_type
! fields to/from other coupled components (e.g. land/ice/ocean/etc.)
!---------------------------------------------------------------------
type GFS_coupling_type
!--- Out (radiation only)
real (kind=kind_phys), pointer :: nirbmdi(:) => null() !< sfc nir beam sw downward flux (w/m2)
real (kind=kind_phys), pointer :: nirdfdi(:) => null() !< sfc nir diff sw downward flux (w/m2)
real (kind=kind_phys), pointer :: visbmdi(:) => null() !< sfc uv+vis beam sw downward flux (w/m2)
real (kind=kind_phys), pointer :: visdfdi(:) => null() !< sfc uv+vis diff sw downward flux (w/m2)
real (kind=kind_phys), pointer :: nirbmui(:) => null() !< sfc nir beam sw upward flux (w/m2)
real (kind=kind_phys), pointer :: nirdfui(:) => null() !< sfc nir diff sw upward flux (w/m2)
real (kind=kind_phys), pointer :: visbmui(:) => null() !< sfc uv+vis beam sw upward flux (w/m2)
real (kind=kind_phys), pointer :: visdfui(:) => null() !< sfc uv+vis diff sw upward flux (w/m2)
!--- In (physics only)
real (kind=kind_phys), pointer :: sfcdsw(:) => null() !< total sky sfc downward sw flux ( w/m**2 )
!< GFS_radtend_type%sfcfsw%dnfxc
real (kind=kind_phys), pointer :: sfcnsw(:) => null() !< total sky sfc netsw flx into ground(w/m**2)
!< difference of dnfxc & upfxc from GFS_radtend_type%sfcfsw
real (kind=kind_phys), pointer :: sfcdlw(:) => null() !< total sky sfc downward lw flux ( w/m**2 )
!< GFS_radtend_type%sfclsw%dnfxc
!--- incoming quantities
real (kind=kind_phys), pointer :: dusfcin_cpl(:) => null() !< aoi_fld%dusfcin(item,lan)
real (kind=kind_phys), pointer :: dvsfcin_cpl(:) => null() !< aoi_fld%dvsfcin(item,lan)
real (kind=kind_phys), pointer :: dtsfcin_cpl(:) => null() !< aoi_fld%dtsfcin(item,lan)
real (kind=kind_phys), pointer :: dqsfcin_cpl(:) => null() !< aoi_fld%dqsfcin(item,lan)
real (kind=kind_phys), pointer :: ulwsfcin_cpl(:)=> null() !< aoi_fld%ulwsfcin(item,lan)
!--- only variable needed for cplwav=.TRUE.
real (kind=kind_phys), pointer :: slimskin_cpl(:)=> null() !< aoi_fld%slimskin(item,lan)
!--- outgoing accumulated quantities
real (kind=kind_phys), pointer :: rain_cpl (:) => null() !< total rain precipitation
real (kind=kind_phys), pointer :: snow_cpl (:) => null() !< total snow precipitation
real (kind=kind_phys), pointer :: dusfc_cpl (:) => null() !< sfc u momentum flux
real (kind=kind_phys), pointer :: dvsfc_cpl (:) => null() !< sfc v momentum flux
real (kind=kind_phys), pointer :: dtsfc_cpl (:) => null() !< sfc sensible heat flux
real (kind=kind_phys), pointer :: dqsfc_cpl (:) => null() !< sfc latent heat flux
real (kind=kind_phys), pointer :: dlwsfc_cpl(:) => null() !< sfc downward lw flux (w/m**2)
real (kind=kind_phys), pointer :: dswsfc_cpl(:) => null() !< sfc downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: dnirbm_cpl(:) => null() !< sfc nir beam downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: dnirdf_cpl(:) => null() !< sfc nir diff downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: dvisbm_cpl(:) => null() !< sfc uv+vis beam dnwd sw flux (w/m**2)
real (kind=kind_phys), pointer :: dvisdf_cpl(:) => null() !< sfc uv+vis diff dnwd sw flux (w/m**2)
real (kind=kind_phys), pointer :: nlwsfc_cpl(:) => null() !< net downward lw flux (w/m**2)
real (kind=kind_phys), pointer :: nswsfc_cpl(:) => null() !< net downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: nnirbm_cpl(:) => null() !< net nir beam downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: nnirdf_cpl(:) => null() !< net nir diff downward sw flux (w/m**2)
real (kind=kind_phys), pointer :: nvisbm_cpl(:) => null() !< net uv+vis beam downward sw rad flux (w/m**2)
real (kind=kind_phys), pointer :: nvisdf_cpl(:) => null() !< net uv+vis diff downward sw rad flux (w/m**2)
!--- outgoing instantaneous quantities
real (kind=kind_phys), pointer :: dusfci_cpl (:) => null() !< instantaneous sfc u momentum flux
real (kind=kind_phys), pointer :: dvsfci_cpl (:) => null() !< instantaneous sfc v momentum flux
real (kind=kind_phys), pointer :: dtsfci_cpl (:) => null() !< instantaneous sfc sensible heat flux
real (kind=kind_phys), pointer :: dqsfci_cpl (:) => null() !< instantaneous sfc latent heat flux
real (kind=kind_phys), pointer :: dlwsfci_cpl(:) => null() !< instantaneous sfc downward lw flux
real (kind=kind_phys), pointer :: dswsfci_cpl(:) => null() !< instantaneous sfc downward sw flux
real (kind=kind_phys), pointer :: dnirbmi_cpl(:) => null() !< instantaneous sfc nir beam downward sw flux
real (kind=kind_phys), pointer :: dnirdfi_cpl(:) => null() !< instantaneous sfc nir diff downward sw flux
real (kind=kind_phys), pointer :: dvisbmi_cpl(:) => null() !< instantaneous sfc uv+vis beam downward sw flux
real (kind=kind_phys), pointer :: dvisdfi_cpl(:) => null() !< instantaneous sfc uv+vis diff downward sw flux
real (kind=kind_phys), pointer :: nlwsfci_cpl(:) => null() !< instantaneous net sfc downward lw flux
real (kind=kind_phys), pointer :: nswsfci_cpl(:) => null() !< instantaneous net sfc downward sw flux
real (kind=kind_phys), pointer :: nnirbmi_cpl(:) => null() !< instantaneous net nir beam sfc downward sw flux
real (kind=kind_phys), pointer :: nnirdfi_cpl(:) => null() !< instantaneous net nir diff sfc downward sw flux
real (kind=kind_phys), pointer :: nvisbmi_cpl(:) => null() !< instantaneous net uv+vis beam downward sw flux
real (kind=kind_phys), pointer :: nvisdfi_cpl(:) => null() !< instantaneous net uv+vis diff downward sw flux
real (kind=kind_phys), pointer :: t2mi_cpl (:) => null() !< instantaneous T2m
real (kind=kind_phys), pointer :: q2mi_cpl (:) => null() !< instantaneous Q2m
real (kind=kind_phys), pointer :: u10mi_cpl (:) => null() !< instantaneous U10m
real (kind=kind_phys), pointer :: v10mi_cpl (:) => null() !< instantaneous V10m
real (kind=kind_phys), pointer :: tsfci_cpl (:) => null() !< instantaneous sfc temperature
real (kind=kind_phys), pointer :: psurfi_cpl (:) => null() !< instantaneous sfc pressure
!--- topography-based information for the coupling system
real (kind=kind_phys), pointer :: oro_cpl (:) => null() !< orography ( oro from GFS_sfcprop_type)
real (kind=kind_phys), pointer :: slmsk_cpl (:) => null() !< Land/Sea/Ice mask (slmsk from GFS_sfcprop_type)
!--- cellular automata
real (kind=kind_phys), pointer :: tconvtend(:,:) => null()
real (kind=kind_phys), pointer :: qconvtend(:,:) => null()
real (kind=kind_phys), pointer :: uconvtend(:,:) => null()
real (kind=kind_phys), pointer :: vconvtend(:,:) => null()
real (kind=kind_phys), pointer :: ca_out (:) => null() !
real (kind=kind_phys), pointer :: ca_deep (:) => null() !
real (kind=kind_phys), pointer :: ca_turb (:) => null() !
real (kind=kind_phys), pointer :: ca_shal (:) => null() !
real (kind=kind_phys), pointer :: ca_rad (:) => null() !
real (kind=kind_phys), pointer :: ca_micro (:) => null() !
real (kind=kind_phys), pointer :: cape (:) => null() !
!--- stochastic physics
real (kind=kind_phys), pointer :: shum_wts (:,:) => null() !
real (kind=kind_phys), pointer :: sppt_wts (:,:) => null() !
real (kind=kind_phys), pointer :: skebu_wts (:,:) => null() !
real (kind=kind_phys), pointer :: skebv_wts (:,:) => null() !
real (kind=kind_phys), pointer :: sfc_wts (:,:) => null() ! mg, sfc-perts
integer :: nsfcpert=6 !< number of sfc perturbations
!--- instantaneous quantities for GoCart and will be accumulated for 3D diagnostics
real (kind=kind_phys), pointer :: dqdti (:,:) => null() !< instantaneous total moisture tendency (kg/kg/s)
real (kind=kind_phys), pointer :: cnvqci (:,:) => null() !< instantaneous total convective conensate (kg/kg)
real (kind=kind_phys), pointer :: upd_mfi (:,:) => null() !< instantaneous convective updraft mass flux
real (kind=kind_phys), pointer :: dwn_mfi (:,:) => null() !< instantaneous convective downdraft mass flux
real (kind=kind_phys), pointer :: det_mfi (:,:) => null() !< instantaneous convective detrainment mass flux
contains
procedure :: create => coupling_create !< allocate array data
end type GFS_coupling_type
!----------------------------------------------------------------------------------
! GFS_control_type
! model control parameters input from a namelist and/or derived from others
! list of those that can be modified during the run are at the bottom of the list
!----------------------------------------------------------------------------------
type GFS_control_type
integer :: me !< MPI rank designator
integer :: master !< MPI rank of master atmosphere processor
integer :: nlunit !< unit for namelist
character(len=64) :: fn_nml !< namelist filename for surface data cycling
character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist
!< for use with internal file reads
real(kind=kind_phys) :: fhzero !< seconds between clearing of diagnostic buckets
logical :: ldiag3d !< flag for 3d diagnostic fields
logical :: lssav !< logical flag for storing diagnostics
real(kind=kind_phys) :: fhcyc !< frequency for surface data cycling (secs)
logical :: lgocart !< flag for 3d diagnostic fields for gocart 1
real(kind=kind_phys) :: fhgoc3d !< seconds between calls to gocart
integer :: thermodyn_id !< valid for GFS only for get_prs/phi
integer :: sfcpress_id !< valid for GFS only for get_prs/phi
logical :: gen_coord_hybrid!< for Henry's gen coord
logical :: sfc_override !< use idealized surface conditions
!--- set some grid extent parameters
integer :: isc !< starting i-index for this MPI-domain
integer :: jsc !< starting j-index for this MPI-domain
integer :: nx !< number of points in the i-dir for this MPI-domain
integer :: ny !< number of points in the j-dir for this MPI-domain
integer :: levs !< number of vertical levels
integer :: cnx !< number of points in the i-dir for this cubed-sphere face
integer :: cny !< number of points in the j-dir for this cubed-sphere face
integer :: lonr !< number of global points in x-dir (i) along the equator
integer :: latr !< number of global points in y-dir (j) along any meridian
integer :: tile_num
integer :: nblks !< for explicit data blocking: number of blocks
integer, pointer :: blksz(:) !< for explicit data blocking: block sizes of all blocks
!--- coupling parameters
logical :: cplflx !< default no cplflx collection
logical :: cplwav !< default no cplwav collection
!--- integrated dynamics through earth's atmosphere
logical :: lsidea
!--- calendars and time parameters and activation triggers
real(kind=kind_phys) :: dtp !< physics timestep in seconds
real(kind=kind_phys) :: dtf !< dynamics timestep in seconds
integer :: nscyc !< trigger for surface data cycling
integer :: nszero !< trigger for zeroing diagnostic buckets
integer :: idat(1:8) !< initialization date and time
!< (yr, mon, day, t-zone, hr, min, sec, mil-sec)
integer :: idate(4) !< initial date with different size and ordering
!< (hr, mon, day, yr)
!--- radiation control parameters
real(kind=kind_phys) :: fhswr !< frequency for shortwave radiation (secs)
real(kind=kind_phys) :: fhlwr !< frequency for longwave radiation (secs)
real(kind=kind_phys) :: sollat !< latitude the solar position fixed to (-90. to 90.)
integer :: nsswr !< integer trigger for shortwave radiation
integer :: nslwr !< integer trigger for longwave radiation
integer :: levr !< number of vertical levels for radiation calculations
integer :: nfxr !< second dimension for fluxr diagnostic variable (radiation)
integer :: nkld !< second dimension for cloud diagnostic variable (radiation)
logical :: aero_in !< aerosol flag for gbphys
logical :: lmfshal !< parameter for radiation
logical :: lmfdeep2 !< parameter for radiation
integer :: nrcm !< second dimension of random number stream for RAS
integer :: iflip !< iflip - is not the same as flipv
integer :: isol !< use prescribed solar constant
integer :: ico2 !< prescribed global mean value (old opernl)
integer :: ialb !< use climatology alb, based on sfc type
!< 1 => use modis based alb
integer :: iems !< use fixed value of 1.0
integer :: iaer !< default aerosol effect in sw only
integer :: iovr_sw !< sw: max-random overlap clouds
integer :: iovr_lw !< lw: max-random overlap clouds
integer :: ictm !< ictm=0 => use data at initial cond time, if not
!< available; use latest; no extrapolation.
!< ictm=1 => use data at the forecast time, if not
!< available; use latest; do extrapolation.
!< ictm=yyyy0 => use yyyy data for the forecast time;
!< no extrapolation.
!< ictm=yyyy1 = > use yyyy data for the fcst. If needed,
!< do extrapolation to match the fcst time.
!< ictm=-1 => use user provided external data for
!< the fcst time; no extrapolation.
!< ictm=-2 => same as ictm=0, but add seasonal cycle
!< from climatology; no extrapolation.
integer :: isubc_sw !< sw clouds without sub-grid approximation
integer :: isubc_lw !< lw clouds without sub-grid approximation
!< =1 => sub-grid cloud with prescribed seeds
!< =2 => sub-grid cloud with randomly generated
!< seeds
logical :: crick_proof !< CRICK-Proof cloud water
logical :: ccnorm !< Cloud condensate normalized by cloud cover
logical :: norad_precip !< radiation precip flag for Ferrier/Moorthi
logical :: lwhtr !< flag to output lw heating rate (Radtend%lwhc)
logical :: swhtr !< flag to output sw heating rate (Radtend%swhc)
logical :: fixed_date !< flag to fix astronomy (not solar angle) to initial date
logical :: fixed_solhr !< flag to fix solar angle to initial time
logical :: fixed_sollat !< flag to fix solar latitude
logical :: daily_mean !< flag to replace cosz with daily mean value
!--- microphysical switch
integer :: ncld !< cnoice of cloud scheme
!--- GFDL microphysical parameters
logical :: do_inline_mp !< flag for GFDL cloud microphysics
!--- The CFMIP Observation Simulator Package (COSP)
logical :: do_cosp !< flag for COSP
!--- Z-C microphysical parameters
logical :: zhao_mic !< flag for Zhao-Carr microphysics
real(kind=kind_phys) :: psautco(2) !< [in] auto conversion coeff from ice to snow
real(kind=kind_phys) :: prautco(2) !< [in] auto conversion coeff from cloud to rain
real(kind=kind_phys) :: evpco !< [in] coeff for evaporation of largescale rain
real(kind=kind_phys) :: wminco(2) !< [in] water and ice minimum threshold for Zhao
!--- M-G microphysical parameters
integer :: fprcp !< no prognostic rain and snow (MG)
real(kind=kind_phys) :: mg_dcs !< Morrison-Gettleman microphysics parameters
real(kind=kind_phys) :: mg_qcvar
real(kind=kind_phys) :: mg_ts_auto_ice !< ice auto conversion time scale
!--- land/surface model parameters
integer :: lsm !< flag for land surface model lsm=1 for noah lsm
integer :: lsm_noah=1 !< flag for NOAH land surface model
integer :: lsm_noahmp=2 !< flag for NOAH land surface model
integer :: lsoil !< number of soil layers
integer :: ivegsrc !< ivegsrc = 0 => USGS,
!< ivegsrc = 1 => IGBP (20 category)
!< ivegsrc = 2 => UMD (13 category)
integer :: isot !< isot = 0 => Zobler soil type ( 9 category)
!< isot = 1 => STATSGO soil type (19 category)
logical :: mom4ice !< flag controls mom4 sea ice
logical :: use_ufo !< flag for gcycle surface option
real(kind=kind_phys) :: czil_sfc !< Zilintkinivich constant
real(kind=kind_phys) :: Ts0 !< constant surface temp. if surface data not found
! -- the Noah MP options
integer :: iopt_dveg ! 1-> off table lai 2-> on 3-> off;4->off;5 -> on
integer :: iopt_crs !canopy stomatal resistance (1-> ball-berry; 2->jarvis)
integer :: iopt_btr !soil moisture factor for stomatal resistance (1-> noah; 2-> clm; 3-> ssib)
integer :: iopt_run !runoff and groundwater (1->simgm; 2->simtop; 3->schaake96; 4->bats)
integer :: iopt_sfc !surface layer drag coeff (ch & cm) (1->m-o; 2->chen97)
integer :: iopt_frz !supercooled liquid water (1-> ny06; 2->koren99)
integer :: iopt_inf !frozen soil permeability (1-> ny06; 2->koren99)
integer :: iopt_rad !radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg)
integer :: iopt_alb !snow surface albedo (1->bats; 2->class)
integer :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah)
integer :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah)
integer :: iopt_stc !snow/soil temperature time scheme (only layer 1)
!--- tuning parameters for physical parameterizations
logical :: ras !< flag for ras convection scheme
logical :: flipv !< flag for vertical direction flip (ras)
!< .true. implies surface at k=1
logical :: trans_trac !< flag for convective transport of tracers (RAS only)
logical :: old_monin !< flag for diff monin schemes
logical :: orogwd !< flag for orog gravity wave drag
logical :: cnvgwd !< flag for conv gravity wave drag
logical :: mstrat !< flag for moorthi approach for stratus
logical :: moist_adj !< flag for moist convective adjustment
logical :: cscnv !< flag for Chikira-Sugiyama convection
logical :: cal_pre !< flag controls precip type algorithm
logical :: do_aw !< AW scale-aware option in cs convection
logical :: do_shoc !< flag for SHOC
logical :: shocaftcnv !< flag for SHOC
logical :: shoc_cld !< flag for clouds
logical :: uni_cld !< flag for clouds in grrad
logical :: h2o_phys !< flag for stratosphere h2o
logical :: pdfcld !< flag for pdfcld
logical :: shcnvcw !< flag for shallow convective cloud
logical :: redrag !< flag for reduced drag coeff. over sea
logical :: sfc_gfdl !< flag for using updated sfc layer scheme
real(kind=kind_phys) :: z0s_max !< a limiting value for z0 under high winds
logical :: do_z0_moon !< flag for using z0 scheme in Moon et al. 2007 (kgao)
logical :: do_z0_hwrf15 !< flag for using z0 scheme in 2015 HWRF (kgao)
logical :: do_z0_hwrf17 !< flag for using z0 scheme in 2017 HWRF (kgao)
logical :: do_z0_hwrf17_hwonly !< flag for using z0 scheme in 2017 HWRF only under high wind (kgao)
real(kind=kind_phys) :: wind_th_hwrf !< wind speed threshold when z0 level off as in HWRF (kgao)
logical :: hybedmf !< flag for hybrid edmf pbl scheme
logical :: myj_pbl !< flag for NAM MYJ tke scheme
logical :: ysupbl !< flag for ysu pbl scheme (version in WRFV3.8)
logical :: satmedmf !< flag for scale-aware TKE-based moist edmf
!< vertical turbulent mixing scheme
logical :: no_pbl !< disable PBL (for LES)
logical :: cap_k0_land !< flag for applying limter on background diff in inversion layer over land in satmedmfdiff.f
logical :: do_dk_hb19 !< flag for using hb19 background diff formula in satmedmfdiff.f
logical :: dspheat !< flag for tke dissipative heating
logical :: lheatstrg !< flag for canopy heat storage parameterization
real(kind=kind_phys) :: hour_canopy !< tunable time scale for canopy heat storage parameterization
real(kind=kind_phys) :: afac_canopy !< tunable enhancement factor for canopy heat storage parameterization
real(kind=kind_phys) :: xkzm_m !< [in] bkgd_vdif_m background vertical diffusion for momentum for ocean points
real(kind=kind_phys) :: xkzm_h !< [in] bkgd_vdif_h background vertical diffusion for heat q for ocean points
real(kind=kind_phys) :: xkzm_ml !< [in] bkgd_vdif_m background vertical diffusion for momentum for land points
real(kind=kind_phys) :: xkzm_hl !< [in] bkgd_vdif_h background vertical diffusion for heat q for land points
real(kind=kind_phys) :: xkzm_mi !< [in] bkgd_vdif_m background vertical diffusion for momentum for ice points
real(kind=kind_phys) :: xkzm_hi !< [in] bkgd_vdif_h background vertical diffusion for heat q for ice points
real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion
real(kind=kind_phys) :: xkzm_lim !< [in] background vertical diffusion limit
real(kind=kind_phys) :: xkzm_fac !< [in] background vertical diffusion factor
real(kind=kind_phys) :: xkzminv !< diffusivity in inversion layers
real(kind=kind_phys) :: xkgdx !< [in] background vertical diffusion threshold
real(kind=kind_phys) :: rlmn !< [in] lower-limter on asymtotic mixing length in satmedmfdiff.f
real(kind=kind_phys) :: rlmx !< [in] upper-limter on asymtotic mixing length in satmedmfdiff.f
real(kind=kind_phys) :: zolcru !< [in] a threshold for activating the surface-driven updraft transports in satmedmfdifq.f
real(kind=kind_phys) :: cs0 !< [in] a parameter that controls the shear effect on the mixing length in satmedmfdifq.f
real(kind=kind_phys) :: moninq_fac !< turbulence diffusion coefficient factor
real(kind=kind_phys) :: dspfac !< tke dissipative heating factor
real(kind=kind_phys) :: bl_upfr !< updraft fraction in boundary layer mass flux scheme
real(kind=kind_phys) :: bl_dnfr !< downdraft fraction in boundary layer mass flux scheme
real(kind=kind_phys) :: ysu_ent_fac !< Entrainment factor in YSU scheme
real(kind=kind_phys) :: ysu_pfac_q !< Exponent in scalar vertical mixing
real(kind=kind_phys) :: ysu_brcr_ub !< critical bulk Richardson number in YSU scheme
real(kind=kind_phys) :: ysu_rlam !< mixing length parameter in YSU scheme
real(kind=kind_phys) :: ysu_afac !< afac parameter in YSU scheme
real(kind=kind_phys) :: ysu_bfac !< bfac parameter in YSU scheme
real(kind=kind_phys) :: ysu_hpbl_cr !< critical hpbl for turning on entrainment fluxes in YSU
real(kind=kind_phys) :: tnl_fac !< controls nonlocal mixing of t in YSU scheme (1. or 0.)
real(kind=kind_phys) :: qnl_fac !< controls nonlocal mixing of q in YSU scheme (1. or 0.)
real(kind=kind_phys) :: unl_fac !< controls nonlocal mixing of wind in YSU scheme (1. or 0.)
logical :: cnvcld
logical :: cloud_gfdl !< flag for GFDL cloud radii scheme
logical :: random_clds !< flag controls whether clouds are random
logical :: shal_cnv !< flag for calling shallow convection
integer :: imfshalcnv !< flag for mass-flux shallow convection scheme
!< 1: July 2010 version of mass-flux shallow conv scheme
!< current operational version as of 2016
!< 2: scale- & aerosol-aware mass-flux shallow conv scheme (2017)
!< 3: scale- & aerosol-aware mass-flux shallow conv scheme (2020)
!< 0: modified Tiedtke's eddy-diffusion shallow conv scheme
!< -1: no shallow convection used
integer :: imfdeepcnv !< flag for mass-flux deep convection scheme
!< 1: July 2010 version of SAS conv scheme
!< current operational version as of 2016
!< 2: scale- & aerosol-aware mass-flux deep conv scheme (2017)
!< 3: scale- & aerosol-aware mass-flux deep conv scheme (2020)
!< 0: old SAS Convection scheme before July 2010
integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme
!< 0: initial version of satmedmf (Nov 2018) modified by kgao at GFDL
!< 1: updated version of satmedmf (May 2019) modified by kgao at GFDL
logical :: do_deep !< whether to do deep convection
integer :: nmtvr !< number of topographic variables such as variance etc
!< used in the GWD parameterization
integer :: jcap !< number of spectral wave trancation used only by sascnv shalcnv
real(kind=kind_phys) :: cs_parm(10) !< tunable parameters for Chikira-Sugiyama convection
real(kind=kind_phys) :: flgmin(2) !< [in] ice fraction bounds
real(kind=kind_phys) :: cgwf(2) !< multiplication factor for convective GWD
real(kind=kind_phys) :: ccwf(2) !< multiplication factor for critical cloud
!< workfunction for RAS
real(kind=kind_phys) :: cdmbgwd(2) !< multiplication factors for cdmb and gwd
real(kind=kind_phys) :: gwd_p_crit !< Optional level above which GWD stress decays with height
real(kind=kind_phys) :: sup !< supersaturation in pdf cloud when t is very low
real(kind=kind_phys) :: ctei_rm(2) !< critical cloud top entrainment instability criteria
!< (used if mstrat=.true.)
real(kind=kind_phys) :: crtrh(3) !< critical relative humidity at the surface
!< PBL top and at the top of the atmosphere
real(kind=kind_phys) :: dlqf(2) !< factor for cloud condensate detrainment
!< from cloud edges for RAS
integer :: seed0 !< random seed for radiation
real(kind=kind_phys) :: rbcr !< Critical Richardson Number in the PBL scheme
logical :: mix_precip !< Whether to apply PBL mixing to precipitating hydrometeors
!--- Rayleigh friction
real(kind=kind_phys) :: prslrd0 !< pressure level from which Rayleigh Damping is applied
real(kind=kind_phys) :: ral_ts !< time scale for Rayleigh damping in days
!--- mass flux deep convection
logical :: ext_rain_deep !< Whether to extract rain water from the deep convection
real(kind=kind_phys) :: clam_deep !< c_e for deep convection (Han and Pan, 2011, eq(6))
real(kind=kind_phys) :: c0s_deep !< conversion parameter of detrainment from liquid water into convetive precipitaiton
real(kind=kind_phys) :: c1_deep !< conversion parameter of detrainment from liquid water into grid-scale cloud water
real(kind=kind_phys) :: betal_deep !< downdraft heat flux contribution over land
real(kind=kind_phys) :: betas_deep !< downdraft heat flux contribution over ocean
real(kind=kind_phys) :: evfact_deep !< evaporation factor
real(kind=kind_phys) :: evfactl_deep !< evaporation factor over land
real(kind=kind_phys) :: pgcon_deep !< control the reduction in momentum transport
!< 0.7 : Gregory et al. (1997, QJRMS)
!< 0.55: Zhang & Wu (2003, JAS)
real(kind=kind_phys) :: asolfac_deep !< aerosol-aware parameter based on Lim & Hong (2012)
!< asolfac= cx / c0s(=.002)
!< cx = min([-0.7 ln(Nccn) + 24]*1.e-4, c0s)
!< Nccn: CCN number concentration in cm^(-3)
!< Until a realistic Nccn is provided, typical Nccns are assumed
!< as Nccn=100 for sea and Nccn=7000 for land
!--- mass flux shallow convection
logical :: ext_rain_shal !< Whether to extract rain water from the shallow convection
real(kind=kind_phys) :: clam_shal !< c_e for shallow convection (Han and Pan, 2011, eq(6))
real(kind=kind_phys) :: c0s_shal !< conversion parameter of detrainment from liquid water into convetive precipitaiton
real(kind=kind_phys) :: c1_shal !< conversion parameter of detrainment from liquid water into grid-scale cloud water
real(kind=kind_phys) :: pgcon_shal !< control the reduction in momentum transport
!< 0.7 : Gregory et al. (1997, QJRMS)
!< 0.55: Zhang & Wu (2003, JAS)
real(kind=kind_phys) :: asolfac_shal !< aerosol-aware parameter based on Lim & Hong (2012)
!< asolfac= cx / c0s(=.002)
!< cx = min([-0.7 ln(Nccn) + 24]*1.e-4, c0s)
!< Nccn: CCN number concentration in cm^(-3)
!< Until a realistic Nccn is provided, typical Nccns are assumed
!< as Nccn=100 for sea and Nccn=7000 for land
real(kind=kind_phys) :: evfact_shal !< rain evaporation efficiency over the ocean
real(kind=kind_phys) :: evfactl_shal !< rain evaporation efficiency over the land
!--- near surface temperature model
logical :: nst_anl !< flag for NSSTM analysis in gcycle/sfcsub
integer :: lsea
integer :: nstf_name(5) !< flag 0 for no nst 1 for uncoupled nst and 2 for coupled NST
!< nstf_name contains the NSST related parameters
!< nstf_name(1) : 0 = NSSTM off, 1 = NSSTM on but uncoupled, 2 =
!< nstf_name(2) : 1 = NSSTM spin up on, 0 = NSSTM spin up off
!< nstf_name(3) : 1 = NSST analysis on, 0 = NSSTM analysis off
!< nstf_name(4) : zsea1 in mm
!< nstf_name(5) : zsea2 in mm
!--- fractional grid
logical :: frac_grid !< flag for fractional grid
logical :: ignore_lake !< flag for ignoring lakes
real(kind=kind_phys) :: min_lakeice !< minimum lake ice value
real(kind=kind_phys) :: min_seaice !< minimum sea ice value
real(kind=kind_phys) :: min_lake_height !< minimum lake height value
real(kind=kind_phys) :: rho_h2o !< density of fresh water
!---cellular automata control parameters
integer :: nca !< number of independent cellular automata
integer :: nlives !< cellular automata lifetime
integer :: ncells !< cellular automata finer grid
real(kind=kind_phys) :: nfracseed !< cellular automata seed probability
integer :: nseed !< cellular automata seed frequency
logical :: do_ca !< cellular automata main switch
logical :: ca_sgs !< switch for sgs ca
logical :: ca_global !< switch for global ca
logical :: ca_smooth !< switch for gaussian spatial filter
logical :: isppt_deep !< switch for combination with isppt_deep. OBS! Switches off SPPT on other tendencies!
integer :: iseed_ca !< seed for random number generation in ca scheme
integer :: nspinup !< number of iterations to spin up the ca
real(kind=kind_phys) :: nthresh !< threshold used for perturbed vertical velocity
!--- stochastic physics control parameters
logical :: do_sppt
logical :: use_zmtnblck
logical :: do_shum
logical :: do_skeb
integer :: skeb_npass
logical :: do_sfcperts
integer :: nsfcpert=6
real(kind=kind_phys) :: pertz0(5) ! mg, sfc-perts
real(kind=kind_phys) :: pertzt(5) ! mg, sfc-perts
real(kind=kind_phys) :: pertshc(5) ! mg, sfc-perts
real(kind=kind_phys) :: pertlai(5) ! mg, sfc-perts
real(kind=kind_phys) :: pertalb(5) ! mg, sfc-perts
real(kind=kind_phys) :: pertvegf(5) ! mg, sfc-perts
!--- tracer handling
character(len=32), pointer :: tracer_names(:) !< array of initialized tracers from dynamic core
integer :: ntrac !< number of tracers
integer :: ntoz !< tracer index for ozone mixing ratio
integer :: ntcw !< tracer index for cloud condensate (or liquid water)
integer :: ntiw !< tracer index for ice water
integer :: ntrw !< tracer index for rain water
integer :: ntsw !< tracer index for snow water
integer :: ntgl !< tracer index for graupel
integer :: ntal !< tracer index for aerosol
integer :: ntclamt !< tracer index for cloud amount
integer :: ntlnc !< tracer index for liquid number concentration
integer :: ntinc !< tracer index for ice number concentration
integer :: ntrnc !< tracer index for rain number concentration
integer :: ntsnc !< tracer index for snow number concentration
integer :: ntgnc !< tracer index for graupel number concentration
integer :: ntke !< tracer index for kinetic energy
integer :: nto !< tracer index for oxygen ion
integer :: nto2 !< tracer index for oxygen
integer :: ntwa !< tracer index for water friendly aerosol
integer :: ntia !< tracer index for ice friendly aerosol
integer :: ntchm !< number of chemical tracers
integer :: ntchs !< tracer index for first chemical tracer
logical, pointer :: ntdiag(:) => null() !< array to control diagnostics for chemical tracers
real(kind=kind_phys), pointer :: fscav(:) => null() !< array of aerosol scavenging coefficients
!--- derived totals for phy_f*d
integer :: ntot2d !< total number of variables for phyf2d
integer :: ntot3d !< total number of variables for phyf3d
integer :: num_p2d !< number of 2D arrays needed for microphysics
integer :: num_p3d !< number of 3D arrays needed for microphysics
integer :: nshoc_2d !< number of 2d fields for SHOC
integer :: nshoc_3d !< number of 3d fields for SHOC
integer :: ncnvcld3d !< number of convective 3d clouds fields
integer :: npdf3d !< number of 3d arrays associated with pdf based clouds/microphysics
integer :: nctp !< number of cloud types in Chikira-Sugiyama scheme
!--- debug flag
logical :: debug
logical :: pre_rad !< flag for testing purpose
logical :: do_ocean !< flag for slab ocean model
logical :: use_ext_sst !< flag for using external SST forcing (or any external SST dataset, passed from the dynamics or nudging)
!--- variables modified at each time step
integer :: ipt !< index for diagnostic printout point
logical :: lprnt !< control flag for diagnostic print out
logical :: lsswr !< logical flags for sw radiation calls
logical :: lslwr !< logical flags for lw radiation calls
real(kind=kind_phys) :: solhr !< hour time after 00z at the t-step
real(kind=kind_phys) :: solcon !< solar constant (sun-earth distant adjusted) [set via radupdate]
real(kind=kind_phys) :: slag !< equation of time ( radian ) [set via radupdate]
real(kind=kind_phys) :: sdec !< sin of the solar declination angle [set via radupdate]
real(kind=kind_phys) :: cdec !< cos of the solar declination angle [set via radupdate]
real(kind=kind_phys) :: clstp !< index used by cnvc90 (for convective clouds)
!< legacy stuff - does not affect forecast
real(kind=kind_phys) :: phour !< previous forecast hour
real(kind=kind_phys) :: fhour !< curent forecast hour
real(kind=kind_phys) :: zhour !< previous hour diagnostic buckets emptied
integer :: kdt !< current forecast iteration
integer :: kdt_prev !< last step
integer :: jdat(1:8) !< current forecast date and time
!< (yr, mon, day, t-zone, hr, min, sec, mil-sec)
integer :: imn !< initial forecast month
real(kind=kind_phys) :: julian !< julian day using midnight of January 1 of forecast year as initial epoch
integer :: yearlen !< length of the current forecast year in days
!--- IAU
integer :: iau_offset
real(kind=kind_phys) :: iau_delthrs ! iau time interval (to scale increments) in hours
character(len=240) :: iau_inc_files(7)! list of increment files
character(len=32) :: iau_forcing_var(20) ! list of tracers with IAU forcing
real(kind=kind_phys) :: iaufhrs(7) ! forecast hours associated with increment files
logical :: iau_filter_increments, iau_drymassfixer
contains
procedure :: init => control_initialize
procedure :: print => control_print
end type GFS_control_type
!--------------------------------------------------------------------
! GFS_grid_type
! grid data needed for interpolations and length-scale calculations
!--------------------------------------------------------------------
type GFS_grid_type
real (kind=kind_phys), pointer :: xlon (:) => null() !< grid longitude in radians, ok for both 0->2pi
!! or -pi -> +pi ranges
real (kind=kind_phys), pointer :: xlat (:) => null() !< grid latitude in radians, default to pi/2 ->
!! -pi/2 range, otherwise adj in subr called
real (kind=kind_phys), pointer :: xlat_d (:) => null() !< grid latitude in degrees, default to 90 ->
!! -90 range, otherwise adj in subr called
real (kind=kind_phys), pointer :: sinlat (:) => null() !< sine of the grids corresponding latitudes
real (kind=kind_phys), pointer :: coslat (:) => null() !< cosine of the grids corresponding latitudes
real (kind=kind_phys), pointer :: area (:) => null() !< area of the grid cell
real (kind=kind_phys), pointer :: dx (:) => null() !< relative dx for the grid cell
!--- grid-related interpolation data for prognostic ozone
real (kind=kind_phys), pointer :: ddy_o3 (:) => null() !< interpolation weight for ozone
integer, pointer :: jindx1_o3 (:) => null() !< interpolation low index for ozone
integer, pointer :: jindx2_o3 (:) => null() !< interpolation high index for ozone
!--- grid-related interpolation data for stratosphere water
real (kind=kind_phys), pointer :: ddy_h (:) => null() !< interpolation weight for h2o
integer, pointer :: jindx1_h (:) => null() !< interpolation low index for h2o
integer, pointer :: jindx2_h (:) => null() !< interpolation high index for h2o
contains
procedure :: create => grid_create !< allocate array data
end type GFS_grid_type
!-----------------------------------------------
! GFS_tbd_type
! data not yet assigned to a defined container
!-----------------------------------------------
type GFS_tbd_type
!--- radiation random seeds
integer, pointer :: icsdsw (:) => null() !< (rad. only) auxiliary cloud control arrays passed to main
integer, pointer :: icsdlw (:) => null() !< (rad. only) radiations. if isubcsw/isubclw (input to init)
!< (rad. only) are set to 2, the arrays contains provided
!< (rad. only) random seeds for sub-column clouds generators
!--- In
real (kind=kind_phys), pointer :: ozpl (:,:,:) => null() !< ozone forcing data
real (kind=kind_phys), pointer :: h2opl (:,:,:) => null() !< water forcing data
!--- active when ((.not. newsas .or. cal_pre) .and. random_clds)
real (kind=kind_phys), pointer :: rann (:,:) => null() !< random number array (0-1)
!--- In/Out
real (kind=kind_phys), pointer :: acv (:) => null() !< array containing accumulated convective clouds
real (kind=kind_phys), pointer :: acvb (:) => null() !< arrays used by cnvc90 bottom
real (kind=kind_phys), pointer :: acvt (:) => null() !< arrays used by cnvc90 top (cnvc90.f)
!--- Stochastic physics properties calculated in physics_driver
real (kind=kind_phys), pointer :: dtdtr (:,:) => null() !< temperature change due to radiative heating per time step (K)
real (kind=kind_phys), pointer :: dtotprcp (:) => null() !< change in totprcp (diag_type)
real (kind=kind_phys), pointer :: dcnvprcp (:) => null() !< change in cnvprcp (diag_type)
real (kind=kind_phys), pointer :: drain_cpl (:) => null() !< change in rain_cpl (coupling_type)
real (kind=kind_phys), pointer :: dsnow_cpl (:) => null() !< change in show_cpl (coupling_type)
!--- phy_f*d variables needed for seamless restarts and moving data between grrad and gbphys
real (kind=kind_phys), pointer :: phy_fctd (:,:) => null() !< For CS convection
real (kind=kind_phys), pointer :: phy_f2d (:,:) => null() !< 2d arrays saved for restart
real (kind=kind_phys), pointer :: phy_f3d (:,:,:) => null() !< 3d arrays saved for restart
contains
procedure :: create => tbd_create !< allocate array data
end type GFS_tbd_type
!------------------------------------------------------------------
! GFS_cldprop_type
! cloud properties and tendencies needed by radiation from physics
!------------------------------------------------------------------
type GFS_cldprop_type
!--- In (radiation)
!--- In/Out (physics)
real (kind=kind_phys), pointer :: cv (:) => null() !< fraction of convective cloud ; phys
real (kind=kind_phys), pointer :: cvt (:) => null() !< convective cloud top pressure in pa ; phys
real (kind=kind_phys), pointer :: cvb (:) => null() !< convective cloud bottom pressure in pa ; phys, cnvc90
contains
procedure :: create => cldprop_create !< allocate array data
end type GFS_cldprop_type
!-----------------------------------------
! GFS_radtend_type
! radiation tendencies needed by physics
!-----------------------------------------
type GFS_radtend_type
type (sfcfsw_type), pointer :: sfcfsw(:) => null() !< sw radiation fluxes at sfc
!< [dim(im): created in grrad.f], components:
!! (check module_radsw_parameters for definition)
!!\n %upfxc - total sky upward sw flux at sfc (w/m**2)
!!\n %upfx0 - clear sky upward sw flux at sfc (w/m**2)
!!\n %dnfxc - total sky downward sw flux at sfc (w/m**2)
!!\n %dnfx0 - clear sky downward sw flux at sfc (w/m**2)
type (sfcflw_type), pointer :: sfcflw(:) => null() !< lw radiation fluxes at sfc
!< [dim(im): created in grrad.f], components:
!! (check module_radlw_paramters for definition)
!!\n %upfxc - total sky upward lw flux at sfc (w/m**2)
!!\n %upfx0 - clear sky upward lw flux at sfc (w/m**2)
!!\n %dnfxc - total sky downward lw flux at sfc (w/m**2)
!!\n %dnfx0 - clear sky downward lw flux at sfc (w/m**2)