You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
949 B

#pragma once
#include "layereddata.h"
2 years ago
class NEMOData: public LayeredData
2 years ago
{
2 years ago
enum Type
{
TYPE_UNKNOWN,
TYPE_DT,
TYPE_NRT,
TYPE_NRT6
};
Type type = TYPE_UNKNOWN;
2 years ago
public:
static constexpr const char* name = "NEMO";
NEMOData() = default;
MString DataTitle() const
2 years ago
{
switch(type)
2 years ago
{
case(TYPE_DT): return "NEMO Delayed time, daily mean (DT)";
case(TYPE_NRT): return "NEMO Near-real time, daily mean (NRT)";
case(TYPE_NRT6): return "NEMO Near-real time, 6h resolution (NRT6)";
default: return "No title";
2 years ago
}
}
// TODO: RetVal
MString Open(const CLArgs& args)
2 years ago
{
MString dataset = args.contains("dataset") ? args.at("dataset") : "DT";
GPL.UsePrefix("NEMO");
if(dataset == "DT")
2 years ago
type = TYPE_DT;
else if(dataset == "NRT")
type = TYPE_NRT;
else if(dataset == "NRT6")
type = TYPE_NRT6;
else
return "Unknown dataset: " + dataset;
SetTitle(DataTitle());
return LayeredData::Open(dataset);
2 years ago
}
};