|
|
|
#pragma once
|
|
|
|
#include "layereddata.h"
|
|
|
|
|
|
|
|
class NEMOData: public LayeredData
|
|
|
|
{
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
TYPE_UNKNOWN,
|
|
|
|
TYPE_DT,
|
|
|
|
TYPE_NRT,
|
|
|
|
TYPE_NRT6,
|
|
|
|
TYPE_BALTICDT,
|
|
|
|
TYPE_BALTICNRT,
|
|
|
|
TYPE_BALTICNRT1,
|
|
|
|
TYPE_BLKSEADT,
|
|
|
|
TYPE_BLKSEANRT,
|
|
|
|
TYPE_MEDSEADT,
|
|
|
|
TYPE_MEDSEANRT,
|
|
|
|
TYPE_MEDSEANRT1,
|
|
|
|
TYPE_BISCDT,
|
|
|
|
TYPE_BISCNRT,
|
|
|
|
TYPE_ENWSDT,
|
|
|
|
TYPE_ENWSNRT,
|
|
|
|
TYPE_BRITNRT,
|
|
|
|
TYPE_BRITNRT1
|
|
|
|
};
|
|
|
|
|
|
|
|
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)";
|
|
|
|
case(TYPE_BALTICDT): return "NEMO Delayed time, Baltic region, daily mean (BALTICDT)";
|
|
|
|
case(TYPE_BALTICNRT): return "NEMO Near-real time, Baltic region, daily mean (BALTICNRT)";
|
|
|
|
case(TYPE_BALTICNRT1): return "NEMO Near-real time, Baltic region, 1h resolution (BALTICNRT1)";
|
|
|
|
case(TYPE_BLKSEADT): return "NEMO Delayed time, Black Sea region, daily mean (BLKSEADT)";
|
|
|
|
case(TYPE_BLKSEANRT): return "NEMO Near-real time time, Black Sea region, daily mean (BLKSEANRT)";
|
|
|
|
case(TYPE_MEDSEADT): return "NEMO Delayed time, Mediterranean Sea region, daily mean (MEDSEADT)";
|
|
|
|
case(TYPE_MEDSEANRT): return "NEMO Near-real time, Mediterranean Sea region, daily mean (MEDSEANRT)";
|
|
|
|
case(TYPE_MEDSEANRT1): return "NEMO Near-real time, Mediterranean Sea region, hourly mean (MEDSEANRT1)";
|
|
|
|
case(TYPE_BISCDT): return "NEMO Delayed time, Atlantic-Iberian Biscay Irish region, daily mean (BISCDT)";
|
|
|
|
case(TYPE_BISCNRT): return "NEMO Near-real time, Atlantic-Iberian Biscay Irish region, daily mean (BISCNRT)";
|
|
|
|
case(TYPE_ENWSDT): return "NEMO Delayed time, Atlantic - European North West Shelf region, daily mean (ENWSDT)";
|
|
|
|
case(TYPE_ENWSNRT): return "NEMO Near-real time, Atlantic - European North West Shelf region, daily mean (ENWSNRT)";
|
|
|
|
case(TYPE_BRITNRT): return "NEMO Near-real time, British Islands region, daily mean (BRITNRT)";
|
|
|
|
case(TYPE_BRITNRT1): return "NEMO Near-real time, British Islands region, 1h resolution (BRITNRT1)";
|
|
|
|
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 if(dataset == "BALTICDT")
|
|
|
|
type = TYPE_BALTICDT;
|
|
|
|
else if(dataset == "BALTICNRT")
|
|
|
|
type = TYPE_BALTICNRT;
|
|
|
|
else if(dataset == "BALTICNRT1")
|
|
|
|
type = TYPE_BALTICNRT1;
|
|
|
|
else if(dataset == "BLKSEADT")
|
|
|
|
type = TYPE_BLKSEADT;
|
|
|
|
else if(dataset == "BLKSEANRT")
|
|
|
|
type = TYPE_BLKSEANRT;
|
|
|
|
else if(dataset == "MEDSEADT")
|
|
|
|
type = TYPE_MEDSEADT;
|
|
|
|
else if(dataset == "MEDSEANRT")
|
|
|
|
type = TYPE_MEDSEANRT;
|
|
|
|
else if(dataset == "MEDSEANRT1")
|
|
|
|
type = TYPE_MEDSEANRT1;
|
|
|
|
else if(dataset == "BISCDT")
|
|
|
|
type = TYPE_BISCDT;
|
|
|
|
else if(dataset == "BISCNRT")
|
|
|
|
type = TYPE_BISCNRT;
|
|
|
|
else if(dataset == "ENWSDT")
|
|
|
|
type = TYPE_ENWSDT;
|
|
|
|
else if(dataset == "ENWSNRT")
|
|
|
|
type = TYPE_ENWSNRT;
|
|
|
|
else if(dataset == "BRITNRT")
|
|
|
|
type = TYPE_BRITNRT;
|
|
|
|
else if(dataset == "BRITNRT1")
|
|
|
|
type = TYPE_BRITNRT1;
|
|
|
|
else
|
|
|
|
return "Unknown dataset: " + dataset;
|
|
|
|
|
|
|
|
SetTitle(DataTitle());
|
|
|
|
return LayeredData::Open(dataset);
|
|
|
|
}
|
|
|
|
};
|