NetCDF4 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
netcdf::NcVar Class Reference

Represents a netCDF variable. More...

#include <NetCDF/cpp4/src/NcVar.h>

+ Inheritance diagram for netcdf::NcVar:

Detailed Description

Copyright:
Original C++ API developed by Lynton Appel.
Portions of this software were developed by the Unidata Program at the
University Corporation for Atmospheric Research.
Modifications: Copyright 2013 Colorado State University. All rights reserved.
Organization:
Natural Resource Ecology Laboratory
Colorado State University, Fort Collins, CO 80523 USA
www.nrel.colostate.edu
Project:
IRC <www.nrel.colostate.edu/projects/irc/>
Author
Tom Hilinski tom.h.nosp@m.ilin.nosp@m.ski@c.nosp@m.olos.nosp@m.tate..nosp@m.edu
Date
2013Jan
Examples:
Test_CreateFileNc3.cpp, Test_NcChar.cpp, Test_NcFileMetaCF.cpp, Test_NcString.cpp, Test_NcVarMetaCF.cpp, and Test_Parallel.cpp.

Public Types

enum  ChunkMode { nc_CHUNKED = NC_CHUNKED, nc_CONTIGUOUS = NC_CONTIGUOUS }
 Chunking specifications flags. More...
 
enum  EndianMode { ENDIAN_NATIVE = NC_ENDIAN_NATIVE, ENDIAN_LITTLE = NC_ENDIAN_LITTLE, ENDIAN_BIG = NC_ENDIAN_BIG }
 Used to specifying the endianess of the data, Default is ENDIAN_NATIVE. More...
 
enum  ChecksumMode { nc_NOCHECKSUM = NC_NOCHECKSUM, nc_FLETCHER32 = NC_FLETCHER32 }
 Used for checksum specification. More...
 
typedef std::multimap
< std::string, NcType
NcTypeMap
 
typedef std::map< std::string,
NcVarAtt
NcVarAttMap
 
typedef std::pair< std::string,
NcVarAtt
NcVarAttPair
 
- Public Types inherited from netcdf::NcItem
enum  { idGlobal = NC_GLOBAL }
 

Public Member Functions

 NcVar ()
 
 NcVar (int const useFileID, NcGroup const &grp, const int &varID, NcType::ncType const varType, bool const ioIsCollective=false)
 The variable must already exist in the netCDF file. New netCDF variables can be added using NcGroup::addNcVar();. More...
 
 NcVar (NcVar const &ncVar)
 
NcGroup GetParentGroup () const
 
NcType GetType () const
 
NcType::ncType getClassType () const
 
void Rename (std::string const &newname)
 
NcVaroperator= (NcVar const &rhs)
 
bool operator== (NcVar const &rhs) const
 
bool operator!= (NcVar const &rhs) const
 
void DoCollectiveIO (bool const ioIsCollective)
 If true, do collective I/O, else do independent I/O. Compression should not be used for variables which expect parallel writes, per HDF5 restrictions. More...
 
bool DoCollectiveIO () const
 
int GetDimCount () const
 number of dimensions More...
 
bool IsScalar () const
 is scalar variable? More...
 
NcDim GetDim (int const index) const
 get dimension at index More...
 
NcDim GetDim (std::string const name) const
 get dimension with name More...
 
std::vector< NcDimGetDims () const
 get all dimensions More...
 
void SetChunking (ChunkMode const chunkMode, std::vector< size_t > const &chunksizes) const
 Set chunking parameters. More...
 
void GetChunking (ChunkMode &chunkMode, std::vector< size_t > &chunkSizes) const
 Get chunking parameters. More...
 
void SetCompression (bool const enableShuffleFilter, bool const enableDeflateFilter, int const deflateLevel) const
 Set compression parameters for this variable. Compression should not be used for variables which will use parallel writes, per HDF5 restrictions. Use of these parameters is described in http://www.unidata.ucar.edu/software/netcdf/workshops/2010/nc4chunking/index.html and http://www.hdfgroup.org/HDF5/Tutor/compress.html. More...
 
void GetCompression (bool &shuffleFilterEnabled, bool &deflateFilterEnabled, int &deflateLevel) const
 Get compression parameters for this variable. More...
 
bool IsCompressionEnabled () const
 
template<class T >
void SetFillMode (bool const fillMode, T const fillValue) const
 Sets the fill parameters. More...
 
void SetFillMode (bool const fillMode, void const *fillValue) const
 Sets the fill parameters. The function can be used for any type, including user-defined types. Must be the same type as the variable. Ignored if fillMode = false. More...
 
template<class T >
void GetFillMode (bool &fillMode, T &fillValue) const
 Get the fill value. More...
 
void GetFillMode (bool &fillMode, void *fillValue=0) const
 
void SetEndianness (EndianMode endianMode) const
 
EndianMode GetEndianness () const
 
void SetChecksum (ChecksumMode checksumMode) const
 
ChecksumMode GetChecksum () const
 
int GetAttCount () const
 
