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
51 lines
949 B
2 years ago
|
#pragma once
|
||
2 years ago
|
#include "layereddata.h"
|
||
2 years ago
|
|
||
2 years ago
|
class NEMOData: public LayeredData
|
||
2 years ago
|
{
|
||
2 years ago
|
enum Type
|
||
|
{
|
||
|
TYPE_UNKNOWN,
|
||
|
TYPE_DT,
|
||
|
TYPE_NRT,
|
||
|
TYPE_NRT6
|
||
|
};
|
||
|
|
||
2 years ago
|
Type type = TYPE_UNKNOWN;
|
||
2 years ago
|
|
||
2 years ago
|
public:
|
||
1 year ago
|
static constexpr const char* name = "NEMO";
|
||
|
|
||
2 years ago
|
NEMOData() = default;
|
||
|
|
||
2 years ago
|
MString DataTitle() const
|
||
2 years ago
|
{
|
||
2 years ago
|
switch(type)
|
||
2 years ago
|
{
|
||
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
|
||
2 years ago
|
MString Open(const CLArgs& args)
|
||
2 years ago
|
{
|
||
2 years ago
|
MString dataset = args.contains("dataset") ? args.at("dataset") : "DT";
|
||
2 years ago
|
|
||
2 years ago
|
GPL.UsePrefix("NEMO");
|
||
2 years ago
|
if(dataset == "DT")
|
||
2 years ago
|
type = TYPE_DT;
|
||
2 years ago
|
else if(dataset == "NRT")
|
||
2 years ago
|
type = TYPE_NRT;
|
||
2 years ago
|
else if(dataset == "NRT6")
|
||
|
type = TYPE_NRT6;
|
||
|
else
|
||
|
return "Unknown dataset: " + dataset;
|
||
|
|
||
2 years ago
|
SetTitle(DataTitle());
|
||
2 years ago
|
return LayeredData::Open(dataset);
|
||
2 years ago
|
}
|
||
|
};
|