#pragma once #include "layereddata.h" class HYCOMData: public LayeredData { enum Type { TYPE_UNKNOWN, TYPE_REANALYSIS, TYPE_HINDCAST, TYPE_NRT, TYPE_FORECAST }; Type type = TYPE_UNKNOWN; public: static constexpr const char* name = "HYCOM"; 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_NRT): return "ESPC-D-V02: Global 1/12 Analysis Archive"; case(TYPE_FORECAST): return "ESPC-D-V02: Global 1/12 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 == "NRT") type = TYPE_NRT; 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); } };