|
REMORA
Regional Modeling of Oceans Refined Adaptively
|
Representation of a NetCDF variable. More...
#include <REMORA_NCInterface.H>

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 | put_varn_all (int num, MPI_Offset *const *starts, MPI_Offset *const *counts, const double *dptr) const |
| void | put_varn_all (int num, MPI_Offset *const *starts, MPI_Offset *const *counts, const float *dptr) const |
Write out num subarrays in a single collective call (float overload) | |
| 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. | |
Representation of a NetCDF variable.
Definition at line 51 of file REMORA_NCInterface.H.
| 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 256 of file REMORA_NCInterface.cpp.

| 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 260 of file REMORA_NCInterface.cpp.

| 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 202 of file REMORA_NCInterface.cpp.

| 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 210 of file REMORA_NCInterface.cpp.

Read the entire variable from file.
Definition at line 190 of file REMORA_NCInterface.cpp.

| 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 220 of file REMORA_NCInterface.cpp.

| 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 228 of file REMORA_NCInterface.cpp.

Read the entire variable from file.
Definition at line 194 of file REMORA_NCInterface.cpp.

| 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 238 of file REMORA_NCInterface.cpp.

| 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 246 of file REMORA_NCInterface.cpp.

| void ncutils::NCVar::get | ( | int * | ptr | ) | const |
Read the entire variable from file.
Definition at line 198 of file REMORA_NCInterface.cpp.

| 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 206 of file REMORA_NCInterface.cpp.

| 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 215 of file REMORA_NCInterface.cpp.

| 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 224 of file REMORA_NCInterface.cpp.

| 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 233 of file REMORA_NCInterface.cpp.

| 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 242 of file REMORA_NCInterface.cpp.

| 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 251 of file REMORA_NCInterface.cpp.

| std::string ncutils::NCVar::get_attr | ( | const std::string & | name | ) | const |
Read attribute from file.
Definition at line 288 of file REMORA_NCInterface.cpp.

Read attribute from file.
Definition at line 297 of file REMORA_NCInterface.cpp.

Read attribute from file.
Definition at line 304 of file REMORA_NCInterface.cpp.

Read attribute from file.
Definition at line 311 of file REMORA_NCInterface.cpp.

| bool ncutils::NCVar::has_attr | ( | const std::string & | name | ) | const |
Whether a variable has an attribute with name.
Definition at line 265 of file REMORA_NCInterface.cpp.

| 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 130 of file REMORA_NCInterface.cpp.

| std::string ncutils::NCVar::name | ( | ) | const |
Name of this variable.
Definition at line 75 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().


| int ncutils::NCVar::ndim | ( | ) | const |
Number of array dimensions for this variable.
Definition at line 80 of file REMORA_NCInterface.cpp.
Referenced by shape().


| 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 181 of file REMORA_NCInterface.cpp.

| 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 185 of file REMORA_NCInterface.cpp.

| 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 112 of file REMORA_NCInterface.cpp.

| 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 135 of file REMORA_NCInterface.cpp.

Write out the entire double variable.
Definition at line 100 of file REMORA_NCInterface.cpp.

| 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 145 of file REMORA_NCInterface.cpp.

| 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 153 of file REMORA_NCInterface.cpp.

Write out the entire float variable.
Definition at line 104 of file REMORA_NCInterface.cpp.

| 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 163 of file REMORA_NCInterface.cpp.

| 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 171 of file REMORA_NCInterface.cpp.

Write out the entire int variable.
Definition at line 108 of file REMORA_NCInterface.cpp.

| 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 117 of file REMORA_NCInterface.cpp.

| 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 140 of file REMORA_NCInterface.cpp.

| 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 149 of file REMORA_NCInterface.cpp.

| 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 158 of file REMORA_NCInterface.cpp.

| 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 167 of file REMORA_NCInterface.cpp.

| 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 176 of file REMORA_NCInterface.cpp.

Set attribute "name" to "value".
Definition at line 272 of file REMORA_NCInterface.cpp.

| void ncutils::NCVar::put_attr | ( | const std::string & | name, |
| const std::vector< double > & | value | ||
| ) | const |
Set attribute "name" to "value".
Definition at line 276 of file REMORA_NCInterface.cpp.

| void ncutils::NCVar::put_attr | ( | const std::string & | name, |
| const std::vector< float > & | value | ||
| ) | const |
Set attribute "name" to "value".
Definition at line 280 of file REMORA_NCInterface.cpp.

Set attribute "name" to "value".
Definition at line 284 of file REMORA_NCInterface.cpp.

| void ncutils::NCVar::put_varn_all | ( | int | num, |
| MPI_Offset *const * | starts, | ||
| MPI_Offset *const * | counts, | ||
| const double * | dptr | ||
| ) | const |
Write out num subarrays in a single collective call. Every rank that opened the file must call this, in the same order, but num may differ between ranks and may be zero. starts[i]/counts[i] describe subarray i, and dptr holds all subarrays' data concatenated in that order.
Definition at line 121 of file REMORA_NCInterface.cpp.

| void ncutils::NCVar::put_varn_all | ( | int | num, |
| MPI_Offset *const * | starts, | ||
| MPI_Offset *const * | counts, | ||
| const float * | dptr | ||
| ) | const |
Write out num subarrays in a single collective call (float overload)
Definition at line 125 of file REMORA_NCInterface.cpp.

| std::vector< MPI_Offset > ncutils::NCVar::shape | ( | ) | const |
Shape of the array (size in each array dimension)
Definition at line 86 of file REMORA_NCInterface.cpp.

| const int ncutils::NCVar::ncid |
File/Group identifier.
Definition at line 54 of file REMORA_NCInterface.H.
Referenced by get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get_all(), get_all(), get_all(), get_all(), get_all(), get_all(), get_attr(), get_attr(), get_attr(), get_attr(), has_attr(), iput(), name(), ndim(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put_all(), put_all(), put_all(), put_all(), put_all(), put_all(), put_attr(), put_attr(), put_attr(), put_attr(), put_varn_all(), put_varn_all(), and shape().
| const int ncutils::NCVar::varid |
Variable ID used with NetCDF API.
Definition at line 57 of file REMORA_NCInterface.H.
Referenced by get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get(), get_all(), get_all(), get_all(), get_all(), get_all(), get_all(), get_attr(), get_attr(), get_attr(), get_attr(), has_attr(), iput(), name(), ndim(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put(), put_all(), put_all(), put_all(), put_all(), put_all(), put_all(), put_attr(), put_attr(), put_attr(), put_attr(), put_varn_all(), put_varn_all(), and shape().