1 #ifndef ERF_RADIATION_H
2 #define ERF_RADIATION_H
23 #include <mo_gas_concentrations.h>
27 #include <AMReX_ParmParse.H>
28 #include <AMReX_FArrayBox.H>
29 #include <AMReX_Geometry.H>
30 #include <AMReX_TableData.H>
31 #include <AMReX_MultiFabUtil.H>
32 #include <AMReX_PlotFileUtil.H>
57 const amrex::Real& dt,
58 const amrex::BoxArray& ba,
59 amrex::Geometry& geom,
60 amrex::MultiFab* cons_in,
61 amrex::MultiFab* lsm_fluxes,
62 amrex::MultiFab* lsm_zenith,
63 amrex::MultiFab* qheating_rates,
64 amrex::MultiFab* z_phys,
66 amrex::MultiFab*
lon);
105 amrex::Print() <<
"Advancing radiation at level: " <<
m_lev <<
" ...";
109 amrex::Print() <<
"DONE\n";
180 const std::vector<std::string>
m_gas_names = {
"H2O",
"CO2",
"O3",
"N2O",
181 "CO" ,
"CH4",
"O2",
"N2" };
183 28.01010, 16.04246, 31.9980, 28.0134};
Definition: ERF_Radiation.H:42
amrex::MultiFab * m_lon
Definition: ERF_Radiation.H:157
real2d z_del
Definition: ERF_Radiation.H:277
real2d qv_lay
Definition: ERF_Radiation.H:279
real1d sfc_flux_dif_nir
Definition: ERF_Radiation.H:269
real2d sw_clrsky_flux_up
Definition: ERF_Radiation.H:303
real1d sfc_alb_dif_vis
Definition: ERF_Radiation.H:264
int m_o3_size
Definition: ERF_Radiation.H:196
real2d sw_clrsky_flux_dn_dir
Definition: ERF_Radiation.H:305
real2d lw_flux_dn
Definition: ERF_Radiation.H:299
std::string rrtmgp_coeffs_file_sw
Definition: ERF_Radiation.H:173
std::string rrtmgp_coeffs_sw
Definition: ERF_Radiation.H:169
real1d sfc_flux_dir_vis
Definition: ERF_Radiation.H:266
int m_rad_freq_in_steps
Definition: ERF_Radiation.H:251
real2d lw_clrsky_flux_dn
Definition: ERF_Radiation.H:312
real2d sw_clnclrsky_flux_dn
Definition: ERF_Radiation.H:301
void dealloc_buffers()
Definition: ERF_Radiation.cpp:297
amrex::Real m_lon_cons
Definition: ERF_Radiation.H:161
void initialize_impl()
Definition: ERF_Radiation.cpp:603
int m_nswbands
Definition: ERF_Radiation.H:245
bool m_do_aerosol_rad
Definition: ERF_Radiation.H:212
std::string rrtmgp_coeffs_lw
Definition: ERF_Radiation.H:170
bool m_moist
Definition: ERF_Radiation.H:143
real2d sw_clnsky_flux_dn
Definition: ERF_Radiation.H:307
std::string rrtmgp_cloud_optics_file_lw
Definition: ERF_Radiation.H:176
real2d sw_clnsky_flux_up
Definition: ERF_Radiation.H:306
real3d cld_tau_lw_bnd
Definition: ERF_Radiation.H:338
amrex::MultiFab * m_cons_in
Definition: ERF_Radiation.H:147
Radiation(const int &lev, SolverChoice &sc)
Definition: ERF_Radiation.cpp:23
real3d aero_ssa_sw
Definition: ERF_Radiation.H:332
real2d qi_lay
Definition: ERF_Radiation.H:281
bool m_do_subcol_sampling
Definition: ERF_Radiation.H:254
bool m_rad_write_fluxes
Definition: ERF_Radiation.H:140
real2d sw_flux_dn_dir
Definition: ERF_Radiation.H:297
real1d sfc_flux_dif_vis
Definition: ERF_Radiation.H:268
real2d lw_clrsky_flux_up
Definition: ERF_Radiation.H:311
real1d lat
Definition: ERF_Radiation.H:270
real2d iwp
Definition: ERF_Radiation.H:287
real2d t_lev
Definition: ERF_Radiation.H:294
std::string rrtmgp_cloud_optics_file_sw
Definition: ERF_Radiation.H:175
void run_impl()
Definition: ERF_Radiation.cpp:614
real2d sw_clnclrsky_flux_dn_dir
Definition: ERF_Radiation.H:302
int m_step
Definition: ERF_Radiation.H:122
real2d lw_clnsky_flux_dn
Definition: ERF_Radiation.H:314
amrex::Real m_orbital_mvelp
Definition: ERF_Radiation.H:232
real2d eff_radius_qc
Definition: ERF_Radiation.H:283
amrex::Vector< amrex::Real > m_o3vmr
Definition: ERF_Radiation.H:187
std::string rrtmgp_cloud_optics_sw
Definition: ERF_Radiation.H:171
void finalize_impl()
Definition: ERF_Radiation.cpp:837
int m_nlwgpts
Definition: ERF_Radiation.H:248
real3d sw_bnd_flux_dif
Definition: ERF_Radiation.H:320
real2d sw_heating
Definition: ERF_Radiation.H:288
amrex::MultiFab * m_z_phys
Definition: ERF_Radiation.H:153
void mf_to_yakl_buffers()
Definition: ERF_Radiation.cpp:395
real2d sfc_alb_dir
Definition: ERF_Radiation.H:327
real3d aero_tau_sw
Definition: ERF_Radiation.H:331
real2d r_lay
Definition: ERF_Radiation.H:274
std::string rrtmgp_cloud_optics_lw
Definition: ERF_Radiation.H:172
amrex::Real m_co2vmr
Definition: ERF_Radiation.H:186
bool m_extra_clnsky_diag
Definition: ERF_Radiation.H:215
real1d o3_lay
Definition: ERF_Radiation.H:257
amrex::MultiFab * m_lsm_fluxes
Definition: ERF_Radiation.H:164
amrex::BoxArray m_ba
Definition: ERF_Radiation.H:134
real2d sfc_alb_dif
Definition: ERF_Radiation.H:328
int m_ncol
Definition: ERF_Radiation.H:205
real2d sw_clnclrsky_flux_up
Definition: ERF_Radiation.H:300
const std::vector< amrex::Real > m_mol_weight_gas
Definition: ERF_Radiation.H:182
real3d cld_tau_lw_gpt
Definition: ERF_Radiation.H:342
real1d sfc_flux_dir_nir
Definition: ERF_Radiation.H:267
real1d lon
Definition: ERF_Radiation.H:271
real3d lw_bnd_flux_up
Definition: ERF_Radiation.H:323
amrex::Real m_lat_cons
Definition: ERF_Radiation.H:160
amrex::Real m_fixed_total_solar_irradiance
Definition: ERF_Radiation.H:237
real3d cld_tau_sw_gpt
Definition: ERF_Radiation.H:341
amrex::Real m_dt
Definition: ERF_Radiation.H:128
real3d lw_bnd_flux_dn
Definition: ERF_Radiation.H:324
int m_orbital_mon
Definition: ERF_Radiation.H:222
amrex::Real m_o2vmr
Definition: ERF_Radiation.H:191
real2d lw_flux_up
Definition: ERF_Radiation.H:298
amrex::MultiFab * m_qheating_rates
Definition: ERF_Radiation.H:150
real1d mu0
Definition: ERF_Radiation.H:261
amrex::Real m_n2ovmr
Definition: ERF_Radiation.H:188
real3d sw_bnd_flux_up
Definition: ERF_Radiation.H:317
real2d cldfrac_tot
Definition: ERF_Radiation.H:282
real3d aero_tau_lw
Definition: ERF_Radiation.H:334
real3d sw_bnd_flux_dn
Definition: ERF_Radiation.H:318
std::string rrtmgp_file_path
Definition: ERF_Radiation.H:168
real1d cosine_zenith
Definition: ERF_Radiation.H:260
amrex::MultiFab * m_lsm_zenith
Definition: ERF_Radiation.H:165
real2d p_lay
Definition: ERF_Radiation.H:275
int m_nlwbands
Definition: ERF_Radiation.H:246
real2d lw_clnclrsky_flux_up
Definition: ERF_Radiation.H:309
real2d lw_heating
Definition: ERF_Radiation.H:289
amrex::Real m_orbital_eccen
Definition: ERF_Radiation.H:230
real2d lw_clnclrsky_flux_dn
Definition: ERF_Radiation.H:310
real3d aero_g_sw
Definition: ERF_Radiation.H:333
amrex::Real m_covmr
Definition: ERF_Radiation.H:189
int m_orbital_sec
Definition: ERF_Radiation.H:224
real1d sfc_alb_dif_nir
Definition: ERF_Radiation.H:265
void write_rrtmgp_fluxes()
Definition: ERF_Radiation.cpp:568
std::string rrtmgp_coeffs_file_lw
Definition: ERF_Radiation.H:174
int m_lev
Definition: ERF_Radiation.H:119
real1d sfc_alb_dir_vis
Definition: ERF_Radiation.H:262
int m_ngas
Definition: ERF_Radiation.H:179
real2d p_del
Definition: ERF_Radiation.H:278
real2d t_lay
Definition: ERF_Radiation.H:276
void yakl_buffers_to_mf()
Definition: ERF_Radiation.cpp:505
void set_grids(int &level, int &step, amrex::Real &time, const amrex::Real &dt, const amrex::BoxArray &ba, amrex::Geometry &geom, amrex::MultiFab *cons_in, amrex::MultiFab *lsm_fluxes, amrex::MultiFab *lsm_zenith, amrex::MultiFab *qheating_rates, amrex::MultiFab *z_phys, amrex::MultiFab *lat, amrex::MultiFab *lon)
Definition: ERF_Radiation.cpp:116
amrex::Real m_ch4vmr
Definition: ERF_Radiation.H:190
bool m_update_rad
Definition: ERF_Radiation.H:137
bool m_ice
Definition: ERF_Radiation.H:144
amrex::Real m_fixed_solar_zenith_angle
Definition: ERF_Radiation.H:241
real2d sw_flux_up
Definition: ERF_Radiation.H:295
real2d p_lev
Definition: ERF_Radiation.H:293
int m_orbital_day
Definition: ERF_Radiation.H:223
real2d lw_clnsky_flux_up
Definition: ERF_Radiation.H:313
real1d sfc_alb_dir_nir
Definition: ERF_Radiation.H:263
amrex::Real m_orbital_obliq
Definition: ERF_Radiation.H:231
amrex::Real m_n2vmr
Definition: ERF_Radiation.H:192
bool m_fixed_orbital_year
Definition: ERF_Radiation.H:229
int m_nlay
Definition: ERF_Radiation.H:206
real2d lwp
Definition: ERF_Radiation.H:286
int m_nswgpts
Definition: ERF_Radiation.H:247
const std::vector< std::string > m_gas_names
Definition: ERF_Radiation.H:180
bool m_extra_clnclrsky_diag
Definition: ERF_Radiation.H:216
real2d sw_clnsky_flux_dn_dir
Definition: ERF_Radiation.H:308
void rad_run_impl()
Definition: ERF_Radiation.H:102
amrex::Geometry m_geom
Definition: ERF_Radiation.H:131
amrex::MultiFab * m_lat
Definition: ERF_Radiation.H:156
string1dv gas_names_yakl_offset
Definition: ERF_Radiation.H:198
real3d cld_tau_sw_bnd
Definition: ERF_Radiation.H:337
amrex::Vector< int > m_col_offsets
Definition: ERF_Radiation.H:209
real2d eff_radius_qi
Definition: ERF_Radiation.H:284
real2d tmp2d
Definition: ERF_Radiation.H:285
real2d qc_lay
Definition: ERF_Radiation.H:280
GasConcs m_gas_concs
Definition: ERF_Radiation.H:199
real2d sw_flux_dn
Definition: ERF_Radiation.H:296
void alloc_buffers()
Definition: ERF_Radiation.cpp:186
int m_orbital_year
Definition: ERF_Radiation.H:221
real2d sw_clrsky_flux_dn
Definition: ERF_Radiation.H:304
real2d d_tint
Definition: ERF_Radiation.H:292
real1d m_gas_mol_weights
Definition: ERF_Radiation.H:197
amrex::Real m_time
Definition: ERF_Radiation.H:125
real3d sw_bnd_flux_dir
Definition: ERF_Radiation.H:319
Definition: ERF_DataStruct.H:82