Radiation Scheme in CCPP
radsw_param.f
Go to the documentation of this file.
1 !!!!! ============================================================== !!!!!
2 !!!!! sw-rrtm3 radiation package description !!!!!
3 !!!!! ============================================================== !!!!!
4 ! !
5 ! this package includes ncep's modifications of the rrtm-sw radiation !
6 ! code from aer inc. !
7 ! !
8 ! the sw-rrtm3 package includes these parts: !
9 ! !
10 ! 'radsw_rrtm3_param.f' !
11 ! 'radsw_rrtm3_datatb.f' !
12 ! 'radsw_rrtm3_main.f' !
13 ! !
14 ! the 'radsw_rrtm3_param.f' contains: !
15 ! !
16 ! 'module_radsw_parameters' -- band parameters set up !
17 ! !
18 ! the 'radsw_rrtm3_datatb.f' contains: !
19 ! !
20 ! 'module_radsw_ref' -- reference temperature and pressure !
21 ! 'module_radsw_cldprtb' -- cloud property coefficients table !
22 ! 'module_radsw_sflux' -- spectral distribution of solar flux !
23 ! 'module_radsw_kgbnn' -- absorption coeffients for 14 !
24 ! bands, where nn = 16-29 !
25 ! !
26 ! the 'radsw_rrtm3_main.f' contains: !
27 ! !
28 ! 'module_radsw_main' -- main sw radiation transfer !
29 ! !
30 ! in the main module 'module_radsw_main' there are only two !
31 ! externally callable subroutines: !
32 ! !
33 ! 'swrad' -- main rrtm3 sw radiation routine !
34 ! 'rswinit' -- initialization routine !
35 ! !
36 ! all the sw radiation subprograms become contained subprograms !
37 ! in module 'module_radsw_main' and many of them are not directly !
38 ! accessable from places outside the module. !
39 ! !
40 ! compilation sequence is: !
41 ! !
42 ! 'radsw_rrtm3_param.f' !
43 ! 'radsw_rrtm3_datatb.f' !
44 ! 'radsw_rrtm3_main.f' !
45 ! !
46 ! and all should be put in front of routines that use sw modules !
47 ! !
48 ! ncep modifications history log: !
49 ! !
50 ! see list in program "radsw_rrtm3_main.f" !
51 ! !
52 !!!!! ============================================================== !!!!!
53 !!!!! end descriptions !!!!!
54 !!!!! ============================================================== !!!!!
55 
57 !========================================!
59 !........................................!
60 
61  use physparam, only : kind_phys
62 
63  implicit none
64 !
65  public
66 !
67 ! --- define type construct for radiation fluxes at toa
68 !
70  type :: topfsw_type
72  real (kind=kind_phys) :: upfxc ! total sky upward flux at toa
74  real (kind=kind_phys) :: dnfxc ! total sky downward flux at toa
76  real (kind=kind_phys) :: upfx0 ! clear sky upward flux at toa
77  end type
78 !
79 ! --- define type construct for radiation fluxes at surface
80 !
82  type :: sfcfsw_type
84  real (kind=kind_phys) :: upfxc ! total sky upward flux at sfc
86  real (kind=kind_phys) :: dnfxc ! total sky downward flux at sfc
88  real (kind=kind_phys) :: upfx0 ! clear sky upward flux at sfc
90  real (kind=kind_phys) :: dnfx0 ! clear sky downward flux at sfc
91  end type
92 !
93 ! --- define type construct for optional radiation flux profiles
94 !
96  type :: profsw_type
98  real (kind=kind_phys) :: upfxc ! total sky level upward flux
100  real (kind=kind_phys) :: dnfxc ! total sky level downward flux
102  real (kind=kind_phys) :: upfx0 ! clear sky level upward flux
104  real (kind=kind_phys) :: dnfx0 ! clear sky level downward flux
105  end type
106 !
107 ! --- define type construct for optional component downward fluxes at surface
108 !
110  type :: cmpfsw_type
112  real (kind=kind_phys) :: uvbfc ! total sky downward uv-b flux at sfc
114  real (kind=kind_phys) :: uvbf0 ! clear sky downward uv-b flux at sfc
116  real (kind=kind_phys) :: nirbm ! sfc downward nir direct beam flux
118  real (kind=kind_phys) :: nirdf ! sfc downward nir diffused flux
120  real (kind=kind_phys) :: visbm ! sfc downward uv+vis direct beam flx
122  real (kind=kind_phys) :: visdf ! sfc downward uv+vis diffused flux
123  end type
124 !
125 ! --- parameter constants for sw band structures
126 !
128  integer, parameter :: nblow = 16 ! band range lower limit
130  integer, parameter :: nbhgh = 29 ! band range upper limit
132  integer, parameter :: nbands = nbhgh-nblow+1 ! num of spectral bands
134  integer, parameter :: ngptsw = 112 ! total num of g-point in all bands
136  integer, parameter :: ngmax = 16 ! max num of g-point in one band
138  integer, parameter :: maxgas = 7 ! max num of absorbing gases
140  integer, parameter :: ntbmx = 10000 ! indx upper lim of trans table
141 
142  integer, parameter :: nswstr = 1
143 ! integer, parameter :: NSWEND = NBANDS
144  integer, parameter :: nbdsw = nbands
145 
146 ! --- number of g-point in each band
147  integer :: ng16, ng17, ng18, ng19, ng20, ng21, ng22, &
148  & NG23, NG24, NG25, NG26, NG27, NG28, NG29
149  parameter ( ng16=06, ng17=12, ng18=08, ng19=08, ng20=10, &
150  & ng21=10, ng22=02, ng23=10, ng24=08, ng25=06, &
151  & ng26=06, ng27=08, ng28=06, ng29=12)
152 
153  integer, dimension(NBLOW:NBHGH) :: ng
154  data ng / ng16, ng17, ng18, ng19, ng20, ng21, ng22, &
155  & ng23, ng24, ng25, ng26, ng27, ng28, ng29 /
156 
157 ! --- starting index of each band
158  integer :: ns16, ns17, ns18, ns19, ns20, ns21, ns22, &
159  & NS23, NS24, NS25, NS26, NS27, NS28, NS29
160  parameter ( ns16=00, ns17=ns16+ng16, ns18=ns17+ng17, &
164  & ns28=ns27+ng27, ns29=ns28+ng28 )
165 
166  integer, dimension(NBLOW:NBHGH) :: ngs
167  data ngs / ns16, ns17, ns18, ns19, ns20, ns21, ns22, &
168  & ns23, ns24, ns25, ns26, ns27, ns28, ns29 /
169 
170 ! --- band index for each g-point
171  integer, dimension(NGPTSW) :: ngb
172  data ngb(:) / 16,16,16,16,16,16, & ! band 16
173  & 17,17,17,17,17,17,17,17,17,17,17,17, & ! band 17
174  & 18,18,18,18,18,18,18,18, & ! band 18
175  & 19,19,19,19,19,19,19,19, & ! band 19
176  & 20,20,20,20,20,20,20,20,20,20, & ! band 20
177  & 21,21,21,21,21,21,21,21,21,21, & ! band 21
178  & 22,22, & ! band 22
179  & 23,23,23,23,23,23,23,23,23,23, & ! band 23
180  & 24,24,24,24,24,24,24,24, & ! band 24
181  & 25,25,25,25,25,25, & ! band 25
182  & 26,26,26,26,26,26, & ! band 26
183  & 27,27,27,27,27,27,27,27, & ! band 27
184  & 28,28,28,28,28,28, & ! band 28
185  & 29,29,29,29,29,29,29,29,29,29,29,29 / ! band 29
186 
187 ! --- band wavenumber intervals
188  real (kind=kind_phys), dimension(NBANDS):: wvnum1, wvnum2
189  data wvnum1(:) / &
190  & 2600.0, 3251.0, 4001.0, 4651.0, 5151.0, 6151.0, 7701.0, &
191  & 8051.0,12851.0,16001.0,22651.0,29001.0,38001.0, 820.0 /
192  data wvnum2(:) / &
193  & 3250.0, 4000.0, 4650.0, 5150.0, 6150.0, 7700.0, 8050.0, &
194  & 12850.0,16000.0,22650.0,29000.0,38000.0,50000.0, 2600.0 /
195 
196 !
197 !........................................!
198  end module module_radsw_parameters !
199 !========================================!
integer, parameter nbands
number of spectral bands
Definition: radsw_param.f:132
define type construct for optional component downward fluxes at surface
Definition: radsw_param.f:110
integer, parameter nbhgh
band range upper limit
Definition: radsw_param.f:130
integer, parameter ntbmx
index upper limit of trans table
Definition: radsw_param.f:140
integer, parameter ngptsw
total number of g-point in all bands
Definition: radsw_param.f:134
define type construct for radiation fluxes at toa
Definition: radsw_param.f:70
real(kind=kind_phys), dimension(nbands) wvnum1
Definition: radsw_param.f:188
define type construct for radiation fluxes at surface
Definition: radsw_param.f:82
integer, parameter nbdsw
Definition: radsw_param.f:144
real(kind=kind_phys), dimension(nbands) wvnum2
Definition: radsw_param.f:188
This module defines commonly used control variables/parameters in physics related programs...
Definition: physparam.f:27
integer, parameter nswstr
Definition: radsw_param.f:142
This module contains SW band parameters set up.
Definition: radsw_param.f:58
integer, parameter nblow
band range lower limit
Definition: radsw_param.f:128
define type construct for optional radiation flux profiles
Definition: radsw_param.f:96
integer, dimension(nblow:nbhgh) ngs
Definition: radsw_param.f:166
integer, dimension(nblow:nbhgh) ng
Definition: radsw_param.f:153
integer, dimension(ngptsw) ngb
Definition: radsw_param.f:171
integer, parameter maxgas
max num of absorbing gases
Definition: radsw_param.f:138
integer, parameter ngmax
max num of g-point in one band
Definition: radsw_param.f:136