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.
55 lines
1.1 KiB
55 lines
1.1 KiB
2 years ago
|
#pragma once
|
||
|
#include "layereddata.h"
|
||
|
|
||
|
class AVISOData: public LayeredData
|
||
|
{
|
||
|
enum Type
|
||
|
{
|
||
|
TYPE_UNKNOWN,
|
||
|
TYPE_DT,
|
||
|
TYPE_NRT,
|
||
|
TYPE_EDT,
|
||
|
TYPE_ENRT
|
||
|
};
|
||
|
|
||
|
Type type = TYPE_UNKNOWN;
|
||
|
|
||
2 years ago
|
public:
|
||
1 year ago
|
static constexpr const char* name = "AVISO";
|
||
|
|
||
2 years ago
|
AVISOData() = default;
|
||
|
|
||
2 years ago
|
MString DataTitle() const
|
||
|
{
|
||
|
switch(type)
|
||
|
{
|
||
|
case(TYPE_DT): return "AVISO Delayed time velocity field";
|
||
|
case(TYPE_NRT): return "AVISO Near-real time velocity field";
|
||
|
case(TYPE_EDT): return "AVISO+Eckman Delayed time velocity field";
|
||
|
case(TYPE_ENRT): return "AVISO+Eckman Near-real time velocity field";
|
||
|
default: return "No title";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// TODO: RetVal
|
||
|
MString Open(const CLArgs& args)
|
||
|
{
|
||
|
MString dataset = args.contains("dataset") ? args.at("dataset") : "DT";
|
||
|
|
||
|
GPL.UsePrefix("AVISO");
|
||
|
if(dataset == "DT")
|
||
|
type = TYPE_DT;
|
||
|
else if(dataset == "NRT")
|
||
|
type = TYPE_NRT;
|
||
|
else if(dataset == "EckmanDT")
|
||
|
type = TYPE_EDT;
|
||
|
else if(dataset == "EckmanNRT")
|
||
|
type = TYPE_ENRT;
|
||
|
else
|
||
|
return "Unknown dataset: " + dataset;
|
||
|
|
||
|
SetTitle(DataTitle());
|
||
|
return LayeredData::Open(dataset);
|
||
|
}
|
||
|
};
|