ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ncutils::NCDim Struct Reference

Representation of NetCDF dimension. More...

#include <ERF_NCInterface.H>

Collaboration diagram for ncutils::NCDim:

Public Member Functions

std::string name () const
 Name of this dimension. More...
 
size_t len () const
 Length of this dimension. More...
 

Public Attributes

const int ncid
 File/Group Identifier. More...
 
const int dimid
 Dimension ID used with NetCDF API. More...
 

Detailed Description

Representation of NetCDF dimension.

Member Function Documentation

◆ len()

size_t ncutils::NCDim::len ( ) const

Length of this dimension.

Error-checking wrapper for NetCDF function nc_inq_dimlen

41 {
42  size_t dlen;
43  check_nc_error(nc_inq_dimlen(ncid, dimid, &dlen));
44  return dlen;
45 }
const int dimid
Dimension ID used with NetCDF API.
Definition: ERF_NCInterface.H:42
const int ncid
File/Group Identifier.
Definition: ERF_NCInterface.H:39

◆ name()

std::string ncutils::NCDim::name ( ) const

Name of this dimension.

Error-checking wrapper for NetCDF function nc_inq_dimname

32 {
33  check_nc_error(nc_inq_dimname(ncid, dimid, recname));
34  return std::string(recname);
35 }

Member Data Documentation

◆ dimid

const int ncutils::NCDim::dimid

Dimension ID used with NetCDF API.

Referenced by ncutils::NCGroup::def_array(), len(), and name().

◆ ncid

const int ncutils::NCDim::ncid

File/Group Identifier.

Referenced by len(), and name().


The documentation for this struct was generated from the following files: