1 #ifndef ERF_FOREST_UTILS_H_
2 #define ERF_FOREST_UTILS_H_
8 #include <AMReX_REAL.H>
14 bool has_lon,
bool has_lat,
15 const std::string& source)
18 return source +
" must provide both projected Cartesian x and y coordinate variables";
20 if (!has_x && (has_lon || has_lat)) {
21 return source +
" provides lon/lat coordinates, but projected Cartesian x/y are required; "
22 "no lon/lat-to-Cartesian projection is applied";
25 return source +
" must provide projected Cartesian x and y coordinate variables";
38 if (std::isfinite(
static_cast<double>(laimax)) &&
43 std::ostringstream message;
44 message << source <<
" must satisfy 0 <= laimax < 1 (got " << laimax <<
")";
amrex::Real Real
Definition: ERF_ShocInterface.H:19
Definition: ERF_ForestUtils.H:10
std::string validate_laimax(const amrex::Real laimax, const std::string &source)
Definition: ERF_ForestUtils.H:36
std::string validate_cartesian_coordinates(bool has_x, bool has_y, bool has_lon, bool has_lat, const std::string &source)
Definition: ERF_ForestUtils.H:13