|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <cmath>#include <limits>#include <AMReX_REAL.H>#include <AMReX_GpuQualifiers.H>#include <AMReX_Math.H>#include "ERF_NumericalConstants.H"
Go to the source code of this file.
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool | is_valid_lsm_value (amrex::Real v) |
Variables | |
| constexpr amrex::Real | bogus_large_value = amrex::Real(1.e150) |
| constexpr amrex::Real | lsm_undefined = bogus_large_value |
| constexpr amrex::Real | immersed_neutral_obukhov_length = amrex::Real(1.0e10) |
| constexpr amrex::Real | lsm_max_precip_interval = amrex::Real(500.0) |
| constexpr amrex::Real | R_d = amrex::Real(287.0) |
| constexpr amrex::Real | R_v = amrex::Real(461.505) |
| constexpr amrex::Real | Cp_d = amrex::Real(1004.5) |
| constexpr amrex::Real | Cp_v = amrex::Real(1859.0) |
| constexpr amrex::Real | Cp_l = amrex::Real(4200.0) |
| constexpr amrex::Real | Cp_i = amrex::Real(2106.0) |
| constexpr amrex::Real | epsv = R_v / R_d - one |
| constexpr amrex::Real | RdoCp = R_d / Cp_d |
| constexpr amrex::Real | CpoRd = Cp_d / R_d |
| constexpr amrex::Real | RvoRd = R_v / R_d |
| constexpr amrex::Real | RdoRv = R_d / R_v |
| constexpr amrex::Real | epsilo = RdoRv |
| constexpr amrex::Real | omeps = one - epsilo |
| constexpr amrex::Real | L_v = amrex::Real(2.5e6) |
| constexpr amrex::Real | p_0 = amrex::Real(1.0e5) |
| constexpr amrex::Real | Gamma = amrex::Real(1.4) |
| constexpr amrex::Real | KAPPA = amrex::Real(0.41) |
| constexpr amrex::Real | CONST_GRAV = amrex::Real(9.81) |
| constexpr amrex::Real | ip_0 = one/p_0 |
| constexpr amrex::Real | iR_d = one/R_d |
| constexpr amrex::Real | iGamma = one/Gamma |
| constexpr amrex::Real | boltz = amrex::Real(1.38065e-23) |
| constexpr amrex::Real | avogadro = amrex::Real(6.02214e26) |
| constexpr amrex::Real | mwdair = amrex::Real(28.966) |
| static constexpr int | ORB_UNDEF_INT = 2000000000 |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool is_valid_lsm_value | ( | amrex::Real | v | ) |
Referenced by SurfaceModel::calculate_weight_average(), NOAHMP::interp_from_lev0(), SurfaceModel::interp_surface_fields_from_coarse(), erf_detail_SEBTurbulentFlux::overwrite_valid_land_surface_cells(), NOAHMP::stage_forcing(), SurfaceFluxView::valid(), and SurfaceModel::write_output().

