VAPOR3 3.9.4
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
VAPoR::NetCDFCollection Class Reference

Wrapper for a collection of netCDF files. More...

#include <NetCDFCollection.h>

Inheritance diagram for VAPoR::NetCDFCollection:
Wasp::MyBase VAPoR::NetCDFCFCollection

Classes

class  TimeVaryingVar
 

Public Member Functions

 NetCDFCollection ()
 
virtual ~NetCDFCollection ()
 
virtual int Initialize (const std::vector< string > &files, const std::vector< string > &time_dimnames, const std::vector< string > &time_coordvar)
 
virtual bool VariableExists (string varname) const
 
virtual bool VariableExists (size_t ts, string varname) const
 
virtual std::vector< string > GetVariableNames (int ndim, bool spatial) const
 
virtual std::vector< size_t > GetSpatialDims (string varname) const
 
virtual std::vector< string > GetSpatialDimNames (string varname) const
 
virtual size_t GetTimeDim (string varname) const
 
virtual string GetTimeDimName (string varname) const
 
virtual std::vector< size_t > GetDims (string varname) const
 
virtual std::vector< string > GetDimNames (string varname) const
 
virtual bool IsTimeVarying (string varname) const
 
int GetXType (string varname) const
 
std::vector< string > GetAttNames (string varname) const
 
int GetAttType (string varname, string attname) const
 
void GetAtt (string varname, string attname, std::vector< double > &values) const
 
void GetAtt (string varname, string attname, std::vector< long > &values) const
 
void GetAtt (string varname, string attname, string &values) const
 
virtual std::vector< string > GetDimNames () const
 
virtual std::vector< size_t > GetDims () const
 
virtual std::vector< bool > GetDimsAreTimeVarying () const
 
long GetDimLengthAtTime (string name, long ts)
 
virtual size_t GetNumTimeSteps () const
 
virtual size_t GetNumTimeSteps (string varname) const
 
virtual int GetTime (size_t ts, double &time) const
 
virtual int GetTimes (string varname, std::vector< double > &times) const
 
virtual std::vector< double > GetTimes () const
 
virtual int GetFile (size_t ts, string varname, string &file, size_t &local_ts) const
 
virtual int GetVariableInfo (string varname, NetCDFSimple::Variable &varinfo) const
 
virtual bool GetMissingValue (string varname, double &mv) const
 
virtual int OpenRead (size_t ts, string varname)
 
virtual int Read (size_t start[], size_t count[], double *data, int fd=0)
 
virtual int Read (size_t start[], size_t count[], float *data, int fd=0)
 
virtual int Read (size_t start[], size_t count[], int *data, int fd=0)
 
virtual int Read (size_t start[], size_t count[], char *data, int fd=0)
 
virtual int Read (std::vector< size_t > start, std::vector< size_t > count, double *data, int fd=0)
 
virtual int Read (std::vector< size_t > start, std::vector< size_t > count, float *data, int fd=0)
 
virtual int Read (std::vector< size_t > start, std::vector< size_t > count, int *data, int fd=0)
 
virtual int Read (double *data, int fd=0)
 
virtual int Read (float *data, int fd=0)
 
virtual int Read (char *data, int fd=0)
 
virtual int Read (int *data, int fd=0)
 
virtual int ReadSlice (float *data, int fd=0)
 
virtual int SeekSlice (int offset, int whence, int fd=0)
 
virtual int Close (int fd=0)
 
virtual void SetMissingValueAttName (string attname)
 
virtual std::vector< string > GetFailedVars () const
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

bool _GetVariableInfo (string varname, NetCDFSimple::Variable &variable) const
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Friends

std::ostream & operator<< (std::ostream &o, const NetCDFCollection &ncdfc)
 

Additional Inherited Members

- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message.
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
static bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 

Detailed Description

Wrapper for a collection of netCDF files.

Author
John Clyne
Version
Revision
1.7
Date
Date
2013/05/16 21:39:38

This class treats a collection of netCDF files as a single, time-varying data set, providing a unified interface for accessing named 0D, 1D, 2D, and 3D spatial variables at a specified timestep, independent of which netCDF file contains the data.