bool HaveAttribute (std::string const name) const
 
NcVarAtt GetAtt (std::string const name) const
 
NcVarAttMap GetAttributes () const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const unsigned char *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const signed char *dataValues) const
 
NcVarAtt PutAtt (std::string const name, char const aChar) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, short datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const short *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, unsigned short datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const unsigned short *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, int datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const int *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, long datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const long *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, unsigned int datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const unsigned int *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, float datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const float *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, double datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const double *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, long long datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const long long *dataValues) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, unsigned long long datumValue) const
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const unsigned long long *dataValues) const
 
NcVarAtt PutAtt (std::string const name, size_t len, const char **dataValues) const
 
NcVarAtt PutAtt (std::string const name, std::string const textData) const
 
NcVarAtt PutAtt (std::string const name, TVecUbyte const &data)
 put NcUbyte vector More...
 
NcVarAtt PutAtt (std::string const name, TVecByte const &data)
 put NcByte vector More...
 
NcVarAtt PutAtt (std::string const name, TVecChar const &data)
 put NcChar vector More...
 
NcVarAtt PutAtt (std::string const name, TVecShort const &data)
 put NcShort vector More...
 
NcVarAtt PutAtt (std::string const name, TVecUshort const &data)
 put NcUshort vector More...
 
NcVarAtt PutAtt (std::string const name, TVecInt const &data)
 put NcInt vector More...
 
NcVarAtt PutAtt (std::string const name, TVecUint const &data)
 put NcUint vector More...
 
NcVarAtt PutAtt (std::string const name, TVecFloat const &data)
 put NcFloat vector More...
 
NcVarAtt PutAtt (std::string const name, TVecDouble const &data)
 put NcDouble vector More...
 
NcVarAtt PutAtt (std::string const name, TVecInt64 const &data)
 put NcInt64 vector More...
 
NcVarAtt PutAtt (std::string const name, TVecUint64 const &data)
 put NcUint64 vector More...
 
NcVarAtt PutAtt (std::string const name, TVecString const &data)
 put NcString vector More...
 
NcVarAtt PutAtt (std::string const name, NcType const &type, size_t len, const void *dataValues) const
 
NcVarAtt PutAtt (NcVarAtt const &att)
 
template<class TC >
void Get (std::vector< TC > &data)
 Reads the entire data into the netCDF variable. More...
 
void Get (signed char *data)
 get NcByte More...
 
void Get (unsigned char *data)
 get NcUbyte More...
 
void Get (char *data)
 get NcChar More...
 
void Get (char **&data, int const numRecords)
 get NcChar[]; free with FreeCStringArray More...
 
void Get (short *data)
 get NcShort More...
 
void Get (unsigned short *data)
 get NcUshort More...
 
void Get (int *data)
 get NcInt More...
 
void Get (long *data)
 get NcInt More...
 
void Get (unsigned int *data)
 get NcUint More...
 
void Get (long long *data)
 get NcInt64 More...
 
void Get (unsigned long long *data)
 get NcUint64 More...
 
void Get (float *data)
 get NcFloat More...
 
void Get (double *data)
 get NcDouble More...
 
void Get (void *data)
 get any type More...
 
void Get (signed char &data)
 get scalar values More...
 
void Get (unsigned char &data)
 get NcUbyte More...
 
void Get (char &data)
 get NcChar More...
 
void Get (short &data)
 get NcShort More...
 
void Get (unsigned short &data)
 get NcUshort More...
 
void Get (int &data)
 get NcInt More...
 
void Get (long &data)
 get NcInt More...
 
void Get (unsigned int &data)
 get NcUint More...
 
void Get (long long &data)
 get NcInt64 More...
 
void Get (unsigned long long &data)
 get NcUint64 More...
 
void Get (float &data)
 get NcFloat More...
 
void Get (double &data)
 get NcDouble More...
 
void Get (std::string &str)
 get NcString More...
 
void Get (const std::vector< size_t > &index, void *data)
 
void Get (const std::vector< size_t > &index, char **data)
 
void Get (const std::vector< size_t > &index, char *data)
 
void Get (const std::vector< size_t > &index, unsigned char *data)
 
void Get (const std::vector< size_t > &index, signed char *data)
 
void Get (const std::vector< size_t > &index, short *data)
 
void Get (const std::vector< size_t > &index, int *data)
 
void Get (const std::vector< size_t > &index, long *data)
 
void Get (const std::vector< size_t > &index, float *data)
 
void Get (const std::vector< size_t > &index, double *data)
 
void Get (const std::vector< size_t > &index, unsigned short *data)
 
void Get (const std::vector< size_t > &index, unsigned int *data)
 
void Get (const std::vector< size_t > &index, unsigned long long *data)
 
void Get (const std::vector< size_t > &index, long long *data)
 
void Get (const std::vector< size_t > &index, std::string &str)
 read 1 string at index location More...
 