|
constexpr |
|
constexpr |
Referenced by ERF::Advance(), erf_detail_PoissonWallDist::assert_surface_gathered(), ERF::BuildPlot3DScratch(), Compute_InvDt_Compressible(), MYNNPBLH::compute_pblh(), derived::erf_dermaxreflectivity(), ERF::ERF_shared(), ERF::estTimeStep(), ERF::fill_surface_nodes(), ERF::FillIntermediatePatch(), ERF::FillPatchFineLevel(), ERF::FindInitialEye(), ERF::HurricaneMaxVelTracker(), ERF::HurricaneMinPressureTracker(), ERF::init_only(), ERF::init_stuff(), init_which_terrain_grid(), interpolate_1d(), adiabatic::iterate_flux(), adiabatic_eb::iterate_flux(), adiabatic_mod_charnock::iterate_flux(), adiabatic_charnock::iterate_flux(), adiabatic_donelan::iterate_flux(), adiabatic_wave_coupled::iterate_flux(), surface_flux_charnock::iterate_flux(), surface_flux_mod_charnock::iterate_flux(), surface_flux_donelan::iterate_flux(), surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), surface_temp_donelan::iterate_flux(), surface_flux_wave_coupled::iterate_flux(), surface_temp_wave_coupled::iterate_flux(), surface_flux::iterate_flux(), surface_temp::iterate_flux(), surface_temp_eb::iterate_flux(), surface_flux_eb::iterate_flux(), MOSTAverage::make_MOSTAverage_at_level(), SurfaceLayer::make_SurfaceLayer_at_level(), make_terrain_fitted_coords(), ERF::MakeNewLevelFromCoarse(), pblh_is_diagnosed(), ReadBndryPlanes::read_file(), ReadBndryPlanes::read_input_files(), ERF::ReadCheckpointFile(), ERF::ReadVelsOnlyFromCheckpointFile(), ERF::RemakeLevel(), sample_perturbation_wind(), ObsNudging::surface(), and ERF::turbPert_update_automatic().
|
constexpr |
|
constexpr |
Referenced by ShocImplicit::advance_implicit_state(), WDM6::AdvanceColumns(), WSM6::AdvanceColumns(), SLM::AdvanceSLM(), erf_detail_ShocMoments::apply_second_moment_boundary_conditions(), ERF::build_nested_base_state(), calc_p_isothermal(), InputSoundingData::calc_rho_p(), InputSoundingData::calc_rho_p_isentropic(), TurbulentPerturbation::calc_tpi_amp(), calc_wstar(), Charnock_roughness(), ERF::check_base_state_hse(), TerminalVelocity< RT >::CloudRainShima(), COARE3_roughness(), rrtmgp::compute_aerocom_cloudtop(), ShocImplicit::compute_dp_inverse(), HSEutils::compute_F(), compute_if_most_target_vel(), SurfaceLayer::compute_sfc_params_from_lsm_fluxes(), SurfaceLayer::compute_SurfaceLayer_bcs(), HSEutils::compute_theta(), ShocImplicit::compute_tmpi(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ComputeQKESourceTerms(), ShocStructure::diagnose_length_and_brunt(), ShocStructure::diagnose_pblh(), ShocStructure::diagnose_surface_layer(), erf_surface_temperature::diagnose_surface_pressure(), ShocMoments::diagnose_third_moments(), ShocTKE::diagnose_tke_and_diffusivities(), Donelan_roughness(), derived::erf_dermucape(), SLM::fh_calc(), near_surface_diagnostics::fill(), ShocPreprocess::fill_columns(), ShocImplicit::finalize_from_pdf(), ERF::ibseb_bulk_richardson_height(), TerminalVelocity< RT >::IceBohm(), ImmersedForcingBuildings_Scalar(), ImmersedForcingTerrain_Scalar(), ImmersedForcingTerrain_Xmom(), ImmersedForcingTerrain_Ymom(), HSEutils::init_isentropic_hse_constant_dz(), HSEutils::init_isentropic_hse_stretched_dz(), HSEutils::init_isentropic_hse_terrain(), init_my_custom_terrain(), SolverChoice::init_params(), metgrid_surface_pressure(), shoc::moist_energy(), erf_cloud_chamber_wall_flux::most_wall_coefficients(), erf_surface_temperature::pressure_at_boundary_from_cell(), rebalance_columns(), ERF::rebuild_base_state_from_coarse(), sea_level_pressure_diagnostics::reconstruct_surface_pressure(), sea_level_pressure_diagnostics::reduce_surface_pressure_to_sea_level(), BaseStateParams::set_layer_interfaces(), ERF::sum_energy_quantities(), SurfaceLayer::update_fluxes(), ib_wall::wall_state(), and ib_wall::wall_tke().
|
constexpr |
Referenced by AddCanopyBiophysicsHeatSources(), WDM6::AdvanceColumns(), WSM6::AdvanceColumns(), SLM::AdvanceSLM(), shoc::apply_energy_fix_column(), apply_fire_tendency_to_cc_source(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_F_for_temp_in_zone(), rrtmgp::compute_heating_rate(), erf_detail_ShocPDF::compute_qs_beta(), compute_rh_from_conservative(), erf_detail_ShocPDF::compute_s_terms(), compute_t_from_conservative(), HSEutils::compute_theta(), ComputeLiquidWaterPotentialTemperature(), near_surface_diagnostics::fill(), ShocPreprocess::fill_columns(), ERF::FillPlot3DVars(), ShocImplicit::finalize_from_pdf(), make_sources(), shoc::moist_energy(), NOAHMP::read_results(), RadiationSimple::Run(), surface_flux_diagnostics::sensible_heat_flux_wm2_from_rhotheta_flux(), SurfaceLayer::set_sfc_params_from_file_fluxes(), SLM::solve_ground_skin_temperature(), ERF::sum_energy_quantities(), shoc::temperature_from_thetal(), shoc::theta_from_thetal(), shoc::thetal_from_theta(), SLM::transfer_coeff(), and vertical_two_stream_sweep().
|
constexpr |
Referenced by ERF::sum_energy_quantities().
|
constexpr |
|
constexpr |
Referenced by derived::erf_dermucape().
|
constexpr |
Referenced by SatMethods::wv_sat_svp_to_qsat().
Referenced by AddTurbKESources(), buoyancy_moist_Thpert(), buoyancy_moist_Tpert(), calc_wstar(), MOSTAverage::compute_eb_averages(), MOSTAverage::compute_plane_averages(), MOSTAverage::compute_region_averages(), SurfaceLayer::compute_sfc_params_from_lsm_fluxes(), SurfaceLayer::compute_SurfaceLayer_bcs(), ComputeDiffusivityMRF(), ComputeDiffusivityMYNN25(), ComputeDiffusivityYSU(), ComputeQKESourceTerms(), ComputeVirtualPotentialTemperature(), ComputeVirtualTStarPBL(), surface_flux_charnock::iterate_flux(), surface_flux_mod_charnock::iterate_flux(), surface_flux_donelan::iterate_flux(), surface_temp_charnock::iterate_flux(), surface_temp_mod_charnock::iterate_flux(), surface_temp_donelan::iterate_flux(), surface_flux_wave_coupled::iterate_flux(), surface_temp_wave_coupled::iterate_flux(), surface_flux::iterate_flux(), surface_temp::iterate_flux(), surface_temp_eb::iterate_flux(), surface_flux_eb::iterate_flux(), most_flux_outputs(), erf_cloud_chamber_wall_flux::most_wall_coefficients(), SLM::transfer_coeff(), SurfaceLayer::update_fluxes(), sea_level_pressure_diagnostics::virtual_temperature(), ib_wall::virtual_theta(), ib_wall::virtual_thetastar(), and ib_wall::wall_state().
|
constexpr |
Referenced by InputSoundingData::calc_rho_p_isentropic(), derived::erf_dersoundspeed(), erf_substep_MT(), erf_substep_NS(), erf_substep_T(), ERF::estTimeStep(), getdPdRgivenConstantTheta(), getExnergivenRTh(), getPgivenRTh(), getRhoThetagivenP(), getTgivenRandRTh(), make_fast_coeffs(), and ParallelFor().
Referenced by getRhogivenThetaPress(), getRhoThetagivenP(), and HSEutils::Newton_Raphson_hse().
|
constexpr |
Referenced by ComputeDiffusivityMRF(), ComputeDiffusivityYSU(), and SurfaceLayer::set_immersed_surface_params().
Referenced by getdPdRgivenConstantTheta(), getExnergivenP(), getExnergivenRTh(), getPgivenRTh(), and getTgivenRandRTh().
Referenced by getRhoThetagivenP().
|
constexpr |
Referenced by SLM::AdvanceSLM(), ApplySurfaceLayerGradientsPBL(), compute_if_most_target_vel(), Compute_roughness(), SurfaceLayer::compute_sfc_params_from_lsm_fluxes(), SurfaceLayer::compute_SurfaceLayer_bcs(), ComputeDiffusivityMRF(), ComputeDiffusivityMYJ(), ComputeDiffusivityMYNN25(), ComputeDiffusivityMYNNEDMF(), ComputeDiffusivityYSU(), ComputeQKESourceTerms(), ComputeTurbulentViscosityRANS(), ShocStructure::diagnose_length_and_brunt(), ShocStructure::diagnose_surface_layer(), near_surface_diagnostics::evaluate_most_profile(), near_surface_diagnostics::fill(), near_surface_diagnostics::fill_wind_10m(), ib_wall::friction_velocity(), ImmersedForcingBuildings_Scalar(), ImmersedForcingTerrain_Scalar(), ImmersedForcingTerrain_Xmom(), ImmersedForcingTerrain_Ymom(), make_log_law_inflow_profile(), erf_cloud_chamber_wall_flux::most_wall_coefficients(), erf_cloud_chamber_wall_flux::neutral_log_momentum_state(), erf_cloud_chamber_wall_flux::neutral_log_scalar_coefficient(), SurfaceLayer::update_fluxes(), ib_wall::wall_state(), and ib_wall::wall_tke().
|
constexpr |
Referenced by AddCanopyBiophysicsHeatSources(), shoc::apply_energy_fix_column(), apply_fire_tendency_to_cc_source(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_F_for_temp_in_zone(), erf_detail_ShocPDF::compute_qs_beta(), erf_detail_ShocPDF::compute_s_terms(), ComputeLiquidWaterPotentialTemperature(), shoc::condensate_latent_heat(), Kessler::Define(), ERF::FillPlot3DVars(), surface_flux_diagnostics::latent_heat_flux_wm2_from_rhoqv_flux(), shoc::latent_sublimation(), prognostic_dqs_dt(), NOAHMP::read_results(), SurfaceLayer::set_sfc_params_from_file_fluxes(), MaterialProperties::setProperties_H2O(), ForceRestoreSnow::step(), ForceRestoreHydrology::step(), and ERF::sum_energy_quantities().
|
constexpr |
Referenced by NOAHMP::report_precip_diagnostics(), and NOAHMP::stage_forcing().
|
constexpr |
Referenced by NOAHMP::Advance_With_State(), SurfaceModel::calculate_weight_average(), TwoStreamRadiation::define_level(), SurfaceModel::ensure_surface_outputs(), SurfaceLayer::get_lsm_tsurf(), SLM::Init(), NOAHMP::Init(), SurfaceModel::interp_surface_fields_from_coarse(), is_valid_lsm_value(), Radiation::mf_to_kokkos_buffers(), NOAHMP::read_results(), noahmp_result_policy::result_is_valid(), near_surface_diagnostics::valid_noahmp_component(), and valid_surface_temperature().
|
constexpr |
Referenced by Radiation::run_impl().
Referenced by SatMethods::wv_sat_svp_to_qsat().
|
staticconstexpr |
Referenced by orbital_params().
|
constexpr |
Referenced by apply_fire_tendency_to_cc_source(), erf_cloud_chamber_wall_flux::bulk_theta_flux_in(), calc_p_isothermal(), InputSoundingData::calc_rho_p_isentropic(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_F_for_temp_in_zone(), erf_detail_ShocPDF::compute_s_terms(), erf_detail_ShocPDF::compute_temperature(), diagnose_cloud_fraction_prognostic(), ERF::erf_enforce_hse(), erf_init_dens_hse_dry(), ERF::FillPlot3DVars(), getdPdRgivenConstantTheta(), getPgivenRTh(), getRhogivenThetaPress(), getRhoThetagivenP(), getTgivenPandTh(), getTgivenRandRTh(), getThgivenRandT(), getThgivenTandP(), HSEutils::init_isentropic_hse_constant_dz(), HSEutils::init_isentropic_hse_no_terrain_column(), HSEutils::init_isentropic_hse_stretched_dz(), HSEutils::init_isentropic_hse_terrain(), erf_cloud_chamber_wall_flux::most_wall_coefficients(), ParallelFor(), erf_cloud_chamber::parse_initialization(), rebalance_columns(), and erf_cloud_chamber_wall_flux::resolved_theta_flux_in().
|
constexpr |
Referenced by WDM6::AdvanceColumns(), WSM6::AdvanceColumns(), SLM::AdvanceSLM(), apply_fire_tendency_to_cc_source(), calc_p_isothermal(), InputSoundingData::calc_rho_p_isentropic(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_F_for_temp_in_zone(), erf_detail_ShocPDF::compute_qs_beta(), compute_rh_from_conservative(), compute_t_from_conservative(), erf_init_dens_hse_dry(), erf_substep_MT(), erf_substep_NS(), erf_substep_T(), near_surface_diagnostics::fill(), ERF::FillPlot3DVars(), getdPdRgivenConstantTheta(), getExnergivenRTh(), getPgivenRTh(), getRhogivenTandPress(), getRhogivenThetaPress(), getTgivenRandRTh(), getThgivenRandT(), if(), SolverChoice::init_params(), make_fast_coeffs(), metgrid_surface_pressure(), ParallelFor(), sea_level_pressure_diagnostics::reconstruct_surface_pressure(), sea_level_pressure_diagnostics::reduce_surface_pressure_to_sea_level(), RadiationSimple::Run(), BaseStateParams::set_layer_interfaces(), SLM::solve_ground_skin_temperature(), ERF::sum_energy_quantities(), and SLM::transfer_coeff().
|
constexpr |
Referenced by WDM6::AdvanceColumns(), WSM6::AdvanceColumns(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_F_for_temp_in_zone(), erf_detail_ShocPDF::compute_qs_beta(), erf_substep_T(), ERF::FillPlot3DVars(), sam_compute_coefficient_row(), MaterialProperties::setProperties_H2O(), MaterialProperties::setProperties_ice(), and ERF::sum_energy_quantities().
Referenced by buoyancy_dry_Tpert(), buoyancy_moist_Tpert(), InputSoundingData::calc_rho_p(), InputSoundingData::calc_rho_p_isentropic(), erf_detail_ShocPDF::compute_buoyancy_flux(), HSEutils::compute_rho(), erf_detail_ShocPDF::compute_s_terms(), erf_detail_ShocPDF::compute_temperature(), derived::erf_dermucape(), get_inverse_exner(), if(), lagrange_setup(), make_sources(), HSEutils::Newton_Raphson_hse(), ParallelFor(), rebalance_columns(), ERF::rebuild_base_state_from_coarse(), wdm6_theta_from_temperature_and_pressure(), and wsm6_theta_from_temperature_and_pressure().
Referenced by InputSoundingData::calc_rho_p_isentropic(), erf_substep_MT(), erf_substep_NS(), getdPdRgivenConstantTheta(), getExnergivenRTh(), getPgivenRTh(), getRhogivenTandPress(), getRhogivenThetaPress(), getRhoThetagivenP(), getTgivenRandRTh(), getThgivenRandT(), if(), make_fast_coeffs(), and ParallelFor().