The netCDF variables may be "explicitly" time-varying: the slowest varying dimension may correspond to time, while the remaining dimensions correspond to space. Or the variables may be implicitly time-varying, possessing no explicit time dimension, in which case the time index of a variable is determined by file ordering. For example, if the variable "v" is found in the files "a.nc" and "b.nc" and nowhere else, and "a.nc" preceeds "b.nc" in the list of files provided to the class constructor, then a.nc is assumed to contain "v" at time step 0, and "b.nc" contains "v" at time step 1.

Note
The specification of dimensions and coordinates in this class follows the netCDF API convention of ordering from slowest varying dimension to fastest varying dimension. For example, if 'dims' is a vector of dimensions, then dims[0] is the slowest varying dimension, dim[1] is the next slowest, and so on. This ordering is the opposite of the ordering used by most of the VAPoR API.

Several file organizations are supported and discussed below. To ease discussion we introduce the terminology:

define TD : Time Dimension
define TCV : Time Coordinate Variable
define TVV : an explicitly Time Varying Variable (it has a time dimension)
define ITVV : an Implicit Time Varying Variable (has no time dimension, but has multiple occurences => order determines time)
define CV: Constant Variable (has no TD, occurs only once). CV variables are define for all time steps

Four file organizations are supported as described below:

case 1: No TD specified (therefore no TCV):

case 2: TD specified, but no TCV:

case 3a: TD & TCV specified, TCV appears in only file:

case 3b: TD & TCV specified, TCV appears in every file with TVV:

Definition at line 93 of file NetCDFCollection.h.

Constructor & Destructor Documentation

◆ NetCDFCollection()

VAPoR::NetCDFCollection::NetCDFCollection ( )

◆ ~NetCDFCollection()

virtual VAPoR::NetCDFCollection::~NetCDFCollection ( )
virtual

Member Function Documentation

◆ _GetVariableInfo()

bool VAPoR::NetCDFCollection::_GetVariableInfo ( string  varname,
NetCDFSimple::Variable variable 
) const
protected

◆ Close()

virtual int VAPoR::NetCDFCollection::Close ( int  fd = 0)
virtual

Close the currently opened variable

Parameters
[in]fdA currently opened file descriptor returned by OpenRead().
See also
OpenRead()

◆ GetAtt() [1/3]

void VAPoR::NetCDFCollection::GetAtt ( string  varname,
string  attname,
std::vector< double > &  values 
) const

Return attribute values for attribute of type float

Return the values of the named attribute converted to type float.

Note
Attributes of type int are cast to float
All attributes with floating point representation of any precision are returned by this method. Attributes that do not have floating point internal representations can not be returned.
Parameters
[in]attnameName of the attribute
[out]valuesA vector of attribute values

◆ GetAtt() [2/3]

void VAPoR::NetCDFCollection::GetAtt ( string  varname,
string  attname,
std::vector< long > &  values 
) const

◆ GetAtt() [3/3]

void VAPoR::NetCDFCollection::GetAtt ( string  varname,
string  attname,
string &  values 
) const

◆ GetAttNames()

std::vector< string > VAPoR::NetCDFCollection::GetAttNames ( string  varname) const

Return a list of available attribute's names

Returns a vector of all attribute names for the variable, varname. If varname is the empty string the names of all of the global attributes are returned. If varname is not defined an empty vector is returned.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
Return values
attnamesA vector of returned attribute names

◆ GetAttType()

int VAPoR::NetCDFCollection::GetAttType ( string  varname,
string  attname 
) const

Return the netCDF external data type for an attribute

Returns the nc_type of the named variable attribute.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
[in]nameName of the attribute.
Return values
Ifan attribute named by name does not exist, a negative value is returned.

◆ GetDimLengthAtTime()

long VAPoR::NetCDFCollection::GetDimLengthAtTime ( string  name,
long  ts 
)

◆ GetDimNames() [1/2]

virtual std::vector< string > VAPoR::NetCDFCollection::GetDimNames ( ) const
inlinevirtual

Return the names of all the dimensions.

Returns a list of all dimension names defined by all netCDF files in the entire collection. The ordering of the returned list coresponds to the ordering of the list of dimenension lengths returned by GetDims(). I.e. the length of the dimension with name GetDimNames()[i] is GetDims[i].

Return values
dimnamesA vector containing all dimension names.
See also
GetDims()

