NetCDF-C++ 4.3.1
ncVar.h
1#include <exception>
2#include <string>
3#include <typeinfo>
4#include <map>
5#include <vector>
6#include "netcdf.h"
7#include "ncVarAtt.h"
8#include "ncGroup.h"
9#include "ncByte.h"
10#include "ncUbyte.h"
11#include "ncChar.h"
12#include "ncShort.h"
13#include "ncUshort.h"
14#include "ncInt.h"
15#include "ncUint.h"
16#include "ncInt64.h"
17#include "ncUint64.h"
18#include "ncFloat.h"
19#include "ncDouble.h"
20#include "ncString.h"
21
22#ifndef NcVarClass
23#define NcVarClass
24
25namespace netCDF
26{
27 // class NcGroup; // forward declaration.
28 class NcDim; // forward declaration.
29 // class NcVarAtt; // forward declaration.
30 class NcType; // forward declaration.
31
33 class NcVar
34 {
35 public:
36
39 {
43 nc_CHUNKED = NC_CHUNKED,
48 nc_CONTIGUOUS = NC_CONTIGUOUS
49 };
50
55 {
56 nc_ENDIAN_NATIVE = NC_ENDIAN_NATIVE,
57 nc_ENDIAN_LITTLE = NC_ENDIAN_LITTLE,
58 nc_ENDIAN_BIG = NC_ENDIAN_BIG
59 };
60
63 {
64 nc_NOCHECKSUM = NC_NOCHECKSUM,
65 nc_FLETCHER32 = NC_FLETCHER32
66 };
67
69 ~NcVar(){};
70
72 NcVar ();
73
80 NcVar (const NcGroup& grp, const int& varId);
81
83 NcVar& operator =(const NcVar& rhs);
84
86 bool operator==(const NcVar& rhs) const;
87
89 bool operator!=(const NcVar& rhs) const;
90
92 NcVar(const NcVar& ncVar);
93
95 std::string getName() const;
96
98 NcGroup getParentGroup() const;
99
101 NcType getType() const;
102
103
105 void rename( const std::string& newname ) const;
106
108 void setFilter(unsigned int id, size_t nparams, const unsigned int* parms) const;
109
111 void getFilter(unsigned int* idp, size_t* nparamsp, unsigned int* params) const;
112
114 void getTypeLen(nc_type type) const;
115
117 void freeString(size_t len, char **data) const;
118
120 void setChunkCache(size_t size, size_t nelems, float preemption) const;
121
123 int getId() const;
124
126 bool isNull() const {return nullObject;}
127
129 friend bool operator<(const NcVar& lhs,const NcVar& rhs);
130
132 friend bool operator>(const NcVar& lhs,const NcVar& rhs);
133
135
136 // Information about Dimensions
137
139
141 int getDimCount() const ;
142
144 NcDim getDim(int i) const;
145
147 std::vector<NcDim> getDims() const;
148
150
151 // Information about Attributes
152
154
156 int getAttCount() const;
157
159 NcVarAtt getAtt(const std::string& name) const;
160
162 std::map<std::string,NcVarAtt> getAtts() const;
163
164
165
166
168
169
172 NcVarAtt putAtt(const std::string& name, size_t len, const char** dataValues) const ;
173
176 NcVarAtt putAtt(const std::string& name, const std::string& dataValues) const ;
177
180 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned char* dataValues) const ;
183 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const signed char* dataValues) const ;
186 NcVarAtt putAtt(const std::string& name, const NcType& type, short datumValue) const ;
189 NcVarAtt putAtt(const std::string& name, const NcType& type, int datumValue) const ;
192 NcVarAtt putAtt(const std::string& name, const NcType& type, long datumValue) const ;
195 NcVarAtt putAtt(const std::string& name, const NcType& type, float datumValue) const ;
198 NcVarAtt putAtt(const std::string& name, const NcType& type, double datumValue) const ;
201 NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned short datumValue) const ;
204 NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned int datumValue) const ;
207 NcVarAtt putAtt(const std::string& name, const NcType& type, unsigned long long datumValue) const ;
210 NcVarAtt putAtt(const std::string& name, const NcType& type, long long datumValue) const ;
213 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const short* dataValues) const ;
216 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const int* dataValues) const ;
219 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const long* dataValues) const ;
222 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const float* dataValues) const ;
225 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const double* dataValues) const ;
228 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned short* dataValues) const ;
231 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned int* dataValues) const ;
234 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const unsigned long long* dataValues) const ;
237 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const long long* dataValues) const ;
253 NcVarAtt putAtt(const std::string& name, const NcType& type, size_t len, const void* dataValues) const ;
254
255
256
258
259 // Chunking details
260
262
267 void setChunking(ChunkMode chunkMode, std::vector<size_t>& chunksizes) const;
268
273 void getChunkingParameters(ChunkMode& chunkMode, std::vector<size_t>& chunkSizes) const;
274
275
276
278
279 // Fill details
280
282
283 // Sets the fill parameters
287 void setFill(bool fillMode,void* fillValue=NULL) const;
288
297 void setFill(bool fillMode,const void* fillValue=NULL) const;
298
304 template<class T>
305 void setFill(bool fillMode, T fillValue) const
306 {
307 ncCheck(nc_def_var_fill(groupId,myId,static_cast<int> (!fillMode),&fillValue),__FILE__,__LINE__);
308 }
309
310
311
312
321 void getFillModeParameters(bool& fillMode, void* fillValue=NULL) const;
322
323
328 template <class T> void getFillModeParameters(bool& fillMode,T& fillValue) const{
329 int fillModeInt;
330 ncCheck(nc_inq_var_fill(groupId,myId,&fillModeInt,&fillValue),__FILE__,__LINE__);
331 fillMode= static_cast<bool> (fillModeInt == 0);
332 }
333
334
335
336
338
339 // Compression details
340
342
343
349 void setCompression(bool enableShuffleFilter, bool enableDeflateFilter, int deflateLevel) const;
350
356 void getCompressionParameters(bool& shuffleFilterEnabled, bool& deflateFilterEnabled, int& deflateLevel) const;
357
358
359
361
362 // Endianness details
363
365
366
370 void setEndianness(EndianMode endianMode) const;
371
376
377
378
380
381 // Checksum details
382
384
385
389 void setChecksum(ChecksumMode checksumMode) const;
390
395
396
397
399
400 // data reading
401
403
404
405
406 // Reads the entire data into the netCDF variable.
413 void getVar(void* dataValues) const;
416 void getVar(char** dataValues) const;
419 void getVar(char* dataValues) const;
422 void getVar(unsigned char* dataValues) const;
425 void getVar(signed char* dataValues) const;
428 void getVar(short* dataValues) const;
431 void getVar(int* dataValues) const;
434 void getVar(long* dataValues) const;
437 void getVar(float* dataValues) const;
440 void getVar(double* dataValues) const;
443 void getVar(unsigned short* dataValues) const;
446 void getVar(unsigned int* dataValues) const;
449 void getVar(unsigned long long* dataValues) const;
466 void getVar(long long* dataValues) const;
467
468
470
471 // Reads a single datum value from a variable of an open netCDF dataset.
478 void getVar(const std::vector<size_t>& index, void* datumValue) const;
481 void getVar(const std::vector<size_t>& index, char** datumValue) const;
484 void getVar(const std::vector<size_t>& index, char* datumValue) const;
487 void getVar(const std::vector<size_t>& index, unsigned char* datumValue) const;
490 void getVar(const std::vector<size_t>& index, signed char* datumValue) const;
493 void getVar(const std::vector<size_t>& index, short* datumValue) const;
496 void getVar(const std::vector<size_t>& index, int* datumValue) const;
499 void getVar(const std::vector<size_t>& index, long* datumValue) const;
502 void getVar(const std::vector<size_t>& index, float* datumValue) const;
505 void getVar(const std::vector<size_t>& index, double* datumValue) const;
508 void getVar(const std::vector<size_t>& index, unsigned short* datumValue) const;
511 void getVar(const std::vector<size_t>& index, unsigned int* datumValue) const;
514 void getVar(const std::vector<size_t>& index, unsigned long long* datumValue) const;
528 void getVar(const std::vector<size_t>& index, long long* datumValue) const;
529
531
532 // Reads an array of values from a netCDF variable of an open netCDF dataset.
539 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, void* dataValues) const;
542 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, char** dataValues) const;
545 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, char* dataValues) const;
548 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned char* dataValues) const;
551 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, signed char* dataValues) const;
554 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, short* dataValues) const;
557 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, int* dataValues) const;
560 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, long* dataValues) const;
563 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, float* dataValues) const;
566 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, double* dataValues) const;
569 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned short* dataValues) const;
572 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned int* dataValues) const;
575 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, unsigned long long* dataValues) const;
600 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, long long* dataValues) const;
601
603
604 // Reads a subsampled (strided) array section of values from a netCDF variable.
611 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, void* dataValues) const;
614 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, char** dataValues) const;
617 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, char* dataValues) const;
620 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, unsigned char* dataValues) const;
623 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, signed char* dataValues) const;
626 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, short* dataValues) const;
629 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, int* dataValues) const;
632 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, long* dataValues) const;
635 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, float* dataValues) const;
638 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, double* dataValues) const;
641 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, unsigned short* dataValues) const;
644 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, unsigned int* dataValues) const;
647 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, unsigned long long* dataValues) const;
678 void getVar(const std::vector<size_t>& start, const std::vector<size_t>& count, const std::vector<ptrdiff_t>& stride, long long* dataValues) const;
679
680
682
683 // Reads a mapped array section of values from a netCDF variable.
690 void getVar(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) const;
693 void getVar(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) const;
696 void getVar(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) const;
699 void getVar(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) const;
702 void getVar(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) const;
705 void getVar(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) const;
708 void getVar(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) const;
711 void getVar(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) const;
714 void getVar(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) const;
717 void getVar(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) const;
720 void getVar(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) const;
723 void getVar(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) const;
726 void getVar(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) const;
768 void getVar(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) const;
769
770
771
773
774 // data writing
775
777
778
779 // Writes the entire data into the netCDF variable.
786 void putVar(const void* dataValues) const;
789 void putVar(const char** dataValues) const;
792 void putVar(const char* dataValues) const;
795 void putVar(const unsigned char* dataValues) const;
798 void putVar(const signed char* dataValues) const;
801 void putVar(const short* dataValues) const;
804 void putVar(const int* dataValues) const;
807 void putVar(const long* dataValues) const;
810 void putVar(const float* dataValues) const;
813 void putVar(const double* dataValues) const;
816 void putVar(const unsigned short* dataValues) const;
819 void putVar(const unsigned int* dataValues) const;
822 void putVar(const unsigned long long* dataValues) const;
845 void putVar(const long long* dataValues) const;
846
847
848
850
851
852 // Writes a single datum into the netCDF variable.
859 void putVar(const std::vector<size_t>& index, const void* datumValue) const;
862 void putVar(const std::vector<size_t>& index, const char** datumValue) const;
865 void putVar(const std::vector<size_t>& index, const std::string& datumValue) const;
868 void putVar(const std::vector<size_t>& index, const unsigned char* datumValue) const;
871 void putVar(const std::vector<size_t>& index, const signed char* datumValue) const;
874 void putVar(const std::vector<size_t>& index, const short datumValue) const;
877 void putVar(const std::vector<size_t>& index, const int datumValue) const;
880 void putVar(const std::vector<size_t>& index, const long datumValue) const;
883 void putVar(const std::vector<size_t>& index, const float datumValue) const;
886 void putVar(const std::vector<size_t>& index, const double datumValue) const;
889 void putVar(const std::vector<size_t>& index, const unsigned short datumValue) const;
892 void putVar(const std::vector<size_t>& index, const unsigned int datumValue) const;
895 void putVar(const std::vector<size_t>& index, const unsigned long long datumValue) const;
907 void putVar(const std::vector<size_t>& index, const long long datumValue) const;
908
909
911
912
913
914 // Writes an array of values into the netCDF variable.
921 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const void* dataValues) const;
924 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const char** dataValues) const;
927 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const char* dataValues) const;
930 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned char* dataValues) const;
933 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const signed char* dataValues) const;
936 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const short* dataValues) const;
939 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const int* dataValues) const;
942 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const long* dataValues) const;
945 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const float* dataValues) const;
948 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const double* dataValues) const;
951 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned short* dataValues) const;
954 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned int* dataValues) const;
957 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const unsigned long long* dataValues) const;
980 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const long long* dataValues) const;
981
982
984
985
986
987 // Writes a set of subsampled array values into the netCDF variable.
994 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const void* dataValues) const;
997 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const char** dataValues) const;
1000 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const char* dataValues) const;
1003 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned char* dataValues) const;
1006 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const signed char* dataValues) const;
1009 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const short* dataValues) const;
1012 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const int* dataValues) const;
1015 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const long* dataValues) const;
1018 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const float* dataValues) const;
1021 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const double* dataValues) const;
1024 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned short* dataValues) const;
1027 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned int* dataValues) const;
1030 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const unsigned long long* dataValues) const;
1055 void putVar(const std::vector<size_t>& startp, const std::vector<size_t>& countp, const std::vector<ptrdiff_t>& stridep, const long long* dataValues) const;
1056
1058
1059 // Writes a mapped array section of values into the netCDF variable.
1066 void putVar(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) const;
1069 void putVar(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) const;
1072 void putVar(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) const;
1075 void putVar(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) const;
1078 void putVar(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) const;
1081 void putVar(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) const;
1084 void putVar(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) const;
1087 void putVar(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) const;
1090 void putVar(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) const;
1093 void putVar(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) const;
1096 void putVar(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) const;
1099 void putVar(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) const;
1102 void putVar(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) const;
1132 void putVar(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) const;
1133
1134
1135
1136 private:
1137
1138 bool nullObject;
1139
1140 int myId;
1141
1142 int groupId;
1143
1144 };
1145
1146
1147}
1148
1149
1150
1151#endif
Class represents a netCDF dimension.
Definition: ncDim.h:13
Class represents a netCDF group.
Definition: ncGroup.h:28
Base class inherited by NcOpaque, NcVlen, NcCompound and NcEnum classes.
Definition: ncType.h:15
Class represents a netCDF attribute local to a netCDF variable.
Definition: ncVarAtt.h:14
Class represents a netCDF variable.
Definition: ncVar.h:34
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const void *dataValues) const
This is an overloaded member function, provided for convenience.
void putVar(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) const
Writes a mapped array section of values into the netCDF variable.
void getVar(const std::vector< size_t > &index, float *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void freeString(size_t len, char **data) const
Free memory allocated for a string.
Definition: ncVar.cpp:646
void putVar(const std::vector< size_t > &index, const char **datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const double *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
ChecksumMode getChecksum() const
Gets the checksum parameters of the variable.
Definition: ncVar.cpp:695
NcVarAtt putAtt(const std::string &name, const NcType &type, long datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator!=(const NcVar &rhs) const
!= operator
Definition: ncVar.cpp:53
NcVarAtt putAtt(const std::string &name, const NcType &type, float datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const double *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, float *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const int datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience.
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const long long *dataValues) const
Writes an array of values into the netCDF variable.
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, void *dataValues) const
This is an overloaded member function, provided for convenience.
void setChecksum(ChecksumMode checksumMode) const
Sets the checksum parameters of a variable.
Definition: ncVar.cpp:689
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const signed char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const long datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, signed char *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, void *datumValue) const
This is an overloaded member function, provided for convenience.
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, float *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
ChunkMode
Used for chunking specifications (see NcVar::setChunking, NcVar::getChunkingParameters).
Definition: ncVar.h:39
@ nc_CHUNKED
Chunked storage is used for this variable.
Definition: ncVar.h:43
@ nc_CONTIGUOUS
Contiguous storage is used for this variable.
Definition: ncVar.h:48
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, char **dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const std::string &dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, int *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getFilter(unsigned int *idp, size_t *nparamsp, unsigned int *params) const
Query filter properties (if a filter has been applied).
Definition: ncVar.cpp:634
void getVar(const std::vector< size_t > &index, char *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, double datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcGroup getParentGroup() const
Gets parent group.
Definition: ncVar.cpp:80
void getVar(const std::vector< size_t > &index, double *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const unsigned char *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcDim getDim(int i) const
Gets the i'th NcDim object.
Definition: ncVar.cpp:171
void putVar(const std::vector< size_t > &index, const unsigned long long datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getCompressionParameters(bool &shuffleFilterEnabled, bool &deflateFilterEnabled, int &deflateLevel) const
Gets the compression parameters.
Definition: ncVar.cpp:614
NcVarAtt putAtt(const std::string &name, const NcType &type, int datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, size_t len, const char **dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const unsigned int datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getTypeLen(nc_type type) const
Query the length of a given ncType.
Definition: ncVar.cpp:640
void setCompression(bool enableShuffleFilter, bool enableDeflateFilter, int deflateLevel) const
Sets the compression parameters.
Definition: ncVar.cpp:601
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setFill(bool fillMode, T fillValue) const
Sets the fill parameters.
Definition: ncVar.h:305
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const void *dataValues) const
Creates a new variable attribute or if already exisiting replaces it.
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, short datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, char **dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, unsigned short datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, unsigned char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, unsigned int datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const unsigned short datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const double datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, long *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const std::string &datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
EndianMode getEndianness() const
Gets the endianness of the variable.
Definition: ncVar.cpp:672
void getFillModeParameters(bool &fillMode, T &fillValue) const
Gets the fill parameters.
Definition: ncVar.h:328
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const double *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string getName() const
Name of this NcVar object.
Definition: ncVar.cpp:528
void rename(const std::string &newname) const
Rename the variable.
Definition: ncVar.cpp:710
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const signed char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
ChecksumMode
Used for checksum specification (see NcVar::setChecksum, NcVar::getChecksum).
Definition: ncVar.h:63
@ nc_FLETCHER32
Selects the Fletcher32 checksum filter.
Definition: ncVar.h:65
@ nc_NOCHECKSUM
No checksum (the default).
Definition: ncVar.h:64
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getDimCount() const
The the number of dimensions.
Definition: ncVar.cpp:142
void getVar(const std::vector< size_t > &index, unsigned long long *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getFillModeParameters(bool &fillMode, void *fillValue=NULL) const
This is an overloaded member function, provided for convenience.
Definition: ncVar.cpp:585
~NcVar()
destructor
Definition: ncVar.h:69
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getId() const
Get the variable id.
Definition: ncVar.cpp:86
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVar & operator=(const NcVar &rhs)
assignment operator
Definition: ncVar.cpp:29
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const float *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(void *dataValues) const
This is an overloaded member function, provided for convenience.
Definition: ncVar.cpp:1467
void setChunkCache(size_t size, size_t nelems, float preemption) const
Change cache setttings for a chunked variable.
Definition: ncVar.cpp:652
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const signed char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, unsigned short *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, unsigned long long datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator==(const NcVar &rhs) const
equivalence operator
Definition: ncVar.cpp:46
void putVar(const std::vector< size_t > &index, const void *datumValue) const
This is an overloaded member function, provided for convenience.
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, unsigned char *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, char **datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
Reads a mapped array section of values from a netCDF variable.
void getVar(const std::vector< size_t > &index, short *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt getAtt(const std::string &name) const
Gets attribute by name.
Definition: ncVar.cpp:211
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const float *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const void *dataValues) const
This is an overloaded member function, provided for convenience.
Definition: ncVar.cpp:843
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setEndianness(EndianMode endianMode) const
Sets the endianness of the variable.
Definition: ncVar.cpp:665
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const unsigned short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, long long datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const unsigned long long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, double *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, signed char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::map< std::string, NcVarAtt > getAtts() const
Gets the set of attributes.
Definition: ncVar.cpp:196
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const long long *dataValues) const
Writes an array of values into the netCDF variable.
void putVar(const std::vector< size_t > &index, const signed char *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, long long *datumValue) const
Reads a single datum value from a variable of an open netCDF dataset.
void setFilter(unsigned int id, size_t nparams, const unsigned int *parms) const
Define new variable for compression/decompression.
Definition: ncVar.cpp:627
NcVar()
Constructor generates a null object.
Definition: ncVar.cpp:65
void setChunking(ChunkMode chunkMode, std::vector< size_t > &chunksizes) const
Sets chunking parameters.
Definition: ncVar.cpp:543
void putVar(const std::vector< size_t > &index, const long long datumValue) const
Writes a single datum into the netCDF variable.
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcType getType() const
Returns the variable type.
Definition: ncVar.cpp:96
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const unsigned int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isNull() const
Returns true if this object variable is not defined.
Definition: ncVar.h:126
void setFill(bool fillMode, void *fillValue=NULL) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ncVar.cpp:569
friend bool operator>(const NcVar &lhs, const NcVar &rhs)
comparator operator
Definition: ncVar.cpp:20
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const unsigned short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const char **dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const void *dataValues) const
This is an overloaded member function, provided for convenience.
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, signed char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< NcDim > getDims() const
Gets the set of NcDim objects.
Definition: ncVar.cpp:151
EndianMode
Used to specifying the endianess of the data, (see NcVar::setEndianness, NcVar::getEndianness).
Definition: ncVar.h:55
@ nc_ENDIAN_BIG
Big endian.
Definition: ncVar.h:58
@ nc_ENDIAN_NATIVE
Native endian.
Definition: ncVar.h:56
@ nc_ENDIAN_LITTLE
Little endian.
Definition: ncVar.h:57
void putVar(const std::vector< size_t > &index, const float datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &index, unsigned int *datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const char **dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, unsigned short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &index, const short datumValue) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, long long *dataValues) const
Reads a subsampled (strided) array section of values from a netCDF variable.
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, void *dataValues) const
This is an overloaded member function, provided for convenience.
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned int *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, double *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
friend bool operator<(const NcVar &lhs, const NcVar &rhs)
comparator operator
Definition: ncVar.cpp:14
void putVar(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) const
This is an overloaded member function, provided for convenience.
NcVarAtt putAtt(const std::string &name, const NcType &type, size_t len, const unsigned char *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getAttCount() const
Gets the number of attributes.
Definition: ncVar.cpp:187
void getChunkingParameters(ChunkMode &chunkMode, std::vector< size_t > &chunkSizes) const
Gets the chunking parameters.
Definition: ncVar.cpp:550
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, long long *dataValues) const
Reads an array of values from a netCDF variable of an open netCDF dataset.
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const unsigned short *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void putVar(const std::vector< size_t > &startp, const std::vector< size_t > &countp, const std::vector< ptrdiff_t > &stridep, const float *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(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) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void getVar(const std::vector< size_t > &start, const std::vector< size_t > &count, const std::vector< ptrdiff_t > &stride, long *dataValues) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
C++ API for netCDF4.
Definition: ncAtt.h:10
void ncCheck(int retCode, const char *file, int line)
Function checks error code and if necessary throws an exception.
Definition: ncCheck.cpp:11

Return to the Main Unidata NetCDF page.
Generated on Wed Nov 10 2021 15:25:08 for NetCDF-C++. NetCDF is a Unidata library.