1 | module radinc_h |
---|
2 | |
---|
3 | implicit none |
---|
4 | |
---|
5 | include "bands.h" |
---|
6 | |
---|
7 | integer,save :: naerkind ! number of radiatively active aerosols |
---|
8 | ! set via inifis |
---|
9 | !$OMP THREADPRIVATE(naerkind) |
---|
10 | |
---|
11 | !====================================================================== |
---|
12 | ! |
---|
13 | ! RADINC.H |
---|
14 | ! |
---|
15 | ! Includes for the radiation code; RADIATION LAYERS, LEVELS, |
---|
16 | ! number of spectral intervals. . . |
---|
17 | ! |
---|
18 | !====================================================================== |
---|
19 | |
---|
20 | ! RADIATION parameters |
---|
21 | |
---|
22 | ! In radiation code, layer 1 corresponds to the stratosphere. Level |
---|
23 | ! 1 is the top of the stratosphere. The dummy layer is at the same |
---|
24 | ! temperature as the (vertically isothermal) stratosphere, and |
---|
25 | ! any time it is explicitly needed, the appropriate quantities will |
---|
26 | ! be dealt with (aka "top". . .) |
---|
27 | |
---|
28 | ! L_NLEVRAD corresponds to the surface - i.e., the GCM Level that |
---|
29 | ! is at the surface. PLEV(L_NLEVRAD) = P(J,I)+PTROP, |
---|
30 | ! PLEV(2) = PTROP, PLEV(1) = ptop |
---|
31 | |
---|
32 | ! L_NLAYRAD is the number of radiation code layers |
---|
33 | ! L_NLEVRAD is the number of radiation code levels. Level N is the |
---|
34 | ! top of layer N. |
---|
35 | ! |
---|
36 | ! L_NSPECTI is the number of IR spectral intervals |
---|
37 | ! L_NSPECTV is the number of Visual(or Solar) spectral intervals |
---|
38 | ! L_NGAUSS is the number of Gauss points for K-coefficients |
---|
39 | ! GAUSS POINT 17 (aka the last one) is the special case |
---|
40 | ! |
---|
41 | ! L_NPREF is the number of reference pressures that the |
---|
42 | ! k-coefficients are calculated on |
---|
43 | ! L_PINT is the number of Lagrange interpolated reference |
---|
44 | ! pressures for the gas k-coefficients - now for a |
---|
45 | ! smaller p-grid than before |
---|
46 | ! L_NTREF is the number of reference temperatures for the |
---|
47 | ! k-coefficients |
---|
48 | ! L_TAUMAX is the largest optical depth - larger ones are set |
---|
49 | ! to this value |
---|
50 | ! |
---|
51 | ! L_REFVAR The number of different mixing ratio values for |
---|
52 | ! the k-coefficients. Variable component of the mixture |
---|
53 | ! can in princple be anything: currently it's H2O. |
---|
54 | ! |
---|
55 | ! NAERKIND The number of radiatively active aerosol types |
---|
56 | ! |
---|
57 | ! NSIZEMAX The maximum number of aerosol particle sizes |
---|
58 | ! |
---|
59 | !---------------------------------------------------------------------- |
---|
60 | |
---|
61 | integer,save :: L_NLAYRAD ! = nbp_lev ! set by ini_radinc_h |
---|
62 | integer,save :: L_LEVELS ! = 2*(nbp_lev-1)+3 ! set by ini_radinc_h |
---|
63 | integer,save :: L_NLEVRAD ! = nbp_lev+1 ! set by ini_radinc_h |
---|
64 | !$OMP THREADPRIVATE(L_NLAYRAD,L_LEVELS,L_NLEVRAD) |
---|
65 | |
---|
66 | ! These are set in sugas_corrk |
---|
67 | ! [uses allocatable arrays] -- AS 12/2011 |
---|
68 | integer :: L_NPREF, L_NTREF, L_REFVAR, L_PINT, L_NGAUSS !L_NPREF, L_NTREF, L_REFVAR, L_PINT, L_NGAUSS read by master in sugas_corrk |
---|
69 | |
---|
70 | integer, parameter :: L_NSPECTI = NBinfrared |
---|
71 | integer, parameter :: L_NSPECTV = NBvisible |
---|
72 | |
---|
73 | ! integer, parameter :: NAERKIND = 2 ! set in scatterers.h |
---|
74 | real, parameter :: L_TAUMAX = 35 |
---|
75 | |
---|
76 | ! For Planck function integration: |
---|
77 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
78 | ! Integration boundary temperatures are NTstart/NTfac and Ntstop/NTfac |
---|
79 | ! -- JVO 20 : Now read boundary T and integration dT as inputs in callphys.def |
---|
80 | ! NTstart, Nstop and NTfac then set by ini_radinc_h |
---|
81 | ! Smart user can adjust values depending he's running hot or cold atm |
---|
82 | ! Default is wide range : 30K-1500K, with 0.1K step |
---|
83 | ! -> NTstart=300, Nstop=15000, NTfac=10 |
---|
84 | integer :: NTstart, NTstop |
---|
85 | real*8 :: NTfac |
---|
86 | |
---|
87 | ! Maximum number of grain size classes for aerosol convolution: |
---|
88 | ! This must correspond to size of largest dataset used for aerosol |
---|
89 | ! optical properties in datagcm folder. |
---|
90 | integer, parameter :: nsizemax = 60 |
---|
91 | |
---|
92 | character(len=100),save :: corrkdir |
---|
93 | !$OMP THREADPRIVATE(corrkdir) |
---|
94 | |
---|
95 | character(len=100),save :: banddir |
---|
96 | !$OMP THREADPRIVATE(banddir) |
---|
97 | |
---|
98 | contains |
---|
99 | |
---|
100 | subroutine ini_radinc_h(nbp_lev,tplanckmin,tplanckmax,dtplanck) |
---|
101 | ! Initialize module variables |
---|
102 | implicit none |
---|
103 | integer,intent(in) :: nbp_lev |
---|
104 | real*8, intent(in) :: tplanckmin |
---|
105 | real*8, intent(in) :: tplanckmax |
---|
106 | real*8, intent(in) :: dtplanck |
---|
107 | |
---|
108 | L_NLAYRAD = nbp_lev |
---|
109 | L_LEVELS = 2*(nbp_lev-1)+3 |
---|
110 | L_NLEVRAD = nbp_lev+1 |
---|
111 | |
---|
112 | NTfac = 1.D0 / dtplanck |
---|
113 | NTstart = int(tplanckmin * NTfac) |
---|
114 | NTstop = int(tplanckmax * NTfac) |
---|
115 | |
---|
116 | end subroutine |
---|
117 | |
---|
118 | end module radinc_h |
---|