Definition at line 344 of file NetCDFCollection.h.

◆ GetDimNames() [2/2]

virtual std::vector< string > VAPoR::NetCDFCollection::GetDimNames ( string  varname) const
virtual

Return a variable's temporal and spatial dimension names

Returns the ordered list of temporal and spatial dimension names of the named variable.

Note
The order follows the netCDF convention (slowest varying dimension is the first vector element returned), not the VDC convention.
Parameters
[in]varnameName of variable
Return values
dimnamesAn ordered vector containing the variable's temporal and spatial dimension names. If varname is not defined an empty list is returned.

◆ GetDims() [1/2]

virtual std::vector< size_t > VAPoR::NetCDFCollection::GetDims ( ) const
inlinevirtual

Return the lengths of all the dimensions.

Returns a list of all dimension lengths defined by all netCDF files in the entire collection. The ordering of the returned list coresponds to the ordering of the list of dimenension names returned by GetDimNames(). I.e. the length of the dimension with name GetDimNames()[i] is GetDims[i].

Return values
dimlensA vector containing all dimension lengths.
See also
GetDimNames()

Definition at line 359 of file NetCDFCollection.h.

◆ GetDims() [2/2]

virtual std::vector< size_t > VAPoR::NetCDFCollection::GetDims ( string  varname) const
virtual

Return a variable's temporal and spatial dimensions

Returns the ordered list of temporal and spatial dimensions of the named variable.

Note
The order follows the netCDF convention (slowest varying dimension is the first vector element returned), not the VDC convention.
Parameters
[in]varnameName of variable
Return values
dimsAn ordered vector containing the variables temporal and spatial dimensions. If varname is not defined a zero length vector is returned

◆ GetDimsAreTimeVarying()

virtual std::vector< bool > VAPoR::NetCDFCollection::GetDimsAreTimeVarying ( ) const
inlinevirtual

Definition at line 361 of file NetCDFCollection.h.

◆ GetFailedVars()

virtual std::vector< string > VAPoR::NetCDFCollection::GetFailedVars ( ) const
inlinevirtual

Return a list of variables that are not available for access

This method returns a list of variables that were detected in the collection of netCDF files but are not accessible from the NetCDFCollection class.

Definition at line 599 of file NetCDFCollection.h.

◆ GetFile()

virtual int VAPoR::NetCDFCollection::GetFile ( size_t  ts,
string  varname,
string &  file,
size_t &  local_ts 
) const
virtual

Return the path to the netCDF file containing a variable

This method returns the path to the netCDF file containing the variable varname, at the time step ts.

Parameters
[in]tstime step of variable
[in]varnameName of variable
[out]fileThe netCDF file path
[out]local_tslocal time index of variable within file
Return values
retvalA negative int is returned on failure.

◆ GetMissingValue()

virtual bool VAPoR::NetCDFCollection::GetMissingValue ( string  varname,
double &  mv 
) const
virtual

Return the missing value, if any, for a variable

This method returns the value of the missing data value marker, if defined, for the variable named by varname.

Parameters
[in]varnameThe variable name
[out]mvThe missing value for the variabled name by varname
Return values
boolThe boolean true is returned if a missing value is defined. If no missing variable is defined the return value is false and the value of mv is not defined.

Reimplemented in VAPoR::NetCDFCFCollection.

◆ GetNumTimeSteps() [1/2]

virtual size_t VAPoR::NetCDFCollection::GetNumTimeSteps ( ) const
inlinevirtual

Return the number of time steps in the data collection all variables

Return the number of time steps present. The number of time steps returned is the number of unique times present, and

Note
Not all variables in a collection need have the same number of time steps
Parameters
[in]varnameName of variable
Return values
valueThe number of time steps

Definition at line 378 of file NetCDFCollection.h.

◆ GetNumTimeSteps() [2/2]

virtual size_t VAPoR::NetCDFCollection::GetNumTimeSteps ( string  varname) const
inlinevirtual

Return the number of time available for the named variable

Return the number of time steps present for the variable named by varname.

Note
Not all variables in a collection need have the same number of time steps
Parameters
[in]varnameName of variable
Return values
valueThe number of time steps. If varname is either not defined, or is defined but not time varying, 0 is returned.

