ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_FloodPrerequisites.H
Go to the documentation of this file.
1 #ifndef ERF_FLOOD_PREREQUISITES_H
2 #define ERF_FLOOD_PREREQUISITES_H
3 
4 #include <string>
6 
7 class ERF;
8 
9 /**
10  * @file ERF_FloodPrerequisites.H
11  * @brief Start-up checks of the atmosphere side of the flood coupling
12  *
13  * Verifies that ERF is configured so that a flood grid can be coupled to it,
14  * whichever flood engine runs on that grid. Each engine checks its own inputs
15  * after these (FloodEngine::verify_prerequisites). The checks are those of
16  * every surface coupling (ERF_SurfacePrerequisites.H); each aborts with a
17  * message that names the input to change.
18  */
19 
20 /**
21  * @brief The AMR level the flood grid refines: erf.flood.anchor_level, or the
22  * finest level when it is -1 (the default).
23  *
24  * Aborts, naming the input, when the level is above the finest level.
25  */
26 int flood_anchor_level (int anchor_level, int finest_level);
27 
28 /**
29  * @brief Start-up check for an engine that reads the precipitation
30  * (FloodEngine::wants_surface_precip): the microphysics scheme must
31  * provide surface precipitation accumulators.
32  *
33  * Aborts, naming the engine and erf.moisture_model, when the sources are empty.
34  *
35  * @param[in] engine_name The engine's name (FloodEngine::name)
36  * @param[in] sources Microphysics::Get_Surface_Precip_Accumulation_Ptrs(lev)
37  */
38 void verify_flood_precip_source (const std::string& engine_name,
39  const SurfacePrecipAccumulationSources& sources);
40 
41 /**
42  * @brief Verify the ERF configuration the flood coupling needs
43  *
44  * Checks, in order:
45  * 1. 0 <= lev <= finest level
46  * 2. On a level above 0: static refinement (erf.regrid_int <= 0)
47  * 3. Every box of the level spans its full height (no z decomposition), so
48  * the level's k = 0 slabs are one box per atmospheric box
49  * 4. The level's boxes cover one rectangle in x and y
50  * 5. The domain starts at index 0 in x, y and z
51  */
52 void verify_flood_prerequisites (const ERF& erf, int lev);
53 
54 #endif
int flood_anchor_level(int anchor_level, int finest_level)
The AMR level the flood grid refines: erf.flood.anchor_level, or the finest level when it is -1 (the ...
Definition: ERF_FloodPrerequisites.cpp:8
void verify_flood_prerequisites(const ERF &erf, int lev)
Verify the ERF configuration the flood coupling needs.
Definition: ERF_FloodPrerequisites.cpp:21
void verify_flood_precip_source(const std::string &engine_name, const SurfacePrecipAccumulationSources &sources)
Start-up check for an engine that reads the precipitation (FloodEngine::wants_surface_precip): the mi...
Definition: ERF_FloodPrerequisites.cpp:14
Definition: ERF_InterpolationUtils.H:15
Definition: ERF_SurfacePrecipitation.H:40