624 real obliqr, lambm0, mvelpp;
629 if (eccen >= 0 && obliq >= 0 && mvelp >= 0) {
634 mvelp, obliqr, lambm0, mvelpp);
640 static constexpr
real dpm = (365.0/12.0);
642 orbital_decl(calday, eccen, mvelpp, lambm0, obliqr, delta, eccf);
646 if (fixed_total_solar_irradiance >= 0){
647 eccf = fixed_total_solar_irradiance/1360.9;
654 for (
int igas(0); igas <
m_ngas; ++igas) {
658 parallel_for(SimpleBounds<2>(ncol, nlay), YAKL_LAMBDA (
int icol,
int ilay)
662 }
else if (name ==
"CO2") {
664 }
else if (name ==
"O3") {
668 parallel_for(SimpleBounds<2>(ncol, nlay), YAKL_LAMBDA (
int icol,
int ilay)
673 }
else if (name ==
"N2O") {
675 }
else if (name ==
"CO") {
677 }
else if (name ==
"CH4") {
679 }
else if (name ==
"O2") {
681 }
else if (name ==
"N2") {
684 Abort(
"Radiation: Unknown gas component.");
699 realHost1d h_mu0(
"h_mu0", ncol);
703 realHost1d h_lat(
"h_lat", ncol);
704 realHost1d h_lon(
"h_lon", ncol);
705 lat.deep_copy_to(h_lat);
706 lon.deep_copy_to(h_lon);
707 parallel_for(ncol, YAKL_LAMBDA (
int icol)
711 real lat_col = h_lat(icol)*
PI/180.0;
712 real lon_col = h_lon(icol)*
PI/180.0;
713 real lcalday = calday;
718 h_mu0.deep_copy_to(
mu0);
725 parallel_for(SimpleBounds<2>(ncol, nlay), YAKL_LAMBDA (
int icol,
int ilay)
727 lwp(icol,ilay) *= 1.e3;
728 iwp(icol,ilay) *= 1.e3;
760 yakl::memset(
mu0, 0.86);
777 parallel_for( SimpleBounds<2>(nlay,ncol) , YAKL_LAMBDA (
int ilay,
int icol)
780 (
p_lay(icol,ilay) < 900._wp * 100._wp) &&
824 const int kbot = nlay + 1;
825 parallel_for(SimpleBounds<3>(ncol, nlay+1, nswbands), YAKL_LAMBDA (
int icol,
int ilay,
int ibnd)
static constexpr int ORB_UNDEF_INT
Definition: ERF_Constants.H:96
constexpr amrex::Real mwdair
Definition: ERF_Constants.H:64
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
double real
Definition: ERF_OrbCosZenith.H:9
real orbital_cos_zenith(real &jday, real &lat, real &lon, real &declin, real dt_avg, real uniform_angle, real constant_zenith_angle_deg)
Definition: ERF_OrbCosZenith.cpp:4
void orbital_params(int &iyear_AD, real &eccen, real &obliq, real &mvelp, real &obliqr, real &lambm0, real &mvelpp)
Definition: ERF_OrbCosZenith.cpp:139
void orbital_decl(real &calday, real &eccen, real &mvelpp, real &lambm0, real &obliqr, real &delta, real &eccf)
Definition: ERF_OrbCosZenith.cpp:512
amrex::Real m_dt
Definition: ERF_Radiation.H:128
int m_orbital_mon
Definition: ERF_Radiation.H:222
int m_orbital_sec
Definition: ERF_Radiation.H:224
int m_orbital_day
Definition: ERF_Radiation.H:223
CloudOptics cloud_optics_sw
Definition: ERF_RRTMGP_Interface.cpp:34
void compute_band_by_band_surface_albedos(const int ncol, const int nswbands, real1d &sfc_alb_dir_vis, real1d &sfc_alb_dir_nir, real1d &sfc_alb_dif_vis, real1d &sfc_alb_dif_nir, real2d &sfc_alb_dir, real2d &sfc_alb_dif)
Definition: ERF_RRTMGP_Interface.cpp:268
void rrtmgp_main(const int ncol, const int nlay, real2d &p_lay, real2d &t_lay, real2d &p_lev, real2d &t_lev, GasConcs &gas_concs, real2d &sfc_alb_dir, real2d &sfc_alb_dif, real1d &mu0, real2d &lwp, real2d &iwp, real2d &rel, real2d &rei, real2d &cldfrac, real3d &aer_tau_sw, real3d &aer_ssa_sw, real3d &aer_asm_sw, real3d &aer_tau_lw, real3d &cld_tau_sw_bnd, real3d &cld_tau_lw_bnd, real3d &cld_tau_sw_gpt, real3d &cld_tau_lw_gpt, real2d &sw_flux_up, real2d &sw_flux_dn, real2d &sw_flux_dn_dir, real2d &lw_flux_up, real2d &lw_flux_dn, real2d &sw_clnclrsky_flux_up, real2d &sw_clnclrsky_flux_dn, real2d &sw_clnclrsky_flux_dn_dir, real2d &sw_clrsky_flux_up, real2d &sw_clrsky_flux_dn, real2d &sw_clrsky_flux_dn_dir, real2d &sw_clnsky_flux_up, real2d &sw_clnsky_flux_dn, real2d &sw_clnsky_flux_dn_dir, real2d &lw_clnclrsky_flux_up, real2d &lw_clnclrsky_flux_dn, real2d &lw_clrsky_flux_up, real2d &lw_clrsky_flux_dn, real2d &lw_clnsky_flux_up, real2d &lw_clnsky_flux_dn, real3d &sw_bnd_flux_up, real3d &sw_bnd_flux_dn, real3d &sw_bnd_flux_dn_dir, real3d &lw_bnd_flux_up, real3d &lw_bnd_flux_dn, const real tsi_scaling, const bool extra_clnclrsky_diag, const bool extra_clnsky_diag)
Definition: ERF_RRTMGP_Interface.cpp:391
void compute_heating_rate(yakl::Array< T, 2, myMem, myStyle > const &flux_up, yakl::Array< T, 2, myMem, myStyle > const &flux_dn, yakl::Array< T, 2, myMem, myStyle > const &rho, yakl::Array< T, 2, myMem, myStyle > const &dz, yakl::Array< T, 2, myMem, myStyle > &heating_rate)
Definition: ERF_RRTMGP_Utils.H:73
void compute_broadband_surface_fluxes(const int ncol, const int ktop, const int nswbands, real3d &sw_bnd_flux_dir, real3d &sw_bnd_flux_dif, real1d &sfc_flux_dir_vis, real1d &sfc_flux_dir_nir, real1d &sfc_flux_dif_vis, real1d &sfc_flux_dif_nir)
Definition: ERF_RRTMGP_Interface.cpp:328
void mixing_ratio_to_cloud_mass(yakl::Array< T, 2, myMem, myStyle > const &mixing_ratio, yakl::Array< T, 2, myMem, myStyle > const &cloud_fraction, yakl::Array< T, 2, myMem, myStyle > const &dp, yakl::Array< T, 2, myMem, myStyle > &cloud_mass)
Definition: ERF_RRTMGP_Utils.H:23