Skip to content

Commit

Permalink
Merge pull request #27 from MetOffice/feature/monio_increment_read_write
Browse files Browse the repository at this point in the history
Add `kMissingVariableName = "none"` for lfric-jedi
  • Loading branch information
phlndrwd authored Oct 24, 2023
2 parents 881262b + 1d9514b commit 45c1e65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/monio/AtlasWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ atlas::Field monio::AtlasWriter::getWriteField(atlas::Field& field,
utils::throwException("AtlasWriter::getWriteField()> Field levels misconfiguration...");
}
// WARNING - This name-check is an LFRic-Lite specific convention...
if (writeName != consts::kToBeDerived && writeName != consts::kToBeImplemented) {
if (utils::findInVector(consts::kMissingVariableNames, writeName) == false) {
if (noFirstLevel == true && field.levels() == consts::kVerticalHalfSize) {
atlas::util::Config atlasOptions = atlas::option::name(writeName) |
atlas::option::global(0) |
Expand Down
9 changes: 6 additions & 3 deletions src/monio/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ const std::string_view kLatitudeVarName = "latitude";
const std::string_view kTabSpace = " ";
const std::string_view kNotFoundError = "NOT_FOUND";

const std::string_view kToBeDerived = "TO BE DERIVED";
const std::string_view kToBeImplemented = "TO BE IMPLEMENTED";

const std::string_view kProducedByName = "produced_by";
const std::string_view kProducedByString = "MONIO: Met Office NetCDF I/O";
const std::string_view kNamingConventionName = "naming_convention";
Expand Down Expand Up @@ -172,6 +169,12 @@ const std::vector<std::string> kNamingConventions({
"JEDI"
});

const std::vector<std::string> kMissingVariableNames({
"TO BE DERIVED", // LFRic-Lite - variables without names in the LFRic context
"TO BE IMPLEMENTED", // LFRic-Lite - theoretical variables that aren't used
"none" // LFRic-JEDI
});

const std::vector<std::string> kLfricCoordVarNames = {std::string(kLfricLonVarName),
std::string(kLfricLatVarName)};
const std::vector<std::string> kCoordVarNames = {std::string(kLongitudeVarName),
Expand Down

0 comments on commit 45c1e65

Please sign in to comment.