5 #ifndef ERF_RAD_CONSTANTS_H
6 #define ERF_RAD_CONSTANTS_H
8 #include "rrtmgp_const.h"
9 using yakl::fortran::parallel_for;
10 using yakl::fortran::SimpleBounds;
25 {2600., 3250., 4000., 4650., 5150., 6150., 7700.,
26 8050., 12850., 16000., 22650., 29000., 38000., 820.};
29 {3250., 4000., 4650., 5150., 6150., 7700., 8050.,
30 12850.,16000., 22650., 29000., 38000., 50000., 2600.};
35 {12.11, 20.3600000000001, 23.73,
36 22.43, 55.63, 102.93, 24.29,
37 345.74, 218.19, 347.20,
38 129.49, 50.15, 3.08, 12.89};
42 static constexpr real
retab[] = { 5.92779, 6.26422, 6.61973, 6.99539, 7.39234,
43 7.81177, 8.25496, 8.72323, 9.21800, 9.74075, 10.2930,
44 10.8765, 11.4929, 12.1440, 12.8317, 13.5581, 14.2319,
45 15.0351, 15.8799, 16.7674, 17.6986, 18.6744, 19.6955,
46 20.7623, 21.8757, 23.0364, 24.2452, 25.5034, 26.8125,
47 27.7895, 28.6450, 29.4167, 30.1088, 30.7306, 31.2943,
48 31.8151, 32.3077, 32.7870, 33.2657, 33.7540, 34.2601,
49 34.7892, 35.3442, 35.9255, 36.5316, 37.1602, 37.8078,
50 38.4720, 39.1508, 39.8442, 40.5552, 41.2912, 42.0635,
51 42.8876, 43.7863, 44.7853, 45.9170, 47.2165, 48.7221,
52 50.4710, 52.4980, 54.8315, 57.4898, 60.4785, 63.7898,
53 65.5604, 71.2885, 75.4113, 79.7368, 84.2351, 88.8833,
54 93.6658, 98.5739, 103.603, 108.752, 114.025, 119.424,
55 124.954, 130.630, 136.457, 142.446, 148.608, 154.956,
56 161.503, 168.262, 175.248, 182.473, 189.952, 197.699,
57 205.728, 214.055, 222.694, 231.661, 240.971, 250.639};
77 static constexpr
int nrh = 1000;
90 {10., 350., 500., 630., 700., 820., 980., 1080.,
91 1180., 1390., 1480., 1800., 2080., 2250., 2390., 2600.};
94 {350., 500., 630., 700., 820., 980., 1080., 1180.,
95 1390., 1480., 1800., 2080., 2250., 2390., 2600., 3250.};
102 {
"H2O",
"O3",
"O2",
"CO2",
"N2O",
"CH4",
"CFC11",
"CFC12"};
152 real1d& high_boundaries,
157 for(
auto i = 0; i <
nlwbands; ++i) {
162 for(
auto i = 0; i <
nlwbands; ++i) {
167 for(
auto i = 0; i <
nlwbands; ++i) {
172 for(
auto i = 0; i <
nlwbands; ++i) {
177 for(
auto i = 0; i <
nlwbands; ++i) {
182 amrex::Print() <<
"get_lw_spectral_boundaries: spectral units not acceptable\n";
189 real1d lower_boundaries(
"lower_boundaries",
nlwbands);
190 real1d upper_boundaries(
"upper_boundaries",
nlwbands);
197 for(
auto iband = 0; iband <
nlwbands; ++iband) {
198 band_midpoints(iband) = 0.5*(lower_boundaries(iband) + upper_boundaries(iband));
209 for(
auto i = 0; i <
nswbands; ++i) {
214 for(
auto i = 0; i <
nswbands; ++i) {
219 for(
auto i = 0; i <
nswbands; ++i) {
224 for(
auto i = 0; i <
nswbands; ++i) {
229 for(
auto i = 0; i <
nswbands; ++i) {
234 amrex::Print() <<
"rad_constants.F90: spectral units not acceptable\n";
241 real1d lower_boundaries(
"lower_boundaries",
nswbands);
242 real1d upper_boundaries(
"upper_boundaries",
nswbands);
248 for(
auto iband = 0; iband <
nswbands; ++iband) {
249 band_midpoints(iband) = 0.5 * (lower_boundaries(iband) + upper_boundaries(iband));
257 for(
auto igas = 0; igas <
nradgas; ++igas) {
258 if (
gaslist[igas] == gasname)
return igas;
260 amrex::Abort(
"rad_gas_index: can not find gas with name " + gasname);
Definition: ERF_RadConstants.H:12
static constexpr real wavenum_high[]
Definition: ERF_RadConstants.H:28
static constexpr real solar_ref_band_irradiance[]
Definition: ERF_RadConstants.H:34
static void get_lw_spectral_midpoints(real1d &band_midpoints, Units units)
Definition: ERF_RadConstants.H:187
static void get_lw_spectral_boundaries(real1d &low_boundaries, real1d &high_boundaries, Units units)
Definition: ERF_RadConstants.H:151
static constexpr int nbndsw
Definition: ERF_RadConstants.H:16
Units
Definition: ERF_RadConstants.H:105
@ centimeter
Definition: ERF_RadConstants.H:110
@ meter
Definition: ERF_RadConstants.H:107
@ nanometer
Definition: ERF_RadConstants.H:108
@ inv_cm
Definition: ERF_RadConstants.H:106
@ micrometer
Definition: ERF_RadConstants.H:109
static int rad_gas_index(std::string gasname)
Definition: ERF_RadConstants.H:255
static void get_ref_total_solar_irrad(real &tsi)
Definition: ERF_RadConstants.H:127
static constexpr int idx_lw_diag
Definition: ERF_RadConstants.H:82
static constexpr int nlwbands
Definition: ERF_RadConstants.H:86
static constexpr int idx_nir_diag
Definition: ERF_RadConstants.H:61
static void get_sw_spectral_boundaries(real1d &low_boundaries, real1d &high_boundaries, Units units)
Definition: ERF_RadConstants.H:205
static constexpr real wavenumber2_longwave[]
Definition: ERF_RadConstants.H:93
static constexpr int nbndlw
Definition: ERF_RadConstants.H:87
static constexpr int idx_sw_diag
Definition: ERF_RadConstants.H:60
static constexpr int nrh
Definition: ERF_RadConstants.H:77
static void get_solar_band_fraction_irrad(real1d &fractional_irradiance)
Definition: ERF_RadConstants.H:115
static constexpr real icesize_table_min_temp
Definition: ERF_RadConstants.H:41
static constexpr real wavenum_low[]
Definition: ERF_RadConstants.H:24
static constexpr int idx_uv_diag
Definition: ERF_RadConstants.H:62
static constexpr const char * gaslist[]
Definition: ERF_RadConstants.H:101
static constexpr int nswbands
Definition: ERF_RadConstants.H:15
static constexpr int nradgas
Definition: ERF_RadConstants.H:100
static constexpr int rrtmg_sw_cloudsim_band
Definition: ERF_RadConstants.H:64
static void get_sw_spectral_midpoints(real1d &band_midpoints, Units units)
Definition: ERF_RadConstants.H:239
static constexpr real wavenumber1_longwave[]
Definition: ERF_RadConstants.H:89
static void get_ref_solar_band_irrad(real1d &band_irrad)
Definition: ERF_RadConstants.H:136
static constexpr int rrtmg_lw_cloudsim_band
Definition: ERF_RadConstants.H:83
static constexpr real retab[]
Definition: ERF_RadConstants.H:42
static void get_number_sw_bands(int &number_of_bands)
Definition: ERF_RadConstants.H:144