template<class TC >
void Get (TVecIndex const &start, TVecIndex const &count, std::vector< TC > &data)
 Reads an array of values from a netCDF variable of an open netCDF dataset. More...
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, void *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, char **data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, char *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned char *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, signed char *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, short *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, int *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, long *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, float *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, double *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned short *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned int *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned long long *data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, long long *data)
 
void Get (std::size_t const start, std::string &data)
 
void Get (std::size_t const start, std::size_t const count, std::vector< std::string > &data)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, void *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, char **dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, signed char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, short *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, int *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, long *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, float *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, double *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned short *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned int *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned long long *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, long long *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, void *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, char **dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, unsigned char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, signed char *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, short *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, int *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, long *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, float *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, double *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, unsigned short *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, unsigned int *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, unsigned long long *dataValues)
 
void Get (const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, const std::vector< ptrdiff_t > &imap, long long *dataValues)
 
template<class TC >
void Put (std::vector< TC > const &data)
 Writes the entire data into the netCDF variable. More...
 
void Put (const void *data)
 put any type More...
 
void Put (const char *data)
 put NcChar More...
 
void Put (const unsigned char *data)
 put NcUbyte More...
 
void Put (const signed char *data)
 put NcByte More...
 
void Put (const short *data)
 put NcShort More...
 
void Put (const int *data)
 put NcInt More...
 
void Put (const long *data)
 put NcInt More...
 
void Put (const float *data)
 put NcFloat More...
 
void Put (const double *data)
 put NcDouble More...
 
void Put (const unsigned short *data)
 put NcUshort More...
 
void Put (const unsigned int *data)
 put NcUint More...
 
void Put (const unsigned long long *data)
 put NcUint64 More...
 
void Put (const long long *data)
 put NcInt64 More...
 
void Put (char const *const *data, int const numRecords)
 put NcChar[] More...
 
void Put (std::string const &str)
 put NcString More...
 
void Put (signed char const &data)
 put scalar values More...
 
void Put (unsigned char const &data)
 get NcUbyte More...
 
void Put (char const &data)
 get NcChar More...
 
void Put (short const &data)
 get NcShort More...
 
void Put (unsigned short const &data)
 get NcUshort More...
 
void Put (int const &data)
 get NcInt More...
 
void Put (long const &data)
 get NcInt More...
 
void Put (unsigned int const &data)
 get NcUint More...
 
void Put (long long const &data)
 get NcInt64 More...
 
void Put (unsigned long long const &data)
 get NcUint64 More...
 
void Put (float const &data)
 get NcFloat More...
 
void Put (double const &data)
 get NcDouble More...
 
void Put (const std::vector< size_t > &index, const void *data)
 
void Put (const std::vector< size_t > &index, const char **data)
 
void Put (const std::vector< size_t > &index, const char *data)
 
void Put (const std::vector< size_t > &index, const unsigned char *data)
 
void Put (const std::vector< size_t > &index, const signed char *data)
 
void Put (const std::vector< size_t > &index, const short data)
 
void Put (const std::vector< size_t > &index, const int data)
 
void Put (const std::vector< size_t > &index, const long data)
 
void Put (const std::vector< size_t > &index, const float data)
 
void Put (const std::vector< size_t > &index, const double data)
 
void Put (const std::vector< size_t > &index, const unsigned short data)
 
void Put (const std::vector< size_t > &index, const unsigned int data)
 
void Put (const std::vector< size_t > &index, const unsigned long long data)
 
void Put (const std::vector< size_t > &index, const long long data)
 
void Put (const std::vector< size_t > &index, std::string const &str)
 Write 1 string at index location. More...
 
template<class TC >
void Put (TVecIndex const &start, TVecIndex const &count, std::vector< TC > const &data)
 Writes an array of values into the netCDF variable. More...
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const void *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const char **data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const char *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned char *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const signed char *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const short *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const int *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const long *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const float *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const double *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned short *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned int *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned long long *data)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const long long *data)
 
void Put (const std::vector< size_t > &start, const std::vector< size_t > &count, std::string const &str)
 Write 1 string at start location; count == 1 string. More...
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const void *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const char **dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const signed char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const short *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const int *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const long *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const float *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const double *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned short *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned int *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned long long *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const long long *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const void *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const char **dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const unsigned char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const signed char *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const short *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const int *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const long *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const float *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const double *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const unsigned short *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const unsigned int *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const unsigned long long *dataValues)
 
void Put (const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const std::vector< ptrdiff_t > &imapp, const long long *dataValues)
 
template<>
void Get (std::vector< std::string > &data)
 
- Public Member Functions inherited from netcdf::NcItem
virtual ~NcItem ()=0
 
bool IsNull () const
 
std::string const & GetName () const
 
int GetID () const
 
int GetGroupID () const
 
int GetFileID () const
 
NcItemoperator= (NcItem const &rhs)
 
bool operator== (NcItem const &rhs) const
 
bool operator!= (NcItem const &rhs) const
 
bool operator< (NcItem const &rhs) const
 

Additional Inherited Members

