|
|
|
#pragma once
|
|
|
|
#include "layereddata.h"
|
|
|
|
|
|
|
|
class NEMOData: public LayeredData
|
|
|
|
{
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
TYPE_UNKNOWN,
|
|
|
|
TYPE_DT,
|
|
|
|
TYPE_NRT,
|
|
|
|
TYPE_NRT6
|
|
|
|
};
|
|
|
|
|
|
|
|
Type type = TYPE_UNKNOWN;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static constexpr const char* name = "NEMO";
|
|
|
|
|
|
|
|
NEMOData() = default;
|
|
|
|
|
|
|
|
MString DataTitle() const
|
|
|
|
{
|
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: RetVal
|
|
|
|
MString Open(const CLArgs& args)
|
|
|
|
{
|
|
|
|
MString dataset = args.contains("dataset") ? args.at("dataset") : "DT";
|
|
|
|
|
|
|
|
GPL.UsePrefix("NEMO");
|
|
|
|
if(dataset == "DT")
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
};
|