REMORA
Regional Modeling of Oceans Refined Adaptively
Loading...
Searching...
No Matches
ncutils::NCVar Struct Reference

Representation of a NetCDF variable. More...

#include <REMORA_NCInterface.H>

Collaboration diagram for ncutils::NCVar:

Public Member Functions

std::string name () const
 Name of this variable.
 
int ndim () const
 Number of array dimensions for this variable.
 
std::vector< MPI_Offset > shape () const
 Shape of the array (size in each array dimension)
 
void put (const double *ptr) const
 Write out the entire double variable.
 
void put (const float *ptr) const
 Write out the entire float variable.
 
void put (const int *ptr) const
 Write out the entire int variable.
 
void put (const double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data.
 
void put_all (const double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data, collective.
 
void iput (const double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, int *request) const
 Write out a slice of data with with strides (see hyperslab definition in NetCDF)
 
void put (const double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides.
 
void put_all (const double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides , collective.
 
void put (const float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data.
 
void put_all (const float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data, collective.
 
void put (const float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides (see hyperslab definition in NetCDF)
 
void put_all (const float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides, collective.
 
void put (const int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data.
 
void put_all (const int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of data, collective.
 
void put (const int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides (see hyperslab definition in NetCDF)
 
void put_all (const int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of data with with strides, collective.
 
void put (const char **dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Write out a slice of string data.
 
void put (const char **dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Write out a slice of string data with stride.
 
void get (double *ptr) const
 Read the entire variable from file.
 
void get (float *ptr) const
 Read the entire variable from file.
 
void get (int *ptr) const
 Read the entire variable from file.
 
void get (double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file.
 
void get_all (double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file, collective.
 
void get (double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides.
 
void get_all (double *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides, collective.
 
void get (float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file.
 
void get_all (float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from file, collective.
 
void get (float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides.
 
void get_all (float *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides, collective.
 
void get (int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file.
 
void get_all (int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file, collective.
 
void get (int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides.
 
void get_all (int *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides, collective.
 
void get (char *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count) const
 Read a chunk of data from the file.
 
void get (char *dptr, const std::vector< MPI_Offset > &start, const std::vector< MPI_Offset > &count, const std::vector< MPI_Offset > &stride) const
 Read a chunk of data with strides.
 
bool has_attr (const std::string &name) const
 Whether a variable has an attribute with name.
 
void put_attr (const std::string &name, const std::string &value) const
 Set attribute "name" to "value".
 
void put_attr (const std::string &name, const std::vector< double > &value) const
 Set attribute "name" to "value".
 
void put_attr (const std::string &name, const std::vector< float > &value) const
 Set attribute "name" to "value".
 
void put_attr (const std::string &name, const std::vector< int > &value) const
 Set attribute "name" to "value".
 
std::string get_attr (const std::string &name) const
 Read attribute from file.
 
void get_attr (const std::string &name, std::vector< double > &value) const
 Read attribute from file.
 
void get_attr (const std::string &name, std::vector< float > &value) const
 Read attribute from file.
 
void get_attr (const std::string &name, std::vector< int > &value) const
 Read attribute from file.
 

Public Attributes

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

Detailed Description

Representation of a NetCDF variable.

Definition at line 51 of file REMORA_NCInterface.H.

Member Function Documentation

◆ get() [1/11]

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

Read a chunk of data from the file.

Definition at line 207 of file REMORA_NCInterface.cpp.

◆ get() [2/11]

void ncutils::NCVar::get ( char *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Read a chunk of data with strides.

Definition at line 211 of file REMORA_NCInterface.cpp.

◆ get() [3/11]

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

Read a chunk of data from the file.

Definition at line 153 of file REMORA_NCInterface.cpp.

◆ get() [4/11]

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

Read a chunk of data with strides.

Definition at line 161 of file REMORA_NCInterface.cpp.

◆ get() [5/11]

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

Read the entire variable from file.

Definition at line 141 of file REMORA_NCInterface.cpp.

◆ get() [6/11]

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

Read a chunk of data from the file.

Definition at line 171 of file REMORA_NCInterface.cpp.

◆ get() [7/11]

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

Read a chunk of data with strides.

Definition at line 179 of file REMORA_NCInterface.cpp.

◆ get() [8/11]

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

Read the entire variable from file.

Definition at line 145 of file REMORA_NCInterface.cpp.

◆ get() [9/11]

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

Read a chunk of data from the file.

Definition at line 189 of file REMORA_NCInterface.cpp.

◆ get() [10/11]

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

Read a chunk of data with strides.

Definition at line 197 of file REMORA_NCInterface.cpp.

◆ get() [11/11]

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

Read the entire variable from file.

Definition at line 149 of file REMORA_NCInterface.cpp.

◆ get_all() [1/6]

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

Read a chunk of data from the file, collective.

Definition at line 157 of file REMORA_NCInterface.cpp.

◆ get_all() [2/6]

void ncutils::NCVar::get_all ( double *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Read a chunk of data with strides, collective.

Definition at line 166 of file REMORA_NCInterface.cpp.

◆ get_all() [3/6]

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

Read a chunk of data from file, collective.

Definition at line 175 of file REMORA_NCInterface.cpp.

◆ get_all() [4/6]

void ncutils::NCVar::get_all ( float *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Read a chunk of data with strides, collective.

Definition at line 184 of file REMORA_NCInterface.cpp.

◆ get_all() [5/6]

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

Read a chunk of data from the file, collective.

Definition at line 193 of file REMORA_NCInterface.cpp.

◆ get_all() [6/6]

void ncutils::NCVar::get_all ( int *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Read a chunk of data with strides, collective.

Definition at line 202 of file REMORA_NCInterface.cpp.

◆ get_attr() [1/4]

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

Read attribute from file.

Definition at line 239 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ get_attr() [2/4]

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

Read attribute from file.

Definition at line 248 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ get_attr() [3/4]

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

Read attribute from file.

Definition at line 255 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ get_attr() [4/4]

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

Read attribute from file.

Definition at line 262 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ has_attr()

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

Whether a variable has an attribute with name.

Definition at line 216 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ iput()

void ncutils::NCVar::iput ( const double *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
int *  request 
) const

Write out a slice of data with with strides (see hyperslab definition in NetCDF)

Write out a slice of data, non-blocking.

Definition at line 81 of file REMORA_NCInterface.cpp.

◆ name()

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

Name of this variable.

Definition at line 34 of file REMORA_NCInterface.cpp.

Referenced by get_attr(), get_attr(), get_attr(), get_attr(), has_attr(), put_attr(), put_attr(), put_attr(), and put_attr().

Here is the caller graph for this function:

◆ ndim()

int ncutils::NCVar::ndim ( ) const

Number of array dimensions for this variable.

Definition at line 39 of file REMORA_NCInterface.cpp.

Referenced by shape().

Here is the caller graph for this function:

◆ put() [1/11]

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

Write out a slice of string data.

Definition at line 132 of file REMORA_NCInterface.cpp.

◆ put() [2/11]

void ncutils::NCVar::put ( const char **  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Write out a slice of string data with stride.

Definition at line 136 of file REMORA_NCInterface.cpp.

◆ put() [3/11]

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

Write out a slice of data.

Definition at line 71 of file REMORA_NCInterface.cpp.

◆ put() [4/11]

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

Write out a slice of data with with strides.

Definition at line 86 of file REMORA_NCInterface.cpp.

◆ put() [5/11]

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

Write out the entire double variable.

Definition at line 59 of file REMORA_NCInterface.cpp.

Referenced by REMORA::WriteNCPlotFile_which().

Here is the caller graph for this function:

◆ put() [6/11]

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

Write out a slice of data.

Definition at line 96 of file REMORA_NCInterface.cpp.

◆ put() [7/11]

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

Write out a slice of data with with strides (see hyperslab definition in NetCDF)

Definition at line 104 of file REMORA_NCInterface.cpp.

◆ put() [8/11]

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

Write out the entire float variable.

Definition at line 63 of file REMORA_NCInterface.cpp.

◆ put() [9/11]

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

Write out a slice of data.

Definition at line 114 of file REMORA_NCInterface.cpp.

◆ put() [10/11]

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

Write out a slice of data with with strides (see hyperslab definition in NetCDF)

Definition at line 122 of file REMORA_NCInterface.cpp.

◆ put() [11/11]

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

Write out the entire int variable.

Definition at line 67 of file REMORA_NCInterface.cpp.

◆ put_all() [1/6]

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

Write out a slice of data, collective.

Definition at line 76 of file REMORA_NCInterface.cpp.

◆ put_all() [2/6]

void ncutils::NCVar::put_all ( const double *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Write out a slice of data with with strides , collective.

Definition at line 91 of file REMORA_NCInterface.cpp.

◆ put_all() [3/6]

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

Write out a slice of data, collective.

Definition at line 100 of file REMORA_NCInterface.cpp.

◆ put_all() [4/6]

void ncutils::NCVar::put_all ( const float *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Write out a slice of data with with strides, collective.

Definition at line 109 of file REMORA_NCInterface.cpp.

◆ put_all() [5/6]

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

Write out a slice of data, collective.

Definition at line 118 of file REMORA_NCInterface.cpp.

◆ put_all() [6/6]

void ncutils::NCVar::put_all ( const int *  dptr,
const std::vector< MPI_Offset > &  start,
const std::vector< MPI_Offset > &  count,
const std::vector< MPI_Offset > &  stride 
) const

Write out a slice of data with with strides, collective.

Definition at line 127 of file REMORA_NCInterface.cpp.

◆ put_attr() [1/4]

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

Set attribute "name" to "value".

Definition at line 223 of file REMORA_NCInterface.cpp.

Referenced by REMORA::WriteNCPlotFile_which().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ put_attr() [2/4]

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

Set attribute "name" to "value".

Definition at line 227 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ put_attr() [3/4]

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

Set attribute "name" to "value".

Definition at line 231 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ put_attr() [4/4]

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

Set attribute "name" to "value".

Definition at line 235 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

◆ shape()

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

Shape of the array (size in each array dimension)

Definition at line 45 of file REMORA_NCInterface.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ ncid

◆ varid


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