Go to the documentation of this file.
   16 #include "eckit/config/Configuration.h" 
   17 #include "eckit/config/LocalConfiguration.h" 
   18 #include "eckit/config/YAMLConfiguration.h" 
   19 #include "eckit/filesystem/PathName.h" 
   21 #include "oops/util/abor1_cpp.h" 
   22 #include "oops/util/Logger.h" 
   23 #include "oops/util/Printable.h" 
   80     void checkKindValid(
const std::string fieldIOName, 
const std::string kind)
 const {
 
   83         oops::Log::debug() << 
"Key: " << fieldIOName << 
" failed due to invalid kind: " 
   84                            << kind << 
". Options include: " << 
kindVal_ << std::endl;
 
   85         ABORT(
"FieldMetadata::checkKindValid failed, run again with debug prints");
 
   93         oops::Log::debug() << 
"Key: " << fieldIOName << 
" failed due to invalid stagger location: " 
   94                            << staggerLoc << 
". Options include: " << 
staggerLocVal_ << std::endl;
 
   95         ABORT(
"FieldMetadata::checkStaggerLocValid failed, run again with debug prints");
 
  103         oops::Log::debug() << 
"Key: " << fieldIOName << 
" failed due to invalid space: " 
  104                            << space << 
". Options include: " << 
spaceVal_ << std::endl;
 
  105         ABORT(
"FieldMetadata::checkSpace failed, run again with debug prints");
 
  113         oops::Log::debug() << 
"Key: " << fieldIOName << 
" failed due to invalid level choice: " 
  114                            << level << 
". Options include: " << 
levelVal_ << 
"or an integer" 
  116         ABORT(
"FieldMetadata::checkLevelValid failed, run again with debug prints");
 
  122       return !s.empty() && std::find_if(s.begin(), s.end(), [](
unsigned char c)
 
  123                                         { return !std::isdigit(c); }) == s.end();
 
  138     const std::vector<std::string> 
kindVal_ = {
"double", 
"integer"};
 
  139     const std::vector<std::string> 
levelVal_ = {
"full", 
"half"};
 
  140     const std::vector<std::string> 
spaceVal_ = {
"vector", 
"magnitude", 
"direction"};
 
  141     const std::vector<std::string> 
staggerLocVal_ = {
"center", 
"eastwest", 
"northsouth", 
"corner"};
 
  143     void print(std::ostream & os)
 const {
 
  146       os << 
" Kind: " << 
kind_ << 
"\n";
 
  147       os << 
" Levels: " << 
levels_ << 
"\n";
 
  148       os << 
" LongName: " << 
longName_ << 
"\n";
 
  149       os << 
" Space: " << 
space_ << 
"\n";
 
  151       os << 
" Tracer: " << 
tracer_ << 
"\n";
 
  152       os << 
" Units: " << 
units_ << 
"\n";
 
  153       os << 
" IOFile: " << 
io_file_ << 
"\n";
 
  
 
Configuration files should be formatted as e.g.