|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_ProbCommon.H>

Public Member Functions | |
| virtual | ~ProblemBase ()=default |
| virtual void | erf_init_dens_hse_dry (amrex::MultiFab &, std::unique_ptr< amrex::MultiFab > &, std::unique_ptr< amrex::MultiFab > &, amrex::Geometry const &, const amrex::Vector< amrex::Real > &, bool, bool) |
| virtual void | erf_init_const_dens_hse (amrex::MultiFab &) |
| virtual void | erf_init_const_dens_and_th_hse (amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::Real) |
| virtual void | erf_init_const_dens_and_linear_th_hse (amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::MultiFab &, amrex::Real, std::unique_ptr< amrex::MultiFab > &) |
| virtual void | erf_init_dens_hse_moist (amrex::MultiFab &, std::unique_ptr< amrex::MultiFab > &, amrex::Geometry const &, const amrex::Vector< amrex::Real > &) |
| virtual void | init_custom_pert (const amrex::Box &, amrex::Array4< amrex::Real const > const &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real const > const &, amrex::Array4< amrex::Real const > const &, amrex::Array4< amrex::Real const > const &, amrex::GeometryData const &, amrex::Array4< amrex::Real const > const &, const SolverChoice &, const int) |
| virtual void | init_custom_pert_vels (const amrex::Box &, const amrex::Box &, const amrex::Box &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real > const &, amrex::Array4< amrex::Real const > const &, amrex::Array4< amrex::Real const > const &, amrex::GeometryData const &, amrex::Array4< amrex::Real const > const &, amrex::Array4< amrex::Real const > const &, const SolverChoice &, const int) |
| virtual void | update_rhotheta_sources (const double &, amrex::MultiFab *src, const amrex::Geometry &, std::unique_ptr< amrex::MultiFab > &, const amrex::Vector< amrex::Real > &) |
| virtual void | update_rhoqt_sources (const double &, amrex::MultiFab *qsrc, const amrex::Geometry &, std::unique_ptr< amrex::MultiFab > &, const amrex::Vector< amrex::Real > &) |
| virtual void | update_w_subsidence (const double &, amrex::Vector< amrex::Real > &wbar, amrex::Gpu::DeviceVector< amrex::Real > &d_wbar, const amrex::MultiFab &, const amrex::Geometry &geom, std::unique_ptr< amrex::MultiFab > &, const amrex::Vector< amrex::Real > &) |
| virtual void | update_geostrophic_profile (const double &, amrex::Vector< amrex::Real > &u_geos, amrex::Gpu::DeviceVector< amrex::Real > &d_u_geos, amrex::Vector< amrex::Real > &v_geos, amrex::Gpu::DeviceVector< amrex::Real > &d_v_geos, const amrex::Geometry &geom, std::unique_ptr< amrex::MultiFab > &, const amrex::Vector< amrex::Real > &) |
| void | init_buildings_surface (const amrex::Geometry &geom, amrex::FArrayBox &buildings_fab, const double &time) |
| void | init_terrain_surface (const amrex::Geometry &geom, amrex::FArrayBox &terrain_fab, const double &time) |
| virtual bool | terrain_is_specified () |
| void | read_custom_terrain (const std::string &fname, const bool is_usgs, const amrex::Geometry &geom, amrex::FArrayBox &terrain_fab, const double &, bool require_domain_coverage=true, bool zero_outside_table=false) |
| virtual void | init_custom_terrain (const amrex::Geometry &geom, amrex::FArrayBox &terrain_fab, const double &time) |
| virtual void | erf_init_rayleigh (amrex::Vector< amrex::Vector< amrex::Real > > &, amrex::Geometry const &, std::unique_ptr< amrex::MultiFab > &, amrex::Real) |
| void | set_zlevels_stag (const amrex::Vector< amrex::Vector< amrex::Real >> &zlevels_stag) |
Static Public Member Functions | |
| static void | make_terrain_surface_periodic (const amrex::Geometry &geom, amrex::FArrayBox &terrain_fab) |
Protected Member Functions | |
| void | init_base_parms (amrex::Real rho_0, amrex::Real T_0) |
| std::string | name () |
| amrex::Real | phys_zlo (const amrex::GeometryData &geomdata, int lev) const |
| Physical bottom of the domain at AMR level lev. More... | |
| amrex::Real | phys_zhi (const amrex::GeometryData &geomdata, int lev) const |
| Physical top of the domain at AMR level lev. More... | |
Static Protected Member Functions | |
| static bool | use_physical_z () |
| True when heights must come from the vertical levels or z_phys, not from the geometry. More... | |
Protected Attributes | |
| ProbParmDefaults | base_parms |
| amrex::Vector< amrex::Vector< amrex::Real > > | m_zlevels_stag |
| Staggered vertical levels of AMR level lev (set by set_zlevels_stag) More... | |
Class to hold problem-specific routines
|
virtualdefault |
Virtual destructor to avoid data leakage with derived class
|
inlinevirtual |