- Static Public Attributes inherited from netcdf::NcItem
static int const nullID = -999
 
- Protected Member Functions inherited from netcdf::NcItem
 NcItem (bool const isNullObject=true)
 
 NcItem (int const useFileID, int const useID, int const useGroupID=NcItem::idGlobal, std::string const useName=std::string())
 
 NcItem (NcItem const &rhs)
 
void Copy (NcItem const &rhs)
 
- Protected Attributes inherited from netcdf::NcItem
bool nullObject
 
int myID
 object ID number More...
 
int groupID
 group ID number (can be unused) More...
 
int fileID
 netCDF file ID number More...
 
std::string myName
 optional name of object More...
 

Member Typedef Documentation

typedef std::multimap<std::string, NcType> netcdf::NcVar::NcTypeMap
typedef std::map<std::string, NcVarAtt> netcdf::NcVar::NcVarAttMap
typedef std::pair<std::string, NcVarAtt> netcdf::NcVar::NcVarAttPair

Member Enumeration Documentation

Enumerator
nc_NOCHECKSUM 

No checksum (the default).

nc_FLETCHER32 

Selects the Fletcher32 checksum filter.

Enumerator
nc_CHUNKED 

Chunked storage is used for this variable.

nc_CONTIGUOUS 

Contiguous storage is used for this variable. Variables with one or more unlimited dimensions cannot use contiguous storage. If contiguous storage is turned on, the chunkSizes parameter is ignored.

Enumerator
ENDIAN_NATIVE 

Native endian (default)

ENDIAN_LITTLE 

Little endian.

ENDIAN_BIG 

Big endian.

Constructor & Destructor Documentation

netcdf::NcVar::NcVar ( )
netcdf::NcVar::NcVar ( int const  useFileID,
NcGroup const &  grp,
const int &  varID,
NcType::ncType const  varType,
bool const  ioIsCollective = false 
)

if true, do collective I/O, else do independent I/O

Parameters
useFileIDnetCDF file ID number
grpParent NcGroup object
varIDId of the is NcVar object
varTypetype of variable
netcdf::NcVar::NcVar ( NcVar const &  ncVar)

Member Function Documentation

void netcdf::NcVar::DoCollectiveIO ( bool const  ioIsCollective)
Examples:
Test_Parallel.cpp.
bool netcdf::NcVar::DoCollectiveIO ( ) const
inline
template<class TC >
void netcdf::NcVar::Get ( std::vector< TC > &  data)
inline

read all values: dispatch action to the matching type

Examples:
Test_CreateFileNc3.cpp, Test_NcChar.cpp, and Test_NcString.cpp.
void netcdf::NcVar::Get ( signed char *  data)

Reads the entire data from an netCDF variable. This is the simplest interface to use for reading the value of a scalar variable or when all the values of a multidimensional variable can be read at once. The values are read into consecutive locations with the last dimension varying fastest.

Take care when using the simplest forms of this interface with record variables when you don't specify how many records are to be read. If you try to read all the values of a record variable into an array but there are more records in the file than you assume, more data will be read than you expect, which may cause a segmentation violation.

Parameters
dataValuesPointer to the location into which the data value is read. If the type of data value differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Get ( unsigned char *  data)
void netcdf::NcVar::Get ( char *  data)
void netcdf::NcVar::Get ( char **&  data,
int const  numRecords 
)
void netcdf::NcVar::Get ( short *  data)
void netcdf::NcVar::Get ( unsigned short *  data)
void netcdf::NcVar::Get ( int *  data)
void netcdf::NcVar::Get ( long *  data)
void netcdf::NcVar::Get ( unsigned int *  data)
void netcdf::NcVar::Get ( long long *  data)
void netcdf::NcVar::Get ( unsigned long long *  data)
void netcdf::NcVar::Get ( float *  data)
void netcdf::NcVar::Get ( double *  data)
void netcdf::NcVar::Get ( void *  data)
void netcdf::NcVar::Get ( signed char &  data)
inline

get NcByte

void netcdf::NcVar::Get ( unsigned char &  data)
inline
void netcdf::NcVar::Get ( char &  data)
inline
void netcdf::NcVar::Get ( short &  data)
inline
void netcdf::NcVar::Get ( unsigned short &  data)
inline
void netcdf::NcVar::Get ( int &  data)
inline
void netcdf::NcVar::Get ( long &  data)
inline
void netcdf::NcVar::Get ( unsigned int &  data)
inline
void netcdf::NcVar::Get ( long long &  data)
inline
void netcdf::NcVar::Get ( unsigned long long &  data)
inline
void netcdf::NcVar::Get ( float &  data)
inline
void netcdf::NcVar::Get ( double &  data)
inline
void netcdf::NcVar::Get ( std::string &  str)
Todo:
NcCHECK( nc_get_var( GetGroupID(), GetID(), (void**) &cStr ) );
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
void *  data 
)

Reads a single datum value from a variable of an open netCDF dataset. The value is converted from the external data type of the variable, if necessary.

