1 | module rrsw_ncpar |
---|
2 | use parkind ,only : im => kind_im, rb => kind_rb |
---|
3 | |
---|
4 | implicit none |
---|
5 | save |
---|
6 | |
---|
7 | real(kind=rb), parameter :: cpdair = 1003.5 ! Specific heat capacity of dry air |
---|
8 | ! at constant pressure at 273 K |
---|
9 | ! (J kg-1 K-1) |
---|
10 | |
---|
11 | integer(kind=im), dimension(50) :: status |
---|
12 | integer(kind=im) :: i |
---|
13 | integer(kind=im), parameter :: keylower = 9, & |
---|
14 | keyupper = 5, & |
---|
15 | Tdiff = 5, & |
---|
16 | ps = 59, & |
---|
17 | plower = 13, & |
---|
18 | pupper = 47, & |
---|
19 | Tself = 10, & |
---|
20 | Tforeignlower = 3, & |
---|
21 | Tforeignupper = 2, & |
---|
22 | pforeign = 4, & |
---|
23 | T = 19, & |
---|
24 | band = 14, & |
---|
25 | GPoint = 16, & |
---|
26 | GPointSet = 2 |
---|
27 | |
---|
28 | integer(kind=im), parameter :: maxAbsorberNameLength = 5, & |
---|
29 | Absorber = 12, & |
---|
30 | maxKeySpeciesNameLength = 3, & |
---|
31 | maxKeySpeciesNames = 2 |
---|
32 | |
---|
33 | character(len = maxAbsorberNameLength), dimension(Absorber), parameter :: & |
---|
34 | AbsorberNames = (/ & |
---|
35 | 'N2 ', & |
---|
36 | 'CCL4 ', & |
---|
37 | 'CFC11', & |
---|
38 | 'CFC12', & |
---|
39 | 'CFC22', & |
---|
40 | 'H2O ', & |
---|
41 | 'CO2 ', & |
---|
42 | 'O3 ', & |
---|
43 | 'N2O ', & |
---|
44 | 'CO ', & |
---|
45 | 'CH4 ', & |
---|
46 | 'O2 ' /) |
---|
47 | |
---|
48 | character(len = maxKeySpeciesNameLength), dimension(band,maxKeySpeciesNames), parameter :: & |
---|
49 | KeySpeciesNamesLower = RESHAPE( SOURCE = (/ 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', & |
---|
50 | 'H2O', 'H2O', 'H2O', ' ', 'O3 ', 'O3 ', 'H2O', & |
---|
51 | 'CH4', 'CO2', 'CH4', 'CO2', ' ', 'CO2', 'O2 ', & |
---|
52 | ' ', 'O2 ', ' ', ' ', ' ', 'O2 ', ' ' /), & |
---|
53 | SHAPE = (/ band, maxKeySpeciesNames /) ) |
---|
54 | |
---|
55 | character(len = maxKeySpeciesNameLength), dimension(band,maxKeySpeciesNames), parameter :: & |
---|
56 | KeySpeciesNamesUpper = RESHAPE( SOURCE = (/ 'CH4', 'H2O', 'CH4', 'CO2', 'H2O', 'H2O', 'O2 ', & |
---|
57 | ' ', 'O2 ', ' ', ' ', 'O3 ', 'O3 ', 'CO2', & |
---|
58 | ' ', 'CO2', ' ', ' ', ' ', 'CO2', ' ', & |
---|
59 | ' ', ' ', ' ', ' ', ' ', 'O2 ', ' ' /), & |
---|
60 | SHAPE = (/ band, maxKeySpeciesNames /) ) |
---|
61 | |
---|
62 | integer(kind=im), dimension(band) :: BandNums = (/ 16, 17, 18, 19, 20, 21, 22, & |
---|
63 | 23, 24, 25, 26, 27, 28, 29 /) |
---|
64 | |
---|
65 | real(kind=rb), dimension(keylower) :: KeySpeciesLower = (/ 1.0, 0.125, 0.25, 0.375, & |
---|
66 | 0.50, 0.625, 0.75, 0.875, 1.0 /) |
---|
67 | |
---|
68 | real(kind=rb), dimension(keyupper) :: KeySpeciesUpper = (/ 0.0, 0.25, 0.50, 0.75, 1.0 /) |
---|
69 | |
---|
70 | real(kind=rb), dimension(Tdiff) :: TempDiffs = (/ -30, -15, 0, 15, 30 /) |
---|
71 | |
---|
72 | real(kind=rb), dimension(Tself) :: TempSelf = (/ 245.6,252.8,260.0,267.2,274.4, & |
---|
73 | 281.6,288.8,296.0,303.2,310.4 /) |
---|
74 | |
---|
75 | real(kind=rb), dimension(Tforeignlower) :: TempForeignlower = (/ 296, 260, 224 /) |
---|
76 | |
---|
77 | real(kind=rb), dimension(Tforeignupper) :: TempForeignupper = (/ 224, 260 /) |
---|
78 | |
---|
79 | real(kind=rb), dimension(pforeign) :: PressForeign = (/ 970, 475, 219, 3 /) |
---|
80 | |
---|
81 | real(kind=rb), dimension(T) :: Temp = (/188.0, 195.2, 202.4, 209.6, 216.8, 224.0, & |
---|
82 | 231.2, 238.4, 245.6, 252.8, 260.0, 267.2, & |
---|
83 | 274.4, 281.6, 288.8, 296.0, 303.2, 310.4, 317.6 /) |
---|
84 | |
---|
85 | contains |
---|
86 | |
---|
87 | subroutine getAbsorberIndex(AbsorberName,AbsorberIndex) |
---|
88 | character(len = *), intent(in) :: AbsorberName |
---|
89 | integer(kind=im), intent(out) :: AbsorberIndex |
---|
90 | |
---|
91 | integer(kind=im) :: m |
---|
92 | |
---|
93 | AbsorberIndex = -1 |
---|
94 | do m = 1, Absorber |
---|
95 | if (trim(AbsorberNames(m)) == trim(AbsorberName)) then |
---|
96 | AbsorberIndex = m |
---|
97 | end if |
---|
98 | end do |
---|
99 | |
---|
100 | if (AbsorberIndex == -1) then |
---|
101 | print*, "Absorber name index lookup failed." |
---|
102 | end if |
---|
103 | end subroutine getAbsorberIndex |
---|
104 | |
---|
105 | end module rrsw_ncpar |
---|