ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_SurfaceCouplingNames.H
Go to the documentation of this file.
1 #ifndef ERF_SURFACE_COUPLING_NAMES_H
2 #define ERF_SURFACE_COUPLING_NAMES_H
3 
4 #include <string>
5 
6 /**
7  * @file ERF_SurfaceCouplingNames.H
8  * @brief The names a surface coupling uses in its inputs and messages
9  *
10  * The fire and the flood couplings build on the same surface-coupling layer
11  * (Source/SurfaceCoupling): the 2D grid that refines one atmospheric level,
12  * the maps to and from its columns, the engine registry, the engine choice
13  * and the start-up checks. Each coupling hands the layer its names, so every
14  * input and message keeps the coupling's own words: erf.fire.grid_ratio,
15  * "[FIRE] ... the fire grid ...", erf.flood.anchor_level, and so on.
16  */
18 {
19  const char* lower; ///< "fire": input prefix erf.<lower>, "the <lower> grid", "<lower> engine"
20  const char* title; ///< "Fire": Source/<title>Coupling, ERF_<title>EngineTemplate.H
21  const char* upper; ///< "FIRE": the message tag [<upper>], <upper>_HOME, ERF_<upper>_ENGINE_DIRS
22 
23  /// "[FIRE]"
24  std::string tag () const { return std::string("[") + upper + "]"; }
25  /// "erf.fire." followed by key
26  std::string key (const std::string& k) const { return std::string("erf.") + lower + "." + k; }
27  /// "fire grid"
28  std::string grid () const { return std::string(lower) + " grid"; }
29 };
30 
31 #endif
Definition: ERF_SurfaceCouplingNames.H:18
const char * title
"Fire": Source/<title>Coupling, ERF_<title>EngineTemplate.H
Definition: ERF_SurfaceCouplingNames.H:20
std::string tag() const
"[FIRE]"
Definition: ERF_SurfaceCouplingNames.H:24
const char * upper
"FIRE": the message tag [<upper>], <upper>HOME, ERF<upper>_ENGINE_DIRS
Definition: ERF_SurfaceCouplingNames.H:21
std::string grid() const
"fire grid"
Definition: ERF_SurfaceCouplingNames.H:28
const char * lower
"fire": input prefix erf.<lower>, "the <lower> grid", "<lower> engine"
Definition: ERF_SurfaceCouplingNames.H:19
std::string key(const std::string &k) const
"erf.fire." followed by key
Definition: ERF_SurfaceCouplingNames.H:26