Parameters
indexVector specifying the index of the data value to be read. The indices are relative to 0, so for example, the first data value of a two-dimensional variable would have index (0,0). The elements of index must correspond to the variable's dimensions. Hence, if the variable is a record variable, the first index is the record number.
dataPointer to the location into which the data value is read. If the type of data value differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
char **  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
unsigned char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
signed char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
short *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
int *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
long *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
float *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
double *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
unsigned short *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
unsigned int *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
unsigned long long *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
long long *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  index,
std::string &  str 
)
template<class TC >
void netcdf::NcVar::Get ( TVecIndex const &  start,
TVecIndex const &  count,
std::vector< TC > &  data 
)
inline

read values at a start position with edge counts: dispatch action to the matching type

Parameters
startzero-based indices to start write
countcount along each edge (>= 1)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
void *  data 
)

Reads an array of values from a netCDF variable of an open netCDF dataset. The array is specified by giving a corner and a vector of edge lengths. The values are read into consecutive locations with the last dimension varying fastest.

Parameters
startVector specifying the index in the variable where the first of the data values will be read. The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0). The length of start must be the same as the number of dimensions of the specified variable. The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first index would correspond to the starting record number for reading the data values.
countVector specifying the edge lengths along each dimension of the block of data values to be read. To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
dataValuesPointer to the location into which the data value is read. If the type of data value differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
char **  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
unsigned char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
signed char *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
short *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
int *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
long *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
float *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
double *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
unsigned short *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
unsigned int *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
unsigned long long *  data 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
long long *  data 
)
void netcdf::NcVar::Get ( std::size_t const  start,
std::string &  data 
)
inline
Parameters
startread one C string or std::string zero-based index to read
void netcdf::NcVar::Get ( std::size_t const  start,
std::size_t const  count,
std::vector< std::string > &  data 
)
inline
Parameters
startfor char** and std::string zero-based index to start reading
countnumber of strings to read
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
void *  dataValues 
)

Reads a subsampled (strided) array section of values from a netCDF variable. The subsampled array section is specified by giving a corner, a vector of edge lengths, and a stride vector. The values are read with the last dimension of the netCDF variable varying fastest.

Parameters
startVector specifying the index in the variable where the first of the data values will be read. The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0). The length of start must be the same as the number of dimensions of the specified variable. The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first index would correspond to the starting record number for reading the data values.
countVector specifying the edge lengths along each dimension of the block of data values to be read. To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
strideVector specifying the interval between selected indices. The elements of the stride vector correspond, in order, to the variable's dimensions. A value of 1 accesses adjacent values of the netCDF variable in the corresponding dimension; a value of 2 accesses every other value of the netCDF variable in the corresponding dimension; and so on. A NULL stride argument is treated as (1, 1, ... , 1).
dataValuesPointer to the location into which the data value is read. If the type of data value differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
char **  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
unsigned char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
signed char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
short *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
int *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
long *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
float *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
double *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
unsigned short *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
unsigned int *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
unsigned long long *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
long long *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
void *  dataValues 
)

Reads a mapped array section of values from a netCDF variable. The mapped array section is specified by giving a corner, a vector of edge lengths, a stride vector, and an index mapping vector. The index mapping vector is a vector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array. No assumptions are made about the ordering or length of the dimensions of the data array.

Parameters
startVector specifying the index in the variable where the first of the data values will be read. The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0). The length of start must be the same as the number of dimensions of the specified variable. The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first index would correspond to the starting record number for reading the data values.
countVector specifying the edge lengths along each dimension of the block of data values to be read. To read a single value, for example, specify count as (1, 1, ... , 1). The length of count is the number of dimensions of the specified variable. The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to read. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
strideVector specifying the interval between selected indices. The elements of the stride vector correspond, in order, to the variable's dimensions. A value of 1 accesses adjacent values of the netCDF variable in the corresponding dimension; a value of 2 accesses every other value of the netCDF variable in the corresponding dimension; and so on. A NULL stride argument is treated as (1, 1, ... , 1).
imapVector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array. imap[0] gives the distance between elements of the internal array corresponding to the most slowly varying dimension of the netCDF variable. imap[n-1] (where n is the rank of the netCDF variable) gives the distance between elements of the internal array corresponding to the most rapidly varying dimension of the netCDF variable. Intervening imap elements correspond to other dimensions of the netCDF variable in the obvious way. Distances between elements are specified in type-independent units of elements (the distance between internal elements that occupy adjacent memory locations is 1 and not the element's byte-length as in netCDF 2).
dataValuesPointer to the location into which the data value is read. If the type of data value differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
char **  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
unsigned char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
signed char *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
short *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
int *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
long *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
float *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
double *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
unsigned short *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
unsigned int *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
unsigned long long *  dataValues 
)
void netcdf::NcVar::Get ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
const std::vector< ptrdiff_t > &  stride,
const std::vector< ptrdiff_t > &  imap,
long long *  dataValues 
)
template<>
void netcdf::NcVar::Get ( std::vector< std::string > &  data)
inline
NcVarAtt netcdf::NcVar::GetAtt ( std::string const  name) const

