[1529] | 1 | module radcommon_h |
---|
[2283] | 2 | use radinc_h, only: L_NSPECTI, L_NSPECTV, NTstart, NTstop, & |
---|
[2972] | 3 | nsizemax |
---|
[135] | 4 | implicit none |
---|
| 5 | |
---|
| 6 | !----------------------------------------------------------------------C |
---|
| 7 | ! |
---|
| 8 | ! radcommon.h |
---|
| 9 | ! |
---|
| 10 | !----------------------------------------------------------------------C |
---|
| 11 | ! |
---|
| 12 | ! "Include" grid.h and radinc.h before this file in code that uses |
---|
| 13 | ! some or all of this common data set |
---|
| 14 | ! |
---|
| 15 | ! WNOI - Array of wavenumbers at the spectral interval |
---|
| 16 | ! centers for the infrared. Array is NSPECTI |
---|
| 17 | ! elements long. |
---|
| 18 | ! DWNI - Array of "delta wavenumber", i.e., the width, |
---|
| 19 | ! in wavenumbers (cm^-1) of each IR spectral |
---|
| 20 | ! interval. NSPECTI elements long. |
---|
| 21 | ! WAVEI - Array (NSPECTI elements long) of the wavelenght |
---|
| 22 | ! (in microns) at the center of each IR spectral |
---|
| 23 | ! interval. |
---|
| 24 | ! WNOV - Array of wavenumbers at the spectral interval |
---|
| 25 | ! center for the VISUAL. Array is NSPECTV |
---|
| 26 | ! elements long. |
---|
| 27 | ! DWNV - Array of "delta wavenumber", i.e., the width, |
---|
| 28 | ! in wavenumbers (cm^-1) of each VISUAL spectral |
---|
| 29 | ! interval. NSPECTV elements long. |
---|
| 30 | ! WAVEV - Array (NSPECTV elements long) of the wavelenght |
---|
| 31 | ! (in microns) at the center of each VISUAL spectral |
---|
| 32 | ! interval. |
---|
| 33 | ! STELLARF - Array (NSPECTV elements) of stellar flux (W/M^2) in |
---|
| 34 | ! each spectral interval. Values are for 1 AU, |
---|
| 35 | ! scaled to the planetary distance elsewhere. |
---|
| 36 | ! TAURAY - Array (NSPECTV elements) of the pressure-independent |
---|
| 37 | ! part of Rayleigh scattering optical depth. |
---|
[1016] | 38 | ! TAURAYVAR - Array (NSPECTV elements) of the pressure-independent |
---|
| 39 | ! part of Rayleigh scattering optical depth for the variable gas. |
---|
[135] | 40 | ! FZEROI - Fraction of zeros in the IR CO2 k-coefficients, for |
---|
| 41 | ! each temperature, pressure, and spectral interval |
---|
| 42 | ! FZEROV - Fraction of zeros in the VISUAL CO2 k-coefficients, for |
---|
| 43 | ! each temperature, pressure, and spectral interval |
---|
| 44 | ! |
---|
| 45 | ! AEROSOL RADIATIVE OPTICAL CONSTANTS |
---|
| 46 | ! |
---|
| 47 | ! Shortwave |
---|
| 48 | ! ~~~~~~~~~ |
---|
| 49 | ! |
---|
| 50 | ! For the "naerkind" kind of aerosol radiative properties : |
---|
| 51 | ! QVISsQREF : Qext / Qext("longrefvis") |
---|
| 52 | ! omegavis : single scattering albedo |
---|
| 53 | ! gvis : assymetry factor |
---|
| 54 | ! |
---|
| 55 | ! Longwave |
---|
| 56 | ! ~~~~~~~~ |
---|
| 57 | ! |
---|
| 58 | ! For the "naerkind" kind of aerosol radiative properties : |
---|
[2297] | 59 | ! QIRsQREF : Qext / Qext("longrefir") |
---|
[135] | 60 | ! omegaIR : mean single scattering albedo |
---|
| 61 | ! gIR : mean assymetry factor |
---|
[2297] | 62 | ! |
---|
| 63 | ! |
---|
| 64 | ! Note - QIRsQREF in the martian model was scaled to longrefvis, |
---|
| 65 | ! here it is scaled to longrefir, which is actually a dummy parameter, |
---|
| 66 | ! as we do not output scaled aerosol opacity ... |
---|
| 67 | ! |
---|
[135] | 68 | |
---|
[1315] | 69 | REAL*8 BWNI(L_NSPECTI+1), WNOI(L_NSPECTI), DWNI(L_NSPECTI), WAVEI(L_NSPECTI) !BWNI read by master in setspi |
---|
| 70 | REAL*8 BWNV(L_NSPECTV+1), WNOV(L_NSPECTV), DWNV(L_NSPECTV), WAVEV(L_NSPECTV) !BWNV read by master in setspv |
---|
[1016] | 71 | REAL*8 STELLARF(L_NSPECTV), TAURAY(L_NSPECTV), TAURAYVAR(L_NSPECTV) |
---|
[1315] | 72 | !$OMP THREADPRIVATE(WNOI,DWNI,WAVEI,& |
---|
| 73 | !$OMP WNOV,DWNV,WAVEV,& |
---|
| 74 | !$OMP STELLARF,TAURAY,TAURAYVAR) |
---|
[135] | 75 | |
---|
| 76 | REAL*8 blami(L_NSPECTI+1) |
---|
| 77 | REAL*8 blamv(L_NSPECTV+1) ! these are needed by suaer.F90 |
---|
[1315] | 78 | !$OMP THREADPRIVATE(blami,blamv) |
---|
[135] | 79 | |
---|
[873] | 80 | !! AS: introduced to avoid doing same computations again for continuum |
---|
[878] | 81 | INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indi |
---|
| 82 | INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: indv |
---|
[1315] | 83 | !$OMP THREADPRIVATE(indi,indv) |
---|
[873] | 84 | |
---|
[470] | 85 | !!! ALLOCATABLE STUFF SO THAT DIMENSIONS ARE READ in *.dat FILES -- AS 12/2011 |
---|
| 86 | REAL*8, DIMENSION(:,:,:,:,:), ALLOCATABLE :: gasi, gasv |
---|
[2026] | 87 | REAL*8, DIMENSION(:), ALLOCATABLE :: PGASREF, TGASREF, WREFVAR, PFGASREF, GWEIGHT |
---|
[135] | 88 | real*8 FZEROI(L_NSPECTI) |
---|
| 89 | real*8 FZEROV(L_NSPECTV) |
---|
| 90 | real*8 pgasmin, pgasmax |
---|
| 91 | real*8 tgasmin, tgasmax |
---|
[1315] | 92 | !$OMP THREADPRIVATE(gasi,gasv,& !wrefvar,pgasref,tgasref,pfgasref read by master in sugas_corrk |
---|
| 93 | !$OMP FZEROI,FZEROV) !pgasmin,pgasmax,tgasmin,tgasmax read by master in sugas_corrk |
---|
[135] | 94 | |
---|
[2972] | 95 | real,allocatable,save :: QVISsQREF(:,:,:) |
---|
| 96 | real,allocatable,save :: omegavis(:,:,:) |
---|
| 97 | real,allocatable,save :: gvis(:,:,:) |
---|
| 98 | real,allocatable,save :: QIRsQREF(:,:,:) |
---|
| 99 | real,allocatable,save :: omegair(:,:,:) |
---|
| 100 | real,allocatable,save :: gir(:,:,:) |
---|
[1315] | 101 | !$OMP THREADPRIVATE(QVISsQREF,omegavis,gvis,QIRsQREF,omegair,gir) |
---|
[135] | 102 | |
---|
| 103 | |
---|
| 104 | ! Reference wavelengths used to compute reference optical depth (m) |
---|
| 105 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 106 | |
---|
[2972] | 107 | real,allocatable,save :: lamrefir(:),lamrefvis(:) |
---|
| 108 | !$OMP THREADPRIVATE(lamrefir,lamrefvis) |
---|
[135] | 109 | ! Actual number of grain size classes in each domain for a |
---|
| 110 | ! given aerosol: |
---|
| 111 | |
---|
[2972] | 112 | integer,allocatable,save :: nsize(:,:) |
---|
| 113 | !$OMP THREADPRIVATE(nsize) ! nsize filled by suaer_corrk |
---|
[135] | 114 | |
---|
| 115 | ! Particle size axis (depend on the kind of aerosol and the |
---|
| 116 | ! radiation domain) |
---|
| 117 | |
---|
[2972] | 118 | double precision,allocatable,save :: radiustab(:,:,:) |
---|
| 119 | !$OMP THREADPRIVATE(radiustab) |
---|
[135] | 120 | |
---|
| 121 | ! Extinction coefficient at reference wavelengths; |
---|
| 122 | ! These wavelengths are defined in aeroptproperties, and called |
---|
| 123 | ! longrefvis and longrefir. |
---|
| 124 | |
---|
[2972] | 125 | real,allocatable,save :: QREFvis(:,:) |
---|
| 126 | real,allocatable,save :: QREFir(:,:) |
---|
[2033] | 127 | ! REAL :: omegaREFvis(naerkind,nsizemax) |
---|
[2972] | 128 | real,allocatable,save :: omegaREFir(:,:) |
---|
[135] | 129 | |
---|
[1529] | 130 | REAL,SAVE :: tstellar ! Stellar brightness temperature (SW) |
---|
[135] | 131 | |
---|
[2283] | 132 | REAL*8, DIMENSION(:,:), ALLOCATABLE, SAVE :: planckir |
---|
[135] | 133 | |
---|
[1529] | 134 | real*8,save :: PTOP |
---|
[135] | 135 | |
---|
[1529] | 136 | real*8,parameter :: UBARI = 0.5D0 |
---|
[135] | 137 | |
---|
[2142] | 138 | !$OMP THREADPRIVATE(QREFvis,QREFir,omegaREFir,& ! gweight read by master in sugas_corrk |
---|
[1715] | 139 | !$OMP tstellar,planckir,PTOP) |
---|
[135] | 140 | |
---|
| 141 | ! If the gas optical depth (top to the surface) is less than |
---|
| 142 | ! this value, we place that Gauss-point into the "zeros" |
---|
| 143 | ! channel. |
---|
| 144 | real*8, parameter :: TLIMIT = 1.0D-30 |
---|
| 145 | |
---|
| 146 | ! Factor to convert pressures from millibars to Pascals |
---|
| 147 | real*8, parameter :: SCALEP = 1.00D+2 |
---|
| 148 | |
---|
[959] | 149 | real*8, parameter :: sigma = 5.67032D-8 |
---|
[1194] | 150 | real*8, parameter :: grav = 6.672E-11 |
---|
[135] | 151 | |
---|
[1529] | 152 | real*8,save :: Cmk |
---|
| 153 | real*8,save :: glat_ig |
---|
[1315] | 154 | !$OMP THREADPRIVATE(Cmk,glat_ig) |
---|
[135] | 155 | |
---|
[1133] | 156 | ! extinction of incoming sunlight (Saturn's rings, eclipses, etc...) |
---|
[1529] | 157 | REAL, DIMENSION(:), ALLOCATABLE ,SAVE :: eclipse |
---|
[135] | 158 | |
---|
[1194] | 159 | !Latitude-dependent gravity |
---|
[1529] | 160 | REAL, DIMENSION(:), ALLOCATABLE , SAVE :: glat |
---|
[1315] | 161 | !$OMP THREADPRIVATE(glat,eclipse) |
---|
[1194] | 162 | |
---|
[2972] | 163 | contains |
---|
| 164 | |
---|
| 165 | subroutine ini_radcommon_h(naerkind) |
---|
| 166 | ! Initialize module variables |
---|
| 167 | implicit none |
---|
| 168 | integer,intent(in) :: naerkind |
---|
| 169 | |
---|
| 170 | allocate(QVISsQREF(L_NSPECTV,naerkind,nsizemax)) |
---|
| 171 | allocate(omegavis(L_NSPECTV,naerkind,nsizemax)) |
---|
| 172 | allocate(gvis(L_NSPECTV,naerkind,nsizemax)) |
---|
| 173 | allocate(QIRsQREF(L_NSPECTI,naerkind,nsizemax)) |
---|
| 174 | allocate(omegair(L_NSPECTI,naerkind,nsizemax)) |
---|
| 175 | allocate(gir(L_NSPECTI,naerkind,nsizemax)) |
---|
| 176 | |
---|
| 177 | allocate(lamrefir(naerkind)) |
---|
| 178 | allocate(lamrefvis(naerkind)) |
---|
| 179 | allocate(nsize(naerkind,2)) |
---|
| 180 | allocate(radiustab(naerkind,2,nsizemax)) |
---|
| 181 | |
---|
| 182 | allocate(QREFvis(naerkind,nsizemax)) |
---|
| 183 | allocate(QREFir(naerkind,nsizemax)) |
---|
| 184 | allocate(omegaREFir(naerkind,nsizemax)) |
---|
| 185 | |
---|
| 186 | end subroutine ini_radcommon_h |
---|
| 187 | |
---|
[1529] | 188 | end module radcommon_h |
---|