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