Gets the named NcVarAtt object.

Parameters
nameName of attribute
Returns
A NcVarAtt object. If no valid object is found, throws exception.
int netcdf::NcVar::GetAttCount ( ) const

Gets the number of attributes.

Returns
Number of attributes.
NcVar::NcVarAttMap netcdf::NcVar::GetAttributes ( ) const

Gets the collection of NcVarAtt objects.

Returns
A STL multimap object, containing pairs of <attribute name, NcVarAtt object> entities.
NcVar::ChecksumMode netcdf::NcVar::GetChecksum ( ) const

Gets the checksum parameters of the variable.

Returns
ChecksumMode Enumeration type.
void netcdf::NcVar::GetChunking ( ChunkMode chunkMode,
std::vector< size_t > &  chunkSizes 
) const

Shape of chunking, used if ChunkMode=nc_CHUNKED

Parameters
chunkModeChunking specifications flag
NcType::ncType netcdf::NcVar::getClassType ( ) const
inline
void netcdf::NcVar::GetCompression ( bool &  shuffleFilterEnabled,
bool &  deflateFilterEnabled,
int &  deflateLevel 
) const

the deflate level

Parameters
shuffleFilterEnabledtrue if the shuffle filter is enabled.
deflateFilterEnabledtrue if the deflate filter is enabled.
NcDim netcdf::NcVar::GetDim ( int const  index) const
Examples:
Test_NcChar.cpp.
NcDim netcdf::NcVar::GetDim ( std::string const  name) const
int netcdf::NcVar::GetDimCount ( ) const
std::vector< NcDim > netcdf::NcVar::GetDims ( ) const
NcVar::EndianMode netcdf::NcVar::GetEndianness ( ) const

Gets the endianness of the variable.

Returns
Endianness enumeration type.
template<class T >
void netcdf::NcVar::GetFillMode ( bool &  fillMode,
T &  fillValue 
) const
inline
Parameters
fillModereturn set to true if fill mode is enabled, else false.
fillValuereturn set to the fill value.
void netcdf::NcVar::GetFillMode ( bool &  fillMode,
void *  fillValue = 0 
) const

It differs from the above function in what argument(s) it accepts. The function can be used for any type, including user-defined types.

Parameters
fillModeOn return set to true if fill mode is enabled.
fillValueOn return containts a pointer to fill value. Must be the same type as the variable. Ignored if fillMode=.false.
NcGroup netcdf::NcVar::GetParentGroup ( ) const
NcType netcdf::NcVar::GetType ( ) const
bool netcdf::NcVar::HaveAttribute ( std::string const  name) const

Checks if the attribute of the given name exists.

Parameters
nameName of attribute
Returns
True if the attribute exists, else false.
bool netcdf::NcVar::IsCompressionEnabled ( ) const
bool netcdf::NcVar::IsScalar ( ) const
inline
bool netcdf::NcVar::operator!= ( NcVar const &  rhs) const
inline
NcVar& netcdf::NcVar::operator= ( NcVar const &  rhs)
inline
bool netcdf::NcVar::operator== ( NcVar const &  rhs) const
inline
template<class TC >
void netcdf::NcVar::Put ( std::vector< TC > const &  data)
inline

write all values: dispatch action to the matching type

Examples:
Test_CreateFileNc3.cpp, Test_NcChar.cpp, Test_NcString.cpp, and Test_Parallel.cpp.
void netcdf::NcVar::Put ( const void *  data)

Writes the entire data into the netCDF variable. This is the simplest interface to use for writing a value in a scalar variable or whenever all the values of a multidimensional variable can all be written at once. The values to be written are associated with the netCDF variable by assuming that the last dimension of the netCDF variable varies fastest in the C interface.

Take care when using the simplest forms of this interface with record variables when you don't specify how many records are to be written. If you try to write all the values of a record variable into a netCDF file that has no record data yet (hence has 0 records), nothing will be written. Similarly, if you try to write all of a record variable but there are more records in the file than you assume, more data may be written to the file than you supply, which may result in a segmentation violation.

Parameters
dataValuesThe data values. The order in which the data will be written to the netCDF variable is with the last dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Put ( const char *  data)
void netcdf::NcVar::Put ( const unsigned char *  data)
void netcdf::NcVar::Put ( const signed char *  data)
void netcdf::NcVar::Put ( const short *  data)
void netcdf::NcVar::Put ( const int *  data)
void netcdf::NcVar::Put ( const long *  data)
void netcdf::NcVar::Put ( const float *  data)
void netcdf::NcVar::Put ( const double *  data)
void netcdf::NcVar::Put ( const unsigned short *  data)
void netcdf::NcVar::Put ( const unsigned int *  data)
void netcdf::NcVar::Put ( const unsigned long long *  data)
void netcdf::NcVar::Put ( const long long *  data)
void netcdf::NcVar::Put ( char const *const *  data,
int const  numRecords 
)
void netcdf::NcVar::Put ( std::string const &  str)
void netcdf::NcVar::Put ( signed char const &  data)
inline

