5#ifndef _NetCDFCFCollection_h_
6#define _NetCDFCFCollection_h_
39 virtual int Initialize(
const std::vector<string> &files);
55 virtual bool IsCoordVarCF(
string var)
const {
return (std::find(_coordinateVars.begin(), _coordinateVars.end(), var) != _coordinateVars.end()); }
73 virtual bool IsAuxCoordVarCF(
string var)
const {
return (std::find(_auxCoordinateVars.begin(), _auxCoordinateVars.end(), var) != _auxCoordinateVars.end()); }
82 virtual bool IsCoordinateVar(
string varName)
const {
return (IsCoordVarCF(varName) || IsAuxCoordVarCF(varName)); }
94 virtual bool IsLatCoordVar(
string var)
const {
return (std::find(_latCoordVars.begin(), _latCoordVars.end(), var) != _latCoordVars.end()); }
104 virtual bool IsLonCoordVar(
string var)
const {
return (std::find(_lonCoordVars.begin(), _lonCoordVars.end(), var) != _lonCoordVars.end()); }
114 virtual bool IsTimeCoordVar(
string var)
const {
return (std::find(_timeCoordVars.begin(), _timeCoordVars.end(), var) != _timeCoordVars.end()); }
125 virtual bool IsVertCoordVar(
string var)
const {
return (std::find(_vertCoordVars.begin(), _vertCoordVars.end(), var) != _vertCoordVars.end()); }
282 virtual int Convert(
const string from,
const string to,
const double *src,
double *dst,
size_t n)
const;
283 virtual int Convert(
const string from,
const string to,
const float *src,
float *dst,
size_t n)
const;
331 std::vector<std::string> _coordinateVars;
332 std::vector<std::string> _auxCoordinateVars;
333 std::vector<std::string> _lonCoordVars;
334 std::vector<std::string> _latCoordVars;
335 std::vector<std::string> _vertCoordVars;
336 std::vector<std::string> _timeCoordVars;
343 std::map<string, double> _missingValueMap;
347 int _Initialize(
const std::vector<string> &files);
417 bool _GetMissingValue(
string varname,
string attname,
double &mv)
const;
418 void _GetMissingValueMap(map<string, double> &missingValueMap)
const;
Wrapper for a collection of netCDF files.
virtual bool IsCoordVarCF(string var) const
virtual bool IsTimeCoordVar(string var) const
virtual std::vector< string > GetDataVariableNames(int ndim, bool spatial) const
virtual bool IsLonCoordVar(string var) const
virtual int OpenRead(size_t ts, string varname)
virtual ~NetCDFCFCollection()
virtual std::vector< string > GetLatCoordVars() const
virtual bool IsAuxCoordVarCF(string var) const
virtual bool GetMissingValue(string varname, double &mv) const
virtual bool IsVertDimensionless(string cvar) const
virtual bool IsLatCoordVar(string var) const
virtual bool IsCoordinateVar(string varName) const
const UDUnits * GetUDUnits() const
virtual int Convert(const string from, const string to, const float *src, float *dst, size_t n) const
virtual bool IsVertCoordVarLength(string var) const
virtual std::vector< string > GetVertCoordVars() const
virtual std::vector< string > GetTimeCoordVars() const
virtual bool IsVertCoordVarUp(string var) const
virtual bool IsVertCoordVarPressure(string var) const
virtual int GetVarUnits(string var, string &units) const
void FormatTimeStr(double time, string &str) const
bool GetMapProjectionProj4(string varname, string &proj4string) const
virtual int Convert(const string from, const string to, const double *src, double *dst, size_t n) const
virtual bool IsVertCoordVar(string var) const
virtual int GetVarCoordVarNames(string var, std::vector< string > &cvars) const
virtual std::vector< string > GetLonCoordVars() const
friend std::ostream & operator<<(std::ostream &o, const NetCDFCFCollection &ncdfc)
virtual int Initialize(const std::vector< string > &files)
Wrapper for a collection of netCDF files.
NetCDFSimple API interface.
struct ut_system ut_system