Definition at line 393 of file NetCDFCollection.h.

◆ GetSpatialDimNames()

virtual std::vector< string > VAPoR::NetCDFCollection::GetSpatialDimNames ( string  varname) const
virtual

Return a variable's spatial dimension names

Returns the ordered list of spatial dimension names of the named variable.

Note
The order follows the netCDF convention (slowest varying dimension is the first vector element returned), not the VDC convention.
Parameters
[in]varnameName of variable
Return values
dimnamesAn ordered vector containing the variable's spatial dimension names. If varname is not defined an empty list is returned.

◆ GetSpatialDims()

virtual std::vector< size_t > VAPoR::NetCDFCollection::GetSpatialDims ( string  varname) const
virtual

Return a variable's spatial dimensions

Returns the ordered list of spatial dimensions of the named variable.

Note
The order follows the netCDF convention (slowest varying dimension is the first vector element returned), not the VDC convention.
Parameters
[in]varnameName of variable
Return values
dimsAn ordered vector containing the variables spatial dimensions. If varname is not defined a zero length vector is returned

◆ GetTime()

virtual int VAPoR::NetCDFCollection::GetTime ( size_t  ts,
double &  time 
) const
virtual

Return the user time associated with a time step

This method returns the time, in user-defined coordinates, associated with the time step, ts. If no time coordinate variable was specified the user time is equivalent to the time step, ts.

Parameters
[in]tsA valid data set time step in the range from zero to GetNumTimeSteps() - 1.
[out]timeThe user time
Return values
retvalA negative int is returned on failure.

◆ GetTimeDim()

virtual size_t VAPoR::NetCDFCollection::GetTimeDim ( string  varname) const
virtual

Return a variable's time dimension

Returns time dimension of the named variable.

Parameters
[in]varnameName of variable
Return values
dimNumber of time steps (time dimension) If varname is invalid or varname is not time varying 0 is returned.

◆ GetTimeDimName()

virtual string VAPoR::NetCDFCollection::GetTimeDimName ( string  varname) const
virtual

Return a variable's time dimension name

Returns the time dimension name of the named variable.

Parameters
[in]varnameName of variable
Return values
nameA string containing the variable's time dimension name. If varname is invalid or varname is not time varying the empty string is returned.

◆ GetTimes() [1/2]

virtual std::vector< double > VAPoR::NetCDFCollection::GetTimes ( ) const
inlinevirtual

Return all the user times for this collection

This method returns the times, in user-defined coordinates, for this data collection.

Return values
retvaltimes A vector of user times.
See also
Initialize()

Definition at line 435 of file NetCDFCollection.h.

◆ GetTimes() [2/2]

virtual int VAPoR::NetCDFCollection::GetTimes ( string  varname,
std::vector< double > &  times 
) const
virtual

Return all the user times associated with a variable

This method returns the times, in user-defined coordinates, associated with the the variable, varname.

Parameters
[in]varnameName of variable
[times]time A vector of user times ordered by time step
Return values
retvalA negative int is returned on failure.

◆ GetVariableInfo()

virtual int VAPoR::NetCDFCollection::GetVariableInfo ( string  varname,
NetCDFSimple::Variable varinfo 
) const
virtual

Return the NetCDFSimple::Variable for the named variable

This method copies the contents of the NetCDFSimple::Variable class for the named variable into varinfo

Parameters
[in]varnameName of variable
Return values
retvalA negative int is returned on failure.

◆ GetVariableNames()

virtual std::vector< string > VAPoR::NetCDFCollection::GetVariableNames ( int  ndim,
bool  spatial 
) const
virtual

Return a list of variables with a given rank

Returns a list of variables having a dimension rank of ndim. If spatial is true only the variable's spatial dimension rank is examined. Thus if spatial is true, and the named variable is explicitly time varying, the time-varying dimension is not counted. For example, if a variable named 'v' is defined with 4 dimensions in the netCDF file, and the slowest varying dimension name matches a named dimension specified in Initialize() by time_dimnames, then the variable 'v' would be returned by a query with ndim==3 and spatial==true.

Parameters
[in]ndimRank of dimensions
[in]spatialOnly compare spatial dimensions against ndim

◆ GetXType()

int VAPoR::NetCDFCollection::GetXType ( string  varname) const

