|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include "ERF_Utils.H"
Functions | |
| void | cons_to_prim (const MultiFab &cons_state, MultiFab &S_prim, int ng) |
| void | fill_wall_dist_ghost_cells (MultiFab &wdist, const Geometry &geom) |
| void | make_qt (const MultiFab &cons_state, MultiFab &qt, int n_qstate_into_total) |
| void cons_to_prim | ( | const MultiFab & | cons_state, |
| MultiFab & | S_prim, | ||
| int | ng | ||
| ) |
Convert conservative variables to primitive variables.
| [in] | cons_state | MultiFab containing conservative state variables |
| [out] | S_prim | MultiFab to be filled with primitive state variables |
| [in] | ng | Number of ghost cells |
Referenced by ERF::advance_dycore(), ERF::compute_max_buoyancy_gradp_diagnostic(), and ERF::Write3DPlotFile().


| void fill_wall_dist_ghost_cells | ( | MultiFab & | wdist, |
| const Geometry & | geom | ||
| ) |
Fill the ghost cells of the wall distance field.
The wall distance is only computed on the valid region of each box (whether from the analytic shortcuts, the Poisson solve, or the thin-body correction), so without this the ghost cells still hold the large sentinel value they were initialized with. Any operator that reads wall distance from a grown box – e.g. the RANS Dirichlet-k boundary condition in SurfaceLayer::update_fluxes – would then propagate that sentinel into the state.
Ghost cells shared with a neighboring box or across a periodic boundary are filled by FillBoundary; ghost cells outside the domain in a non-periodic direction are filled by zero-order extrapolation. Note that the analytic wall distances vary only with k, so the extrapolation is exact in those cases.
| [in,out] | wdist | MultiFab holding the wall distance |
| [in] | geom | Geometry at this level |
Referenced by ERF::InitData_post(), and ERF::poisson_wall_dist().


| void make_qt | ( | const MultiFab & | cons_state, |
| MultiFab & | qt, | ||
| int | n_qstate_into_total | ||
| ) |
Compute the total water mixing ratio from conservative variables.
| [in] | cons_state | MultiFab containing conservative state variables |
| [out] | qt | MultiFab to store the total water mixing ratio |
| [in] | n_qstate_into_total | Number of moisture components to include in the total |
Referenced by ERF::compute_max_buoyancy_gradp_diagnostic(), ERF::compute_max_pressure_gradient_diagnostic(), and ERF::Write3DPlotFile().
