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

Representation of NetCDF dimension. More...

#include <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.

31 {
32  size_t dlen;
33  check_nc_error(nc_inq_dimlen(ncid, dimid, &dlen));
34  return dlen;
35 }
const int dimid
Dimension ID used with NetCDF API.
Definition: NCInterface.H:42
const int ncid
File/Group Identifier.
Definition: NCInterface.H:39

◆ name()

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

Name of this dimension.

25 {
26  check_nc_error(nc_inq_dimname(ncid, dimid, recname));
27  return std::string(recname);
28 }

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: