ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Representation of a NetCDF group. More...
#include <ERF_NCInterface.H>
Public Member Functions | |
std::string | name () const |
Name of this group. More... | |
std::string | full_name () const |
Full name for this group. More... | |
int | num_groups () const |
Number of sub-groups within this group. More... | |
int | num_dimensions () const |
Number of dimensions in this group. More... | |
int | num_variables () const |
Number of variables within this group. More... | |
int | num_attributes () const |
Number of attributes within this group. More... | |
bool | has_group (const std::string &) const |
Check if a group exists. More... | |
bool | has_dim (const std::string &) const |
Check if a dimension exists by name. More... | |
bool | has_var (const std::string &) const |
Check if a variable exists by name. More... | |
bool | has_attr (const std::string &) const |
Check if an attribute exists. More... | |
NCGroup | group (const std::string &) const |
NCDim | dim (const std::string &) const |
Get the dimension instance by name. More... | |
NCVar | var (const std::string &) const |
Get the variable instance by name. More... | |
void | def_dim (const std::string &, size_t len) const |
Define new dimension. More... | |
void | def_array (const std::string &name, nc_type dtype, const std::vector< std::string > &) const |
Define an array. More... | |
void | def_var (const std::string &name, const nc_type dtype, const std::vector< std::string > &dnames) const |
Define a variable (wrapper for def_array) More... | |
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 |
std::vector< NCGroup > | all_groups () const |
Return a list of all groups defined in this group. More... | |
std::vector< NCDim > | all_dims () const |
Return a list of all dimensions defined in this group. More... | |
std::vector< NCVar > | all_vars () const |
Return a list of all variables defined in this group. More... | |
void | enter_def_mode () const |
Enter definition mode (not needed for NetCDF4 format) More... | |
void | exit_def_mode () const |
Exit definition mode. More... | |
Public Attributes | |
const int | ncid |
Identifier used with NetCDF API calls. More... | |
Protected Member Functions | |
NCGroup (const int id) | |
NCGroup (const int id, const NCGroup *) | |
Representation of a NetCDF group.
|
inlineprotected |
Referenced by group().
std::vector< NCDim > ncutils::NCGroup::all_dims | ( | ) | const |
Return a list of all dimensions defined in this group.
std::vector< NCGroup > ncutils::NCGroup::all_groups | ( | ) | const |
Return a list of all groups defined in this group.
std::vector< NCVar > ncutils::NCGroup::all_vars | ( | ) | const |
Return a list of all variables defined in this group.
void ncutils::NCGroup::def_array | ( | const std::string & | name, |
nc_type | dtype, | ||
const std::vector< std::string > & | dnames | ||
) | const |
Define an array.
Referenced by def_var().
void ncutils::NCGroup::def_dim | ( | const std::string & | name, |
size_t | len | ||
) | const |
|
inline |
Define a variable (wrapper for def_array)
NCDim ncutils::NCGroup::dim | ( | const std::string & | name | ) | const |
Get the dimension instance by name.
Referenced by def_array().
void ncutils::NCGroup::enter_def_mode | ( | ) | const |
Enter definition mode (not needed for NetCDF4 format)
void ncutils::NCGroup::exit_def_mode | ( | ) | const |
Exit definition mode.
std::string ncutils::NCGroup::full_name | ( | ) | const |
Full name for this group.
std::string ncutils::NCGroup::get_attr | ( | const std::string & | name | ) | const |
void ncutils::NCGroup::get_attr | ( | const std::string & | name, |
std::vector< double > & | value | ||
) | const |
void ncutils::NCGroup::get_attr | ( | const std::string & | name, |
std::vector< float > & | value | ||
) | const |
void ncutils::NCGroup::get_attr | ( | const std::string & | name, |
std::vector< int > & | value | ||
) | const |
NCGroup ncutils::NCGroup::group | ( | const std::string & | name | ) | const |
bool ncutils::NCGroup::has_attr | ( | const std::string & | name | ) | const |
bool ncutils::NCGroup::has_dim | ( | const std::string & | name | ) | const |
bool ncutils::NCGroup::has_group | ( | const std::string & | name | ) | const |
bool ncutils::NCGroup::has_var | ( | const std::string & | name | ) | const |
std::string ncutils::NCGroup::name | ( | ) | const |
Name of this group.
Referenced by ncutils::NCFile::create(), ncutils::NCFile::create_par(), def_array(), def_dim(), def_var(), dim(), get_attr(), group(), has_attr(), has_dim(), has_group(), has_var(), ncutils::NCFile::open(), ncutils::NCFile::open_par(), put_attr(), and var().
int ncutils::NCGroup::num_attributes | ( | ) | const |
Number of attributes within this group.
int ncutils::NCGroup::num_dimensions | ( | ) | const |
Number of dimensions in this group.
Referenced by all_dims().
int ncutils::NCGroup::num_groups | ( | ) | const |
Number of sub-groups within this group.
Referenced by all_groups().
int ncutils::NCGroup::num_variables | ( | ) | const |
Number of variables within this group.
Referenced by all_vars().
void ncutils::NCGroup::put_attr | ( | const std::string & | name, |
const std::string & | value | ||
) | const |
void ncutils::NCGroup::put_attr | ( | const std::string & | name, |
const std::vector< double > & | value | ||
) | const |
void ncutils::NCGroup::put_attr | ( | const std::string & | name, |
const std::vector< float > & | value | ||
) | const |
void ncutils::NCGroup::put_attr | ( | const std::string & | name, |
const std::vector< int > & | value | ||
) | const |
NCVar ncutils::NCGroup::var | ( | const std::string & | name | ) | const |
const int ncutils::NCGroup::ncid |
Identifier used with NetCDF API calls.
Referenced by all_dims(), all_groups(), all_vars(), ncutils::NCFile::close(), ncutils::NCFile::create(), ncutils::NCFile::create_par(), def_array(), def_dim(), dim(), enter_def_mode(), exit_def_mode(), full_name(), get_attr(), group(), has_attr(), has_dim(), has_group(), has_var(), name(), num_attributes(), num_dimensions(), num_groups(), num_variables(), ncutils::NCFile::open(), ncutils::NCFile::open_par(), put_attr(), var(), and ncutils::NCFile::~NCFile().