|
inlinevirtual |

|
inlinevirtual |

|
inlinevirtual |
Function to initialize the hydrostatic reference density
| [out] | rho_hse | hydrostatic reference density |
| [in] | z_phys_nd | height coordinate at nodes |
| [in] | z_phys_cc | height coordinate at cell centers |
| [in] | geom | container for geometric information |

|
inlinevirtual |
|
inlinevirtual |
Function to define the quantities needed to impose Rayleigh damping
| [out] | rayleigh_ptrs | = {strength of Rayleigh damping, reference values for xvel/yvel/zvel/theta used to define Rayleigh damping} |
| [in] | geom | container for geometric information |
| [in] | z_phys_cc | height coordinate at cell centers |
|
inlineprotected |
Function to update default base parameters, currently only used for init_type == InitType::Uniform
|
inline |
Function to perform custom initialization of buildings
| [in] | geom | container for geometric information |
| [out] | z_phys_nd | height coordinate at nodes |
| [in] | time | current time |

|
inlinevirtual |
Function to perform custom initialization of a test problem
| [in] | bx | cell-centered box on which to initialize scalars |
| [out] | state | cell-centered variables to be filled in this routine |
| [out] | r_hse | hydrostatic reference density |
| [out] | p_hse | hydrostatic reference pressure |
| [in] | z_nd | height coordinate at nodes |
| [in] | z_cc | height coordinate at cell centers |
| [in] | z_sfc_nd | height of the ground at the nodes of the bottom face of each column, at k = 0, over the planar footprint of bx |
| [in] | mf_m | map factor on cell centers |
| [in] | mf_u | map factor on x-faces |
| [in] | mf_v | map factor on y-faces |
| [in] | sc | SolverChoice structure that carries parameters |
| [in] | lev | AMR level |

|
inlinevirtual |
Function to perform custom initialization of the velocities
| [in] | xbx | box on which to initialize x_vel_pert |
| [in] | ybx | box on which to initialize y_vel_pert |
| [in] | zbx | box on which to initialize z_vel_pert |
| [out] | x_vel_pert | x-component of velocity perturbation to be filled in this routine |
| [out] | y_vel_pert | y-component of velocity perturbation to be filled in this routine |
| [out] | z_vel_pert | z-component of velocity perturbation to be filled in this routine |
| [in] | z_nd | height coordinate at nodes |
| [in] | z_sfc_nd | height of the ground at the nodes of the bottom face of each column, at k = 0 (see init_custom_pert) |
| [in] | mf_m | map factor on cell centers |
| [in] | mf_u | map factor on x-faces |
| [in] | mf_v | map factor on y-faces |
| [in] | sc | SolverChoice structure that carries parameters |
| [in] | lev | AMR level |

|
inlinevirtual |
Function to perform custom initialization of terrain
Note: Terrain functionality can also be used to provide grid stretching.
| [in] | geom | container for geometric information |
| [out] | terrain_mf | height coordinate at nodes |
| [in] | time | current time |

|
inline |
Function to perform custom initialization of terrain
| [in] | geom | container for geometric information |
| [out] | z_phys_nd | height coordinate at nodes |
| [in] | time | current time |
Referenced by fill_terrain_surface_slab().


