|
|
|
#pragma once
|
|
|
|
#include "layereddata.h"
|
|
|
|
|
|
|
|
class HYCOMData: public LayeredData
|
|
|
|
{
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
TYPE_UNKNOWN,
|
|
|
|
TYPE_REANALYSIS,
|
|
|
|
TYPE_HINDCAST,
|
|
|
|
TYPE_FORECAST
|
|
|
|
};
|
|
|
|
|
|
|
|
Type type = TYPE_UNKNOWN;
|
|
|
|
|
|
|
|
public:
|
|
|
|
HYCOMData() = default;
|
|
|
|
|
|
|
|
MString DataTitle() const
|
|
|
|
{
|
|
|
|
switch(type)
|
|
|
|
{
|
|
|
|
case(TYPE_REANALYSIS): return "GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12 Reanalysis";
|
|
|
|
case(TYPE_HINDCAST): return "GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12 Analysis Hindcast";
|
|
|
|
case(TYPE_FORECAST): return "GOFS 3.1: 41-layer HYCOM + NCODA Global 1/12 Analysis Forecast";
|
|
|
|
default: return "No title";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: RetVal
|
|
|
|
MString Open(const CLArgs& args)
|
|
|
|
{
|
|
|
|
MString dataset = args.contains("dataset") ? args.at("dataset") : "Forecast";
|
|
|
|
|
|
|
|
GPL.UsePrefix("HYCOM");
|
|
|
|
if(dataset == "Forecast")
|
|
|
|
type = TYPE_FORECAST;
|
|
|
|
else if(dataset == "Hindcast")
|
|
|
|
type = TYPE_HINDCAST;
|
|
|
|
else if(dataset == "Reanalysis")
|
|
|
|
type = TYPE_REANALYSIS;
|
|
|
|
else
|
|
|
|
return "Unknown dataset: " + dataset;
|
|
|
|
|
|
|
|
SetTitle(DataTitle());
|
|
|
|
return LayeredData::Open(dataset);
|
|
|
|
}
|
|
|
|
};
|