UPP (upp-srw-2.2.0)
Loading...
Searching...
No Matches
CTLBLK.f
1 module ctlblk_mod
2!-----------------------------------------------------------------------
3! module: CTLBLK
4!
5! ABSTRACT:
6! this module is replacing the CTLBLK.comm, all the comm block is
7! removed.
8! Revision Log:
9! 2011-02 Jun Wang - ADD variables for grib2
10! 2011-12-14 SARAH LU - ADD AER FILENAME
11! 2011-12-23 SARAH LU - ADD NBIN FOR DU, SS, OC, BC, SU
12! 2021-09-30 JESSE MENG - 2D DECOMPOSITION
13! 2022-09-22 Li(Kate) Zhang - Add option for NASA GOCART as "nasa_on", add NBIN for NO3 and NH4
14! 2022-11-08 Kai Wang - Replace aqfcmaq_on with aqf_on
15! 2023-01-24 Sam Trahan - IFI flight levels, runtime of IFI, and record of the bucket time
16! 2023-03-21 Jesse Meng - Add slrutah_on option to use U Utah SLR
17! 2023-04-04 Li(Kate Zhang) Add namelist optoin for CCPP-Chem (UFS-Chem)
18! and 2D diag. output (d2d_chem) for GEFS-Aerosols and CCPP-Chem model.
19! 2023-04-17 Eric James - Adding 160 and 320 m above ground to HTFD for RRFS output.
20!-----------------------------------------------------------------------
21!
22 implicit none
23!
26 integer ifld
28 integer lvl
31 integer lvl1,lvl2
33 integer ntrange
35 integer tinvstat
36 end type
37 integer, parameter :: komax=70
38 integer, parameter :: lsmdef=46 ! default number of p levels
39 integer,PARAMETER :: nfd=20,nbnd=6
40 REAL, PARAMETER :: qmin = 1.e-15
41!
42 integer :: novegtype ! max number of veg type
43!
44 character(len=256) :: filename,filenameflux,filenamed3d,filenameaer, &
45 filenameflat
46 character(len=19) :: datestr
47 character(len=4) :: modelname, submodelname
48 character(len=8) :: fullmodelname
49 character(len=20) :: ioform
50 character(len=4) :: vtimeunits
51!
52 character(5) :: grib
53 type(field_info),allocatable :: fld_info(:)
54 integer :: cfld,ntlfld,npset
55 real*8 :: gdsdegr
56 real,allocatable :: datapd(:,:,:)
57!
58 logical :: gocart_on, gccpp_on, nasa_on, d3d_on, hyb_sigp, rdaod, d2d_chem, aqf_on, slrutah_on
59 logical :: sigma,run,first,restrt
60 logical :: global
61 logical :: smflag
62 integer :: idat(5),ihrst, nfcst,nbc,list,iout,ifhr,ntstm, &
63 nddamp,nprec,idtad,nboco,nshde,ncp,imdlty,nphs, &
64 nrads,nradl,imin,ifmin,datahandle,imp_physics, &
65 icu_physics,isf_surface_physics,isec,icount_calmict, &
66 ivegsrc
67 real :: dt,sdat(3),avrain,avcnvc,dtq2,pt,pdtop, &
68 spl(komax),alsl(komax),prec_acc_dt,pt_tbl,prec_acc_dt1,spval
69! real :: SPVAL=9.9e10 ! Moorthi
70!
71 integer :: num_procs,me,jsta,jend,ista,iend, &
72 jsta_m,jend_m, jsta_m2,jend_m2, &
73 ista_m,iend_m,ista_m2,iend_m2, &
74 iup,idn,icnt(0:1023),idsp(0:1023), icnt2(0:1023),idsp2(0:1023), &
75 jsta_2l, jend_2u,jvend_2u, &
76 ista_2l, iend_2u,ivend_2u, &
77 num_servers, mpi_comm_inter, &
78 mpi_comm_comp, im,jm,lm,nsoil,lp1,lm1,im_jm, &
79 ileft,iright, &
80 ileftb,irightb , &
81 ibsize,ibsum, &
82 lsm,lsmp1 !comm mpi
83 integer, allocatable :: icoords(:,:),ibcoords(:,:)
84 real , allocatable :: rcoords(:,:),rbcoords(:,:)
85 real, allocatable :: bufs(:),buff(:)
86 integer , allocatable :: isxa(:),iexa(:),jsxa(:),jexa(:)
87 integer numx
88 integer, allocatable :: ibufs(:)
89 real, allocatable :: rbufs(:)
90!
91 real :: ardsw, ardlw, asrfc, tsrfc,trdlw,trdsw,tclod,theat, &
92 tprec,tmaxmin,td3d !comm rad
93!
94 real pthresh ! moved from params because it is defined differently for NAM
95!
96 real(kind=8) :: etafld2_tim=0.,eta2p_tim=0.,surfce2_tim=0., &
97 cldrad_tim=0.,miscln_tim=0.,fixed_tim=0., &
98 mdl2sigma_tim=0.,readxml_tim=0.,mdl2agl_tim=0., &
99 mdl2std_tim=0.,mdl2thandpv_tim=0., &
100 calrad_wcloud_tim=0.,run_ifi_tim=0. !comm tim_info
101!
102 real(kind=8) :: time_output=0., time_e2out=0. !comm jjt
103!
104 real :: spldef(lsmdef) = &
105 (/200.,500.,700.,1000.,2000.,3000. &
106 ,5000.,7000.,7500.,10000.,12500.,15000.,17500.,20000.,22500. &
107 ,25000.,27500.,30000.,32500.,35000.,37500.,40000.,42500.,45000. &
108 ,47500.,50000.,52500.,55000.,57500.,60000.,62500.,65000. &
109 ,67500.,70000.,72500.,75000.,77500.,80000.,82500.,85000. &
110 ,87500.,90000.,92500.,95000.,97500.,100000./)
111!
112 REAL htfd(nfd),petabnd(nbnd),sigbnd(nbnd)
113
114! Add GOCART aerosol specification
115 integer, parameter :: nbin_du = 5 ! dust
116 integer, parameter :: nbin_ss = 5 ! sea salt
117 integer, parameter :: nbin_oc = 2 ! organic carbon
118 integer, parameter :: nbin_bc = 2 ! black carbon
119 integer, parameter :: nbin_su = 1 ! sulfate
120 integer, parameter :: nbin_no3 = 3 ! nitrate
121 integer, parameter :: nbin_nh4 = 1 ! NH4
122 integer, parameter :: nbin_sm = 1 ! smoke
123!
124! SET FD LEVEL HEIGHTS IN GEOPOTENTAL METERS.
125 DATA htfd / 20.e0,30.e0,40.e0,50.e0,80.e0,100.e0,160.e0,305.e0,320.e0,457.e0,610.e0, &
126 914.e0,1524.e0,1829.e0,2134.e0,2743.e0,3658.e0,4572.e0, &
127 6000.e0,7010.e0/
128!
129! SET MIDPOINT "SIGMA" VALUES FOR ETA BOUNDARY LAYERS.
130 DATA sigbnd / 0.985,0.955,0.925,0.895,0.865,0.835 /
131 DATA petabnd / 15.,45.,75.,105.,135.,165./
132!
133! Precipitation bucket time
134 real :: itprec=-1
135!
136! Flight levels in feet, provided by libIFI
137 integer :: ifi_nflight = 0
138 real, allocatable :: ifi_flight_levels(:) ! units are FEET
139!
140!-----------------------------------------------------------------------
141 end module ctlblk_mod