get NcByte

void netcdf::NcVar::Put ( unsigned char const &  data)
inline
void netcdf::NcVar::Put ( char const &  data)
inline
void netcdf::NcVar::Put ( short const &  data)
inline
void netcdf::NcVar::Put ( unsigned short const &  data)
inline
void netcdf::NcVar::Put ( int const &  data)
inline
void netcdf::NcVar::Put ( long const &  data)
inline
void netcdf::NcVar::Put ( unsigned int const &  data)
inline
void netcdf::NcVar::Put ( long long const &  data)
inline
void netcdf::NcVar::Put ( unsigned long long const &  data)
inline
void netcdf::NcVar::Put ( float const &  data)
inline
void netcdf::NcVar::Put ( double const &  data)
inline
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const void *  data 
)

This is an overloaded member function, provided for convenience. It differs from the above function in what argument(s) it accepts. In addition, no data conversion is carried out. This means that the type of the data in memory must match the type of the variable.

Writes a single datum into the netCDF variable.

Parameters
indexVector specifying the index where the data values will be written. The indices are relative to 0, so for example, the first data value of a two-dimensional variable would have index (0,0). The elements of index must correspond to the variable's dimensions. Hence, if the variable uses the unlimited dimension, the first index would correspond to the unlimited dimension.
datumValueThe data value. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const char **  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const unsigned char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const signed char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const short  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const int  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const long  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const float  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const double  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const unsigned short  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const unsigned int  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const unsigned long long  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
const long long  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  index,
std::string const &  str 
)
template<class TC >
void netcdf::NcVar::Put ( TVecIndex const &  start,
TVecIndex const &  count,
std::vector< TC > const &  data 
)
inline

write values at a start position with edge counts: dispatch action to the matching type

Parameters
startzero-based indices to start write
countcount along each edge (>= 1)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const void *  data 
)

This is an overloaded member function, provided for convenience. It differs from the above function in what argument(s) it accepts. In addition, no data conversion is carried out. This means that the type of the data in memory must match the type of the variable.

Writes an array of values into the netCDF variable. The portion of the netCDF variable to write is specified by giving a corner and a vector of edge lengths that refer to an array section of the netCDF variable. The values to be written are associated with the netCDF variable by assuming that the last dimension of the netCDF variable varies fastest.

Parameters
startpVector specifying the index where the first data values will be written. The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0). The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first index corresponds to the starting record number for writing the data values.
countpVector specifying the number of indices selected along each dimension. To write a single value, for example, specify count as (1, 1, ... , 1). The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
dataValuesThe data values. The order in which the data will be written to the netCDF variable is with the last dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const char **  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const unsigned char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const signed char *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const short *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const int *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const long *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const float *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const double *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const unsigned short *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const unsigned int *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const unsigned long long *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const long long *  data 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  start,
const std::vector< size_t > &  count,
std::string const &  str 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const void *  dataValues 
)

This is an overloaded member function, provided for convenience. It differs from the above function in what argument(s) it accepts. In addition, no data conversion is carried out. This means that the type of the data in memory must match the type of the variable.

Writes an array of values into the netCDF variable. The subsampled array section is specified by giving a corner, a vector of counts, and a stride vector.

Parameters
startpVector specifying the index where the first data values will be written. The indices are relative to 0, so for example, the first data value of a variable would have index (0, 0, ... , 0). The elements of start correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first index corresponds to the starting record number for writing the data values.
countpVector specifying the number of indices selected along each dimension. To write a single value, for example, specify count as (1, 1, ... , 1). The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
stridepA vector of ptrdiff_t integers that specifies the sampling interval along each dimension of the netCDF variable. The elements of the stride vector correspond, in order, to the netCDF variable's dimensions (stride[0] gives the sampling interval along the most slowly varying dimension of the netCDF variable). Sampling intervals are specified in type-independent units of elements (a value of 1 selects consecutive elements of the netCDF variable along the corresponding dimension, a value of 2 selects every other element, etc.). A NULL stride argument is treated as (1, 1, ... , 1).
dataValuesThe data values. The order in which the data will be written to the netCDF variable is with the last dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const char **  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const unsigned char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const signed char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const short *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const int *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const long *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const float *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const double *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const unsigned short *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const unsigned int *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const unsigned long long *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const long long *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const void *  dataValues 
)

This is an overloaded member function, provided for convenience. It differs from the above function in what argument(s) it accepts. In addition, no data conversion is carried out. This means that the type of the data in memory must match the type of the variable.

void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const char **  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const unsigned char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const signed char *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const short *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const int *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const long *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const float *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const double *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const unsigned short *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const unsigned int *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const unsigned long long *  dataValues 
)
void netcdf::NcVar::Put ( const std::vector< size_t > &  startp,
const std::vector< size_t > &  countp,
const std::vector< ptrdiff_t > &  stridep,
const std::vector< ptrdiff_t > &  imapp,
const long long *  dataValues 
)