|
inlinestatic |
Give every node in a periodic direction the height of its periodic image inside the domain. The nodes on the high side of a periodic domain are the same nodes as those on the low side, but none of the sources above knows that: the file readers clip a node outside the table to its edge (and look every node up 1e-3 past where it is), and an analytic surface is periodic only to round-off. Left as they are the two copies of a node differ, and so do the metrics of the faces on either side of it – which means the two grids that share a face update it differently, the mass flux through it is no longer the same on both sides, and which copy a fill keeps depends on how the grids are distributed. The low side is the one we keep.
terrain_fab must hold every node of the domain in a periodic direction, since that is where the images are read from. A surface that is far from periodic is still made periodic here, but we say so, since the cells next to the high side then see a step.
Referenced by init_buildings_surface(), and init_terrain_surface().


|
inlineprotected |
Referenced by erf_init_const_dens_and_linear_th_hse(), erf_init_const_dens_and_th_hse(), erf_init_const_dens_hse(), erf_init_dens_hse_dry(), init_custom_pert(), init_custom_pert_vels(), update_geostrophic_profile(), update_rhoqt_sources(), update_rhotheta_sources(), and update_w_subsidence().


|
inlineprotected |
Physical top of the domain at AMR level lev.

|
inlineprotected |
Physical bottom of the domain at AMR level lev.

|
inline |
Referenced by init_buildings_surface(), and init_terrain_surface().


|
inline |
Store the staggered vertical levels of every AMR level. On a mesh other than ConstantDz, geometry.prob_lo[2], prob_hi[2] and CellSize(2) only bound and step the computational coordinate; the physical heights are these levels (and z_phys_cc/nd).
|
inlinevirtual |
Function to report whether the user has actually specified a terrain surface, i.e. whether init_terrain_surface will do anything other than return flat terrain.
This mirrors the source precedence in init_terrain_surface, and is deliberately kept next to it so that the two cannot drift apart. A problem that overrides the terrain unconditionally, rather than keying off prob.custom_terrain_type, should override this to return true.

|
inlinevirtual |
Function to update user-specified geostrophic wind profile.
| [in] | time | current time |
| [out] | u_geos | geostrophic wind profile |
| [out] | v_geos | geostrophic wind profile |
| [in] | geom | container for geometric information |
| [in] | z_phys_cc | height coordinate at cell centers |
| [in] | zlevels_stag | nominal heights of the z faces of this level |

|
inlinevirtual |
Function to update user-specified moisture source terms that can vary with time and height.
| [in] | time | current time |
| [out] | rhoqt_source | moisture forcing profile |
| [in] | geom | container for geometric information |
| [in] | z_phys_cc | height coordinate at cell centers |
| [in] | zlevels_stag | nominal heights of the z faces of this level |

|
inlinevirtual |
Function to update user-specified temperature source terms that can vary with time and height.
| [in] | time | current time |
| [out] | rhotheta_source | forcing profile |
| [in] | geom | container for geometric information |
| [in] | z_phys_cc | height coordinate at cell centers |
| [in] | zlevels_stag | nominal heights of the z faces of this level |

|
inlinevirtual |
Function to update the vertical velocity profile, used to add subsidence source terms for x-mom, y-mom, rho*theta, rho*Q1, and rho*Q2.
TODO: Currently, this is only called by InitData, so there is no time dependence.
| [in] | time | current time |
| [out] | wbar | w vel forcing profile |
| [in] | geom | container for geometric information |
| [in] | z_phys_cc | height coordinate at cell centers |
| [in] | zlevels_stag | nominal heights of the z faces of this level |

|
inlinestaticprotected |
True when heights must come from the vertical levels or z_phys, not from the geometry.
Referenced by phys_zhi(), and phys_zlo().

|
protected |
Referenced by init_base_parms().
|
protected |
Staggered vertical levels of AMR level lev (set by set_zlevels_stag)
Referenced by phys_zhi(), phys_zlo(), and set_zlevels_stag().