8 #include "ioda/testconfig.h"
19 #include "eckit/testing/Test.h"
21 using namespace eckit::testing;
26 CASE(
"Concatenation mapping file; error checks of unit conversion methods") {
27 std::string yamlMappingFile
28 = std::string(IODA_ENGINES_TEST_SOURCE_DIR) +
"/layouts/odb_concat_name_map.yaml";
50 std::string(
"combined"));
56 std::type_index(
typeid(std::string)));
68 EXPECT_NOT(dataLayoutPolicy.
isMapped(
"notInMapping"));
69 EXPECT_THROWS(dataLayoutPolicy.
getUnit(
"notInMapping"));
71 CASE(
"Input data name matches the export data name") {
72 std::string yamlMappingFile = std::string(IODA_ENGINES_TEST_SOURCE_DIR)
73 +
"/layouts/odb_matchinginputoutput_name_map.yaml";
77 CASE(
"Vertical coordinate mapping file") {
78 std::string yamlMappingFile = std::string(IODA_ENGINES_TEST_SOURCE_DIR)
79 +
"/layouts/odb_verticalreference_name_map.yaml";
83 CASE(
"Missing YAML on generate") {
84 EXPECT_THROWS(detail::DataLayoutPolicy::generate(
"ObsGroupODB"));
85 EXPECT_THROWS(detail::DataLayoutPolicy::generate(
86 detail::DataLayoutPolicy::Policies::ObsGroupODB));
92 int main(
int argc,
char** argv) {
93 return run_tests(argc, argv);
Contains definitions for how ODB data are arranged in ioda internally.
Layout for ObsGroup-like data.
DataLayoutPolicy::MergeMethod getMergeMethod(const std::string &) const override
size_t getInputsNeeded(const std::string &) const override
std::string getOutputNameFromComponent(const std::string &) const override
bool isComplementary(const std::string &) const override
Check if the named variable will be a part of a derived variable.
std::pair< bool, std::string > getUnit(const std::string &) const override
bool isMapped(const std::string &) const override
Check if the named variable is in the Variables section of the ODB mapping file.
size_t getComplementaryPosition(const std::string &) const override
std::type_index getOutputVariableDataType(const std::string &) const override
static std::shared_ptr< const DataLayoutPolicy > generate(const std::string &polid="")
Factory generator.
@ Concat
Concatenate complementary variables entry-by-entry.
int main(int argc, char **argv)