Writes a mapped array section of values into the netCDF variable. The mapped array section is specified by giving a corner, a vector of counts, a stride vector, and an index mapping vector. The index mapping vector is a vector of integers that specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array. No assumptions are made about the ordering or length of the dimensions of the data array.

Parameters
countpVector specifying the number of indices selected along each dimension. To write a single value, for example, specify count as (1, 1, ... , 1). The elements of count correspond, in order, to the variable's dimensions. Hence, if the variable is a record variable, the first element of count corresponds to a count of the number of records to write. Note: setting any element of the count array to zero causes the function to exit without error, and without doing anything.
stridepA vector of ptrdiff_t integers that specifies the sampling interval along each dimension of the netCDF variable. The elements of the stride vector correspond, in order, to the netCDF variable's dimensions (stride[0] gives the sampling interval along the most slowly varying dimension of the netCDF variable). Sampling intervals are specified in type-independent units of elements (a value of 1 selects consecutive elements of the netCDF variable along the corresponding dimension, a value of 2 selects every other element, etc.). A NULL stride argument is treated as (1, 1, ... , 1).
imapVector specifies the mapping between the dimensions of a netCDF variable and the in-memory structure of the internal data array. The elements of the index mapping vector correspond, in order, to the netCDF variable's dimensions (imap[0] gives the distance between elements of the internal array corresponding to the most slowly varying dimension of the netCDF variable). Distances between elements are specified in type-independent units of elements (the distance between internal elements that occupy adjacent memory locations is 1 and not the element's byte-length as in netCDF 2). A NULL argument means the memory-resident values have the same structure as the associated netCDF variable.
dataValuesThe data values. The order in which the data will be written to the netCDF variable is with the last dimension of the specified variable varying fastest. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const unsigned char *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const signed char *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
char const  aChar 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
short  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const short *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
unsigned short  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const unsigned short *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
int  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const int *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
long  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const long *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
unsigned int  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const unsigned int *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
float  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const float *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
double  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const double *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
long long  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const long long *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
unsigned long long  datumValue 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const unsigned long long *  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
size_t  len,
const char **  dataValues 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
std::string const  textData 
) const
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecUbyte const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecByte const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecChar const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecShort const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecUshort const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecInt const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecUint const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecFloat const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecDouble const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecInt64 const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecUint64 const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
TVecString const &  data 
)
NcVarAtt netcdf::NcVar::PutAtt ( std::string const  name,
NcType const &  type,
size_t  len,
const void *  dataValues 
) const

Creates a new variable attribute or if already exisiting replaces it. If you are writing a Fill_Value attribute, and will tell the HDF5 layer to use the specified fill value for that variable.

Although it's possible to create attributes of all types, text and double attributes are adequate for most purposes.
Parameters
nameName of attribute.
typeThe attribute type.
lenThe length of the attribute (number of Nctype repeats).
dataValuesData Values to put into the new attribute. If the type of data values differs from the netCDF variable type, type conversion will occur. (However, no type conversion is carried out for variables using the user-defined data types: nc_Vlen, nc_Opaque, nc_Compound and nc_Enum.)
Returns
The NcVarAtt object for this new netCDF attribute.
NcVarAtt netcdf::NcVar::PutAtt ( NcVarAtt const &  att)

Adds a NetCDF variable attribute by copying an existing attribute object.

Parameters
attAn attribute object from a different variable or netCDF file.
Returns
The NcVarAtt object for this new netCDF attribute.
void netcdf::NcVar::Rename ( std::string const &  newname)
virtual

Implements netcdf::NcItem.

void netcdf::NcVar::SetChecksum ( ChecksumMode  checksumMode) const

Sets the checksum parameters of a variable.

Parameters
ChecksumModeEnumeration type.
void netcdf::NcVar::SetChunking ( ChunkMode const  chunkMode,
std::vector< size_t > const &  chunksizes 
) const

Shape of chunking, used if ChunkMode=nc_CHUNKED

Parameters
chunkModeChunking specifications flag
void netcdf::NcVar::SetCompression ( bool const  enableShuffleFilter,
bool const  enableDeflateFilter,
int const  deflateLevel 
) const

The deflate level, must be 0 and 9.

Parameters
enableShuffleFilterSet to true to turn on shuffle filter.
enableDeflateFilterSet to true to turn on deflate filter.
void netcdf::NcVar::SetEndianness ( EndianMode  endianMode) const

Sets the endianness of the variable.

Parameters
endianModeenumeration type.
template<class T >
void netcdf::NcVar::SetFillMode ( bool const  fillMode,
T const  fillValue 
) const
inline
Parameters
fillModeSetting to true, turns on fill mode.
fillValuePointer to fill value.
void netcdf::NcVar::SetFillMode ( bool const  fillMode,
void const *  fillValue 
) const
Parameters
fillModeSetting to true, turns on fill mode.
fillValuePointer to fill value.

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