NCVar Struct Reference

AMR-Wind API: ncutils::NCVar Struct Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
ncutils::NCVar Struct Reference

Representation of a NetCDF variable. More...

#include <nc_interface.H>

Public Member Functions

std::string name () const
 Name of this variable.
 
int ndim () const
 Number of array dimensions for this variable.
 
std::vector< size_t > shape () const
 Shape of the array (size in each array dimension)
 
void put (const double *) const
 Write out the entire variable.
 
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.
 
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.
 
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 get (double *) const
 Read the entire variable from file.
 
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.
 
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.
 
void get (float *, const std::vector< size_t > &, const std::vector< size_t > &) const
 Read a chunk of data from the file.
 
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.
 
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
 
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 (const int cmode) const
 

Public Attributes

const int ncid
 File/Group identifier.
 
const int varid
 Variable ID used with NetCDF API.
 

Detailed Description

Representation of a NetCDF variable.

Member Function Documentation

◆ get() [1/9]

void ncutils::NCVar::get ( double * ptr) const

Read the entire variable from file.

◆ get() [2/9]

void ncutils::NCVar::get ( double * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

Read a chunk of data from the file.

◆ get() [3/9]

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.

◆ get() [4/9]

void ncutils::NCVar::get ( float * ptr) const

◆ get() [5/9]

void ncutils::NCVar::get ( float * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

Read a chunk of data from the file.

◆ get() [6/9]

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.

◆ get() [7/9]

void ncutils::NCVar::get ( int * ptr) const

◆ get() [8/9]

void ncutils::NCVar::get ( int * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

◆ get() [9/9]

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

◆ get_attr() [1/4]

std::string ncutils::NCVar::get_attr ( const std::string & name) const

◆ get_attr() [2/4]

void ncutils::NCVar::get_attr ( const std::string & name,
std::vector< double > & value ) const

◆ get_attr() [3/4]

void ncutils::NCVar::get_attr ( const std::string & name,
std::vector< float > & value ) const

◆ get_attr() [4/4]

void ncutils::NCVar::get_attr ( const std::string & name,
std::vector< int > & value ) const

◆ has_attr()

bool ncutils::NCVar::has_attr ( const std::string & name) const

◆ name()

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

Name of this variable.

◆ ndim()

int ncutils::NCVar::ndim ( ) const

Number of array dimensions for this variable.

◆ par_access()

void ncutils::NCVar::par_access ( const int cmode) const

◆ put() [1/9]

void ncutils::NCVar::put ( const double * ptr) const

Write out the entire variable.

◆ put() [2/9]

void ncutils::NCVar::put ( const double * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

Write out a slice of data.

◆ put() [3/9]

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)

◆ put() [4/9]

void ncutils::NCVar::put ( const float * ptr) const

◆ put() [5/9]

void ncutils::NCVar::put ( const float * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

Write out a slice of data.

◆ put() [6/9]

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)

◆ put() [7/9]

void ncutils::NCVar::put ( const int * ptr) const

◆ put() [8/9]

void ncutils::NCVar::put ( const int * dptr,
const std::vector< size_t > & start,
const std::vector< size_t > & count ) const

◆ put() [9/9]

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

◆ put_attr() [1/4]

void ncutils::NCVar::put_attr ( const std::string & name,
const std::string & value ) const

◆ put_attr() [2/4]

void ncutils::NCVar::put_attr ( const std::string & name,
const std::vector< double > & value ) const

◆ put_attr() [3/4]

void ncutils::NCVar::put_attr ( const std::string & name,
const std::vector< float > & value ) const

◆ put_attr() [4/4]

void ncutils::NCVar::put_attr ( const std::string & name,
const std::vector< int > & value ) const

◆ shape()

std::vector< size_t > ncutils::NCVar::shape ( ) const

Shape of the array (size in each array dimension)

Member Data Documentation

◆ ncid

const int ncutils::NCVar::ncid

File/Group identifier.

◆ varid

const int ncutils::NCVar::varid

Variable ID used with NetCDF API.


The documentation for this struct was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/ncutils/nc_interface.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/ncutils/nc_interface.cpp