17class DerivedCoordVar_CF1D;
18class DerivedCoordVar_WRFTime;
19class DerivedCoordVar_Staggered;
56 virtual int initialize(
const vector<string> &paths,
const std::vector<string> &options);
98 virtual std::vector<string>
getAuxVarNames()
const {
return (vector<string>()); }
110 virtual bool getAtt(
string varname,
string attname, vector<double> &values)
const;
111 virtual bool getAtt(
string varname,
string attname, vector<long> &values)
const;
112 virtual bool getAtt(
string varname,
string attname,
string &values)
const;
124 virtual int getDimLensAtLevel(
string varname,
int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level)
const;
128 virtual int openVariableRead(
size_t ts,
string varname,
int,
int) {
return (DCWRF::openVariableRead(ts, varname)); }
138 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
float *region) {
return (_readRegionTemplate(fd, min, max, region)); }
139 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
double *region) {
return (_readRegionTemplate(fd, min, max, region)); }
140 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
int *region) {
return (_readRegionTemplate(fd, min, max, region)); }
144 virtual bool variableExists(
size_t ts,
string varname,
int reflevel = 0,
int lod = 0)
const;
172 WRFFileObject(
size_t ts,
string varname,
int level,
int lod,
int fd,
bool derivedFlag) : FileObject(ts, varname, level, lod, fd), _derivedFlag(derivedFlag) {}
174 bool GetDerivedFlag()
const {
return (_derivedFlag); }
180 std::vector<DerivedVar *> _derivedVars;
182 DerivedCoordVar_WRFTime *_derivedTime;
184 std::map<string, DC::Dimension> _dimsMap;
185 std::map<string, DC::CoordVar> _coordVarsMap;
186 std::map<string, DC::Mesh> _meshMap;
187 std::map<string, DC::DataVar> _dataVarsMap;
188 std::vector<size_t> _timeLookup;
190 vector<size_t> _GetSpatialDims(NetCDFCollection *ncdfc,
string varname)
const;
192 vector<string> _GetSpatialDimNames(NetCDFCollection *ncdfc,
string varname)
const;
194 int _InitAtts(NetCDFCollection *ncdfc);
196 int _GetProj4String(NetCDFCollection *ncdfc,
float radius,
int map_proj,
string &projstring);
198 bool _isConstantValuedVariable(NetCDFCollection *ncdfc,
string varname)
const;
200 bool _isIdealized(NetCDFCollection *ncdfc)
const;
202 bool _isWRFSFIRE(NetCDFCollection *ncdfc)
const;
204 int _InitProjection(NetCDFCollection *ncdfc,
float radius);
206 DerivedCoordVar_CF2D *_makeDerivedHorizontalIdealized(NetCDFCollection *ncdfc,
string name,
string &timeDimName, vector<string> &spaceDimNames);
208 DerivedCoordVar_Staggered *_makeDerivedHorizontalStaggered(NetCDFCollection *ncdfc,
string name,
string &timeDimName, vector<string> &spaceDimNames);
210 int _InitHorizontalCoordinatesHelper(NetCDFCollection *ncdfc,
string name,
int axis);
212 int _InitHorizontalCoordinates(NetCDFCollection *ncdfc);
214 DerivedCoordVar_CF1D *_InitVerticalCoordinatesHelper(
string varName,
string dimName);
216 int _InitVerticalCoordinates(NetCDFCollection *ncdfc);
218 int _InitTime(NetCDFCollection *ncdfc);
220 int _InitDimensions(NetCDFCollection *ncdfc);
222 int _GetCoordVars(NetCDFCollection *ncdfc,
string varname, vector<string> &cvarnames);
224 bool _GetVarCoordinates(NetCDFCollection *ncdfc,
string varname, std::vector<string> &dimnames, std::vector<string> &coordvars,
string &time_dim_name,
string &time_coordvar);
226 int _InitVars(NetCDFCollection *ncdfc);
228 template<
class T>
int _readRegionTemplate(
int fd,
const vector<size_t> &min,
const vector<size_t> &max, T *region);
230 template<
class T>
bool _getAttTemplate(
string varname,
string attname, T &values)
const;
Class for reading a WRF data set stored as a series of NetCDF files.
virtual bool getDataVarInfo(string varname, DC::DataVar &datavar) const
virtual std::vector< string > getCoordVarNames() const
virtual int closeVariable(int fd)
virtual bool getCoordVarInfo(string varname, DC::CoordVar &cvar) const
virtual bool getMesh(string mesh_name, DC::Mesh &mesh) const
virtual bool getAtt(string varname, string attname, vector< double > &values) const
virtual int openVariableRead(size_t ts, string varname)
std::vector< string > getMeshNames() const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)
virtual std::vector< string > getAuxVarNames() const
virtual size_t getNumRefLevels(string varname) const
virtual bool getAtt(string varname, string attname, vector< long > &values) const
virtual bool getBaseVarInfo(string varname, DC::BaseVar &var) const
virtual int initialize(const vector< string > &paths, const std::vector< string > &options)
virtual std::vector< string > getAttNames(string varname) const
virtual bool getAuxVarInfo(string varname, DC::AuxVar &var) const
virtual int getDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const
virtual bool variableExists(size_t ts, string varname, int reflevel=0, int lod=0) const
virtual bool getDimension(string dimname, DC::Dimension &dimension) const
virtual XType getAttType(string varname, string attname) const
virtual int openVariableRead(size_t ts, string varname, int, int)
virtual string getMapProjection() const
virtual bool getAtt(string varname, string attname, string &values) const
virtual std::vector< string > getDimensionNames() const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)
virtual std::vector< string > getDataVarNames() const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)
Auxiliary variable metadata.
Base class for storing variable metadata.
Coordinate variable metadata.
Metadata describing a named dimension length.
Metadata describing a computational mesh.
A Template Method design pattern for reading a collection of data.
XType
External storage types for primitive data.
Derived variables constructed from other variables.
Wrapper for a collection of netCDF files.