Return the netCDF external data type a variable

Returns the nc_type of the named variable

Parameters
[in]varnameThe name of the variable to query.
Return values
Ifa variable named by name does not exist, a negative value is returned.

◆ Initialize()

virtual int VAPoR::NetCDFCollection::Initialize ( const std::vector< string > &  files,
const std::vector< string > &  time_dimnames,
const std::vector< string > &  time_coordvar 
)
virtual

Initialze a new collection

Variables contained in the netCDF files may be explicitly time-varying (i.e. have a time dimension defined), or their time step may be determined implicitly by which file they are contained in.

The time ordering of time-varying variables is determined by:

  1. A 1D time coordinate variable, if it exists
  2. A time dimension, if it exists
  3. The ordering of the files in files in which the variable occurs
Parameters
[in]filesA list of file containing time-varying 1D, 2D, and 3D variables. In the absense of an explicit time dimension, or time coordinate variable, the ordering of the files determines the the time steps of the variables contained therein.
[in]time_dimnamesA list of netCDF time dimensions. A variable whose slowest varying dimension name matches a name in time_dimnames is an explict time-varying variable with a time dimension.
[in]time_coordvarThe name of a coordinate variable containing time data. If a 1D variable with a name given by time_coordvar exists, this variable will be used to determine the time associated with each time step of a variable.

◆ IsTimeVarying()

virtual bool VAPoR::NetCDFCollection::IsTimeVarying ( string  varname) const
virtual

Return true if variable is time varying

Returns true if the variable named by varname has a time varying coordinate

Parameters
[in]varnameName of variable

◆ OpenRead()

virtual int VAPoR::NetCDFCollection::OpenRead ( size_t  ts,
string  varname 
)
virtual

Open the named variable for reading

This method prepares a netCDF variable, indicated by a variable name and time step pair, for subsequent read operations by methods of this class. A small, non-negative integer for use in subsequent read operations is returned. The file descriptor returned by a successful call will be the lowest-numbered file descriptor not currently open for the process, starting with zero.

Parameters
[in]tsTime step of the variable to read
[in]varnameName of the variable to read
Return values
statusReturns a non-negative file descriptor on success
See also
Read(), ReadSlice()

Reimplemented in VAPoR::NetCDFCFCollection.

◆ Read() [1/11]

virtual int VAPoR::NetCDFCollection::Read ( char *  data,
int  fd = 0 
)
virtual

◆ Read() [2/11]

virtual int VAPoR::NetCDFCollection::Read ( double *  data,
int  fd = 0 
)
virtual

◆ Read() [3/11]

virtual int VAPoR::NetCDFCollection::Read ( float *  data,
int  fd = 0 
)
virtual

◆ Read() [4/11]

virtual int VAPoR::NetCDFCollection::Read ( int *  data,
int  fd = 0 
)
virtual

◆ Read() [5/11]

virtual int VAPoR::NetCDFCollection::Read ( size_t  start[],
size_t  count[],
char *  data,
int  fd = 0 
)
virtual

◆ Read() [6/11]

virtual int VAPoR::NetCDFCollection::Read ( size_t  start[],
size_t  count[],
double *  data,
int  fd = 0 
)
virtual

Read data from the currently opened variable

Read the hyperslice defined by start and count from the currently opened variable into the buffer pointed to by data.

This method is identical in functionality to the netCDF function, nc_get_var_float, with the following exception:

If the currently opened variable is explicitly time-varying (has a time-varying dimension), only the spatial dimensions should be provied by start and count. I.e. if the variable contains n dimensions in the netCDF file, only the n-1 fastest-varying (spatial) dimensions should be specified.

Parameters
[in]startStart vector with one element for each dimension
[in]countCount vector with one element for each dimension
[in]fdA currently opened file descriptor returned by OpenRead().
Return values
retvalA negative int is returned on failure.
See also
NetCDFSimple::Read(), SetMissingValueAttName(), SetMissingValueAttName()

◆ Read() [7/11]

virtual int VAPoR::NetCDFCollection::Read ( size_t  start[],
size_t  count[],
float *  data,
int  fd = 0 
)
virtual

◆ Read() [8/11]

