ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Representation of a NetCDF variable. More...
#include <ERF_NCInterface.H>
Public Member Functions | |
std::string | name () const |
Name of this variable. More... | |
int | ndim () const |
Number of array dimensions for this variable. More... | |
std::vector< size_t > | shape () const |
Shape of the array (size in each array dimension) More... | |
void | put (const double *) const |
Write out the entire variable. More... | |
void | put (const float *) const |
void | put (const int *) const |
void | put (const double *, const std::vector< size_t > &, const std::vector< size_t > &) const |
Write out a slice of data. More... | |
void | put (const double *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
void | put (const float *, const std::vector< size_t > &, const std::vector< size_t > &) const |
Write out a slice of data. More... | |
void | put (const float *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
void | put (const int *, const std::vector< size_t > &, const std::vector< size_t > &) const |
void | put (const int *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
void | put (const char **, const std::vector< size_t > &, const std::vector< size_t > &) const |
void | put (const char **dptr, const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride) const |
void | get (double *) const |
Read the entire variable from file. More... | |
void | get (float *) const |
void | get (int *) const |
void | get (double *, const std::vector< size_t > &, const std::vector< size_t > &) const |
Read a chunk of data from the file. More... | |
void | get (double *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
Read a chunk of data with strides. More... | |
void | get (float *, const std::vector< size_t > &, const std::vector< size_t > &) const |
Read a chunk of data from the file. More... | |
void | get (float *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
Read a chunk of data with strides. More... | |
void | get (int *, const std::vector< size_t > &, const std::vector< size_t > &) const |
void | get (int *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
void | get (char *, const std::vector< size_t > &, const std::vector< size_t > &) const |
Read a chunk of data from the file. More... | |
void | get (char *, const std::vector< size_t > &, const std::vector< size_t > &, const std::vector< ptrdiff_t > &) const |
Read a chunk of data with strides. More... | |
bool | has_attr (const std::string &name) const |
void | put_attr (const std::string &name, const std::string &value) const |
void | put_attr (const std::string &name, const std::vector< double > &value) const |
void | put_attr (const std::string &name, const std::vector< float > &value) const |
void | put_attr (const std::string &name, const std::vector< int > &value) const |
std::string | get_attr (const std::string &name) const |
void | get_attr (const std::string &name, std::vector< double > &value) const |
void | get_attr (const std::string &name, std::vector< float > &value) const |
void | get_attr (const std::string &name, std::vector< int > &value) const |
void | par_access (int cmode) const |
Public Attributes | |
const int | ncid |
File/Group identifier. More... | |
const int | varid |
Variable ID used with NetCDF API. More... | |
Representation of a NetCDF variable.
void ncutils::NCVar::get | ( | char * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
Read a chunk of data from the file.
void ncutils::NCVar::get | ( | char * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
void ncutils::NCVar::get | ( | double * | ptr | ) | const |
void ncutils::NCVar::get | ( | double * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::get | ( | double * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
Read a chunk of data with strides.
Error-checking wrapper for NetCDF function nc_get_vars_double
dptr | Pointer to the data location for get |
start | Starting indices |
count | Count sizes |
stride | Stride length for the data |
void ncutils::NCVar::get | ( | float * | ptr | ) | const |
void ncutils::NCVar::get | ( | float * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::get | ( | float * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
Read a chunk of data with strides.
Error-checking wrapper for NetCDF function nc_get_vars_float
dptr | Pointer to the data location for get |
start | Starting indices |
count | Count sizes |
stride | Stride length for the data |
void ncutils::NCVar::get | ( | int * | ptr | ) | const |
void ncutils::NCVar::get | ( | int * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::get | ( | int * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
std::string ncutils::NCVar::get_attr | ( | const std::string & | name | ) | const |
void ncutils::NCVar::get_attr | ( | const std::string & | name, |
std::vector< double > & | value | ||
) | const |
void ncutils::NCVar::get_attr | ( | const std::string & | name, |
std::vector< float > & | value | ||
) | const |
void ncutils::NCVar::get_attr | ( | const std::string & | name, |
std::vector< int > & | value | ||
) | const |
bool ncutils::NCVar::has_attr | ( | const std::string & | name | ) | const |
std::string ncutils::NCVar::name | ( | ) | const |
Name of this variable.
Error-checking wrapper for NetCDF function nc_inq_varname
Referenced by get_attr(), has_attr(), and put_attr().
int ncutils::NCVar::ndim | ( | ) | const |
void ncutils::NCVar::par_access | ( | int | cmode | ) | const |
void ncutils::NCVar::put | ( | const char ** | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::put | ( | const char ** | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
void ncutils::NCVar::put | ( | const double * | ptr | ) | const |
void ncutils::NCVar::put | ( | const double * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::put | ( | const double * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
Write out a slice of data with with strides (see hyperslab definition in NetCDF)
Error-checking wrapper for NetCDF function nc_put_vars_double
dptr | Pointer to the data to put |
start | Starting indices |
count | Count sizes |
stride | Stride length for the data |
void ncutils::NCVar::put | ( | const float * | ptr | ) | const |
void ncutils::NCVar::put | ( | const float * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::put | ( | const float * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
Write out a slice of data with with strides (see hyperslab definition in NetCDF)
Error-checking wrapper for NetCDF function nc_put_vars_float
dptr | Pointer to the data to put |
start | Starting indices |
count | Count sizes |
stride | Stride length for the data |
void ncutils::NCVar::put | ( | const int * | ptr | ) | const |
void ncutils::NCVar::put | ( | const int * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count | ||
) | const |
void ncutils::NCVar::put | ( | const int * | dptr, |
const std::vector< size_t > & | start, | ||
const std::vector< size_t > & | count, | ||
const std::vector< ptrdiff_t > & | stride | ||
) | const |
void ncutils::NCVar::put_attr | ( | const std::string & | name, |
const std::string & | value | ||
) | const |
void ncutils::NCVar::put_attr | ( | const std::string & | name, |
const std::vector< double > & | value | ||
) | const |
void ncutils::NCVar::put_attr | ( | const std::string & | name, |
const std::vector< float > & | value | ||
) | const |
void ncutils::NCVar::put_attr | ( | const std::string & | name, |
const std::vector< int > & | value | ||
) | const |
std::vector< size_t > ncutils::NCVar::shape | ( | ) | const |
Shape of the array (size in each array dimension)
Error-checking function to get the length of each dimension from a NetCDF identity
const int ncutils::NCVar::ncid |
File/Group identifier.
Referenced by get(), get_attr(), has_attr(), name(), ndim(), par_access(), put(), put_attr(), and shape().
const int ncutils::NCVar::varid |
Variable ID used with NetCDF API.
Referenced by get(), get_attr(), has_attr(), name(), ndim(), par_access(), put(), put_attr(), and shape().