ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SurfacePrerequisites.H
Go to the documentation of this file.
1 #ifndef ERF_SURFACE_PREREQUISITES_H
2 #define ERF_SURFACE_PREREQUISITES_H
3 
6 
7 #include <string>
8 
9 class ERF;
10 
11 /**
12  * @file ERF_SurfacePrerequisites.H
13  * @brief Start-up checks every surface coupling makes on the level its grid
14  * refines
15  */
16 
17 /**
18  * @brief The level the surface grid refines: anchor_level, or the finest level
19  * when it is -1. Aborts, naming erf.<coupling>.anchor_level, when it is
20  * above the finest level.
21  */
22 int surface_anchor_level (int anchor_level, int finest_level, const SurfaceCouplingNames& names);
23 
24 /**
25  * @brief Aborts, naming erf.moisture_model, when no microphysics surface
26  * precipitation accumulator exists for an engine that reads it.
27  *
28  * @param[in] what What the engine takes from the accumulators, for the
29  * message ("rain", "precipitation")
30  */
31 void verify_surface_precip_source (const std::string& engine_name,
32  const SurfacePrecipAccumulationSources& sources,
33  const std::string& what,
34  const SurfaceCouplingNames& names);
35 
36 /**
37  * @brief The checks on the level the surface grid refines, each naming the
38  * inputs to change
39  *
40  * 1. The level exists (0 to the finest level).
41  * 2. Above level 0, the level keeps its boxes (regrid_int <= 0, read with
42  * ERF's own ParmParse prefix): the grid is built once
43  * (verify_surface_static_refinement).
44  * 3. Every box spans the level's full height: the grid pairs one surface slab
45  * with each box, and reads whole columns.
46  * 4. The boxes cover one rectangle: the grid treats its edges as domain edges.
47  * 5. The level's domain starts at index 0 (the map i / C + atm_lo assumes it).
48  */
49 void verify_surface_grid_level (const ERF& erf, int lev, const SurfaceCouplingNames& names);
50 
51 /**
52  * @brief Check 2 of verify_surface_grid_level: above level 0 the level must
53  * keep its boxes
54  *
55  * @param[in] lev The level the surface grid refines
56  * @param[in] pp_prefix The ParmParse prefix ERF reads regrid_int with
57  * (ERF::pp_prefix: "erf", or a MultiBlock block's own)
58  * @param[in] names The coupling's names, for the message
59  */
60 void verify_surface_static_refinement (int lev, const std::string& pp_prefix,
61  const SurfaceCouplingNames& names);
62 
63 #endif
The names a surface coupling uses in its inputs and messages.
int surface_anchor_level(int anchor_level, int finest_level, const SurfaceCouplingNames &names)
The level the surface grid refines: anchor_level, or the finest level when it is -1....
Definition: ERF_SurfacePrerequisites.cpp:10
void verify_surface_precip_source(const std::string &engine_name, const SurfacePrecipAccumulationSources &sources, const std::string &what, const SurfaceCouplingNames &names)
Aborts, naming erf.moisture_model, when no microphysics surface precipitation accumulator exists for ...
Definition: ERF_SurfacePrerequisites.cpp:23
void verify_surface_grid_level(const ERF &erf, int lev, const SurfaceCouplingNames &names)
The checks on the level the surface grid refines, each naming the inputs to change.
Definition: ERF_SurfacePrerequisites.cpp:41
void verify_surface_static_refinement(int lev, const std::string &pp_prefix, const SurfaceCouplingNames &names)
Check 2 of verify_surface_grid_level: above level 0 the level must keep its boxes.
Definition: ERF_SurfacePrerequisites.cpp:108
std::string pp_prefix
Definition: ERF.H:1259
Definition: ERF_InterpolationUtils.H:15
Definition: ERF_SurfaceCouplingNames.H:18
Definition: ERF_SurfacePrecipitation.H:40