virtual int VAPoR::NetCDFCollection::Read ( size_t  start[],
size_t  count[],
int *  data,
int  fd = 0 
)
virtual

◆ Read() [9/11]

virtual int VAPoR::NetCDFCollection::Read ( std::vector< size_t >  start,
std::vector< size_t >  count,
double *  data,
int  fd = 0 
)
virtual

◆ Read() [10/11]

virtual int VAPoR::NetCDFCollection::Read ( std::vector< size_t >  start,
std::vector< size_t >  count,
float *  data,
int  fd = 0 
)
virtual

◆ Read() [11/11]

virtual int VAPoR::NetCDFCollection::Read ( std::vector< size_t >  start,
std::vector< size_t >  count,
int *  data,
int  fd = 0 
)
virtual

◆ ReadSlice()

virtual int VAPoR::NetCDFCollection::ReadSlice ( float *  data,
int  fd = 0 
)
virtual

Read a 2D slice from a 2D or 3D variable

The method will read 2D slices from a 2D or 3D variable until all slices have been processed. For 3D data each call to ReadSlice() will return a subsequent slice until all slices have been processed. The total number of slices is the value of the slowest varying dimension.

Parameters
[in]fdA currently opened file descriptor returned by OpenRead().
[out]dataThe possibly resampled 2D data slice. It is the caller's responsibility to ensure that data points to sufficient space.
Return values
statusReturns 1 if successful, 0 if there are no more slices to read, and a negative integer on error.
See also
OpenRead(), Read(), SetMissingValueAttName(), SetMissingValueAttName()

◆ SeekSlice()

virtual int VAPoR::NetCDFCollection::SeekSlice ( int  offset,
int  whence,
int  fd = 0 
)
virtual

Set the variable slice position indicator

This method changes the position of the slice indicator for an open variable. Subsequent reads with ReadSlice() will position the slice offset based on offset. If whence is 0 then offset is added to the first variable slice. If whence is one then offset is added to the current slice position. If whence is 2 then offset is added to the last slice. If the resulting slice position, after adding offset, lies outside of the variable the offset will be mapped to the closest valid value (i.e. the first or last slice).

Parameters
[in]offsetinteger slice offset
[in]whenceone of 0, 1, 2
[in]fdA currently opened file descriptor returned by OpenRead().
Return values
Anegative int is returned if fd is not valid (an open file descriptor) or if whence is not one of 0, 1, or 2.

◆ SetMissingValueAttName()

virtual void VAPoR::NetCDFCollection::SetMissingValueAttName ( string  attname)
inlinevirtual

Identify missing value variable attribute name

This method informs the class instance of the name of a netCDF variable attribute, if one exists, that contains the missing value for the variable.

Parameters
attnameName of netCDF variable attribute specifying the missing value

Definition at line 591 of file NetCDFCollection.h.

◆ VariableExists() [1/2]

virtual bool VAPoR::NetCDFCollection::VariableExists ( size_t  ts,
string  varname 
) const
virtual

Return a boolean indicating whether a variable is defined for a particular time step.

This method returns true if the variable named by varname is contained in the data collection and defined for time step ts. The variable may be present inside of a netCDF file, or may be a variable derived the the NetCDFCFCollection class. In the latter case all native variables used to construct varname must also be present.

Parameters
[in]tsA valid data set time step in the range from zero to GetNumTimeSteps() - 1.
[in]varnameA netCDF variable name
Return values
boolReturns true if varname is contained any one of the netCDF files used to instantiate the class, or if varname is a derived variable.
See also
GetTimes(), GetNumTimeSteps(), GetVariables()

◆ VariableExists() [2/2]

virtual bool VAPoR::NetCDFCollection::VariableExists ( string  varname) const
virtual

Return a boolean indicating whether a variable exists in the data collection.

This method returns true if the variable named by varname is contained in the data collection. The variable may be present inside of a netCDF file, or may be a variable derived the the NetCDFCFCollection class. In the latter case all native variables used to construct varname must also be present.

Parameters
[in]varnameA netCDF variable name
Return values
boolReturns true if varname is contained any one of the netCDF files used to instantiate the class, or if varname is a derived variable.
See also
GetTimes(), GetVariables()

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  o,
const NetCDFCollection ncdfc 
)
friend

The documentation for this class was generated from the following file: