|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Go to the source code of this file.
Functions | |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE (m_cloud_chamber_config.active, "Cloud Chamber: initializer reached without a parsed configuration") | |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE (sc.anelastic[lev]==1 &&sc.fixed_density[lev]==1, "Cloud Chamber: the selected level must use fixed-density anelastic dynamics") | |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE (sc.terrain_type==TerrainType::None &&sc.buildings_type==BuildingsType::None &&sc.mesh_type==MeshType::ConstantDz, "Cloud Chamber: terrain, buildings, and non-Cartesian mesh modes are unsupported") | |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE (erf_cloud_chamber::supports_moisture_model(sc.moisture_type), "Cloud Chamber: unsupported moisture model in custom initializer") | |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE (m_cloud_chamber_config.has_moisture==(sc.moisture_type !=MoistureType::None), "Cloud Chamber: moisture-model selection and chamber configuration disagree") | |
| ParallelFor (bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real x=prob_lo[0]+(Real(i)+Real(0.5)) *dx[0];const Real y=prob_lo[1]+(Real(j)+Real(0.5)) *dx[1];const Real z=prob_lo[2]+(Real(k)+Real(0.5)) *dx[2];const Real rho=state(i, j, k, Rho_comp);const Real temperature=erf_cloud_chamber::linear_profile(config.initial_temperature_bottom, config.initial_temperature_top, z, config.prob_lo[2], config.prob_hi[2] - config.prob_lo[2])+erf_cloud_chamber::deterministic_perturbation(x, y, z, config.prob_lo, GpuArray< Real, AMREX_SPACEDIM >{ config.prob_hi[0] - config.prob_lo[0], config.prob_hi[1] - config.prob_lo[1], config.prob_hi[2] - config.prob_lo[2]}, config.temperature_perturbation_amplitude);const Real target_theta=config.physical_initialization ? temperature *std::pow(p_0/p_hse(i, j, k), rdOcp) :erf_cloud_chamber::theta_at(config, x, y, z);state_pert(i, j, k, RhoTheta_comp)=rho *target_theta - state(i, j, k, RhoTheta_comp);if(config.has_moisture) { const Real target_qv=config.physical_initialization ? erf_cloud_chamber::vapor_mixing_ratio_from_relative_humidity(temperature, p_hse(i, j, k), config.initial_relative_humidity) :erf_cloud_chamber::qv_at(config, z);state_pert(i, j, k, RhoQ1_comp)=rho *target_qv - state(i, j, k, RhoQ1_comp);state_pert(i, j, k, RhoQ2_comp)=-state(i, j, k, RhoQ2_comp);} }) | |
Variables | |
| const GpuArray< Real, AMREX_SPACEDIM > | prob_lo |
| const GpuArray< Real, AMREX_SPACEDIM > | dx |
| const auto | config = m_cloud_chamber_config |
| const Real | rdOcp = sc.rdOcp |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | erf_cloud_chamber::supports_moisture_model(sc.moisture_type) | , |
| "Cloud Chamber: unsupported moisture model in custom initializer" | |||
| ) |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | m_cloud_chamber_config. | active, |
| "Cloud Chamber: initializer reached without a parsed configuration" | |||
| ) |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | m_cloud_chamber_config. | has_moisture = =(sc.moisture_type !=MoistureType::None), |
| "Cloud Chamber: moisture-model selection and chamber configuration disagree" | |||
| ) |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | sc. | anelastic[lev] = =1 &&sc.fixed_density[lev]==1, |
| "Cloud Chamber: the selected level must use fixed-density anelastic dynamics" | |||
| ) |
| AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | sc. | terrain_type = =TerrainType::None &&sc.buildings_type==BuildingsType::None &&sc.mesh_type==MeshType::ConstantDz, |
| "Cloud Chamber: | terrain, | ||
| buildings | , | ||
| and non-Cartesian mesh modes are unsupported" | |||
| ) |
| ParallelFor | ( | bx | , |
| [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { const Real x=prob_lo[0]+(Real(i)+Real(0.5)) *dx[0];const Real y=prob_lo[1]+(Real(j)+Real(0.5)) *dx[1];const Real z=prob_lo[2]+(Real(k)+Real(0.5)) *dx[2];const Real rho=state(i, j, k, Rho_comp);const Real temperature=erf_cloud_chamber::linear_profile(config.initial_temperature_bottom, config.initial_temperature_top, z, config.prob_lo[2], config.prob_hi[2] - config.prob_lo[2])+erf_cloud_chamber::deterministic_perturbation(x, y, z, config.prob_lo, GpuArray< Real, AMREX_SPACEDIM >{ config.prob_hi[0] - config.prob_lo[0], config.prob_hi[1] - config.prob_lo[1], config.prob_hi[2] - config.prob_lo[2]}, config.temperature_perturbation_amplitude);const Real target_theta=config.physical_initialization ? temperature *std::pow(p_0/p_hse(i, j, k), rdOcp) :erf_cloud_chamber::theta_at(config, x, y, z);state_pert(i, j, k, RhoTheta_comp)=rho *target_theta - state(i, j, k, RhoTheta_comp);if(config.has_moisture) { const Real target_qv=config.physical_initialization ? erf_cloud_chamber::vapor_mixing_ratio_from_relative_humidity(temperature, p_hse(i, j, k), config.initial_relative_humidity) :erf_cloud_chamber::qv_at(config, z);state_pert(i, j, k, RhoQ1_comp)=rho *target_qv - state(i, j, k, RhoQ1_comp);state_pert(i, j, k, RhoQ2_comp)=-state(i, j, k, RhoQ2_comp);} } | |||
| ) |

| const auto config = m_cloud_chamber_config |
| const GpuArray<Real, AMREX_SPACEDIM> dx |
Referenced by ParallelFor().
| const GpuArray<Real, AMREX_SPACEDIM> prob_lo |
Referenced by ERF::ComputeGlobalMinLocation(), ForestDrag::define_drag_field(), ERF::ErrorEst(), ERF::FillForecastStateMultiFabs(), ERF::FillSurfaceStateMultiFabs(), ERF::FindInitialEye(), ERF::HurricaneEyeTrackerNotInitial(), ERF::HurricaneMaxVelTracker(), ERF::HurricaneMinPressureTracker(), if(), init_state_from_input_sounding(), init_state_from_input_sounding_hse(), init_velocities_from_input_sounding(), ERF::InitData_post(), erf_auxiliary::AuxiliaryInertTracer::initialize(), ParallelFor(), ParallelForRNG(), erf_terrain_file::ReadHeightTable(), ERF::setSpongeRefFromSounding(), ERF::sum_energy_quantities(), erf_terrain_file::TableProblem(), tag_on_distance_from_eye(), thinbody_wall_dist(), and writeNCPlotFile().
| const Real rdOcp = sc.rdOcp |
Referenced by ParallelFor().