9 #ifndef NETCDFREADER_H_
10 #define NETCDFREADER_H_
39 bool read(
void* assignTo,
const NetCdfType assignType,
const NetCdfVar& var,
40 const size_t indices[] );
44 bool read1D(
void* assignTo,
const NetCdfType assignType,
const NetCdfVar& var,
45 const unsigned long index1 );
49 bool read2D(
void* assignTo,
const NetCdfType assignType,
const NetCdfVar& var,
50 const unsigned long index1,
const unsigned long index2 );
54 bool read3D(
void* assignTo,
const NetCdfType assignType,
const NetCdfVar& var,
55 const unsigned long index1,
const unsigned long index2,
56 const unsigned long index3 );
60 bool read4D(
void* assignTo,
const NetCdfType assignType,
const NetCdfVar& var,
61 const unsigned long index1,
const unsigned long index2,
62 const unsigned long index3,
const unsigned long index4 );
68 const unsigned long index1a,
const unsigned long index1b );
74 const unsigned long index1a,
const unsigned long index1b,
75 const unsigned long index2a,
const unsigned long index2b );
81 const unsigned long index1a,
const unsigned long index1b,
82 const unsigned long index2a,
const unsigned long index2b,
83 const unsigned long index3a,
const unsigned long index3b );
89 const unsigned long index1a,
const unsigned long index1b,
90 const unsigned long index2a,
const unsigned long index2b,
91 const unsigned long index3a,
const unsigned long index3b,
92 const unsigned long index4a,
const unsigned long index4b );
96 bool readStr(
Str& assignTo,
const NetCdfAtt& att );
bool read3DArray(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1a, const unsigned long index1b, const unsigned long index2a, const unsigned long index2b, const unsigned long index3a, const unsigned long index3b)
Reads a 3D range of the variable between 3 pairs of indices (a <= index <= b) into an existing 3D arr...
Definition: NetCdfReader.cpp:178
bool read1D(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1)
Reads the value of the variable at the 1D index as the specified type Returns true if no error...
Definition: NetCdfReader.cpp:86
bool isOk() const
Indicates intialization success.
Definition: NetCdfReader.h:32
bool read4D(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1, const unsigned long index2, const unsigned long index3, const unsigned long index4)
Reads the value of the variable at the 4D index as the specified type Returns true if no error...
Definition: NetCdfReader.cpp:122
NetCdfReader(const char *fileName)
Protected Constructor.
Definition: NetCdfReader.cpp:237
bool read4DArray(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1a, const unsigned long index1b, const unsigned long index2a, const unsigned long index2b, const unsigned long index3a, const unsigned long index3b, const unsigned long index4a, const unsigned long index4b)
Reads a 4D range of the variable between 4 pairs of indices (a <= index <= b) into an existing 3D arr...
Definition: NetCdfReader.cpp:206
bool read2D(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1, const unsigned long index2)
Reads the value of the variable at the 2D index as the specified type Returns true if no error...
Definition: NetCdfReader.cpp:95
Contains the FileInStream class declaration.
static NetCdfReader * NewNetCdfReader(const char *fileName)
Returns an newNetCdfReader of a NetCdfReader for a file.
Definition: NetCdfReader.cpp:15
NetCdfType
Definition: NetCdf.h:44
Replacement for standard template class string.
Definition: Str.h:12
Contains the NetCdf class declaration.
bool readStr(Str &assignTo, const NetCdfAtt &att)
Reads the value of the attribute as a Str Returns true if no error.
Definition: NetCdfReader.cpp:391
Abstract base class for NetCcfReader and NetCdfWriter.
Definition: NetCdf.h:40
bool read3D(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1, const unsigned long index2, const unsigned long index3)
Reads the value of the variable at the 3D index as the specified type Returns true if no error...
Definition: NetCdfReader.cpp:108
bool read1DArray(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1a, const unsigned long index1b)
Reads a 1D range of the variable between a pair of indices (a <= index <= b) into an existing 1D arra...
Definition: NetCdfReader.cpp:137
A very compact, very simple netCDF reader with a minimal feature set.
Definition: NetCdfReader.h:21
bool read(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const size_t indices[])
Reads the value of the variable at the indices as the indicated type Returns true if no error...
Definition: NetCdfReader.cpp:37
bool read2DArray(void *assignTo, const NetCdfType assignType, const NetCdfVar &var, const unsigned long index1a, const unsigned long index1b, const unsigned long index2a, const unsigned long index2b)
Reads a 2D range of the variable between 2 pairs of indices (a <= index <= b) into an existing 2D arr...
Definition: NetCdfReader.cpp:155
virtual ~NetCdfReader()
Destructor.
Definition: NetCdfReader.cpp:27
bool ok_
Definition: NetCdfReader.h:107
bool initialize(const char *fileName)
Opens a NetCdfReader for a file Returns true if no error.
Definition: NetCdfReader.cpp:244