6#include "ncException.h"
31 nullObject = rhs.nullObject;
33 groupId = rhs.groupId;
39 nullObject(rhs.nullObject),
49 return (myId == rhs.myId);
55 return !(*
this == rhs);
103 ncCheck(nc_inq_vartype(groupId,myId,&xtypep),__FILE__,__LINE__);
109 if(xtypep == ncUshort.
getId() )
return ncUshort;
118 multimap<string,NcType>::const_iterator it;
120 for(it=types.begin(); it!=types.end(); it++) {
121 if(it->second.getId() == xtypep)
return it->second;
146 ncCheck(nc_inq_varndims(groupId,myId, &dimCount),__FILE__,__LINE__);
156 vector<NcDim> ncDims;
158 vector<int> dimids(dimCount);
159 ncCheck(nc_inq_vardimid(groupId,myId, &dimids[0]),__FILE__,__LINE__);
160 ncDims.reserve(dimCount);
161 for (
int i=0; i<dimCount; i++){
163 ncDims.push_back(tmpDim);
173 vector<NcDim> ncDims =
getDims();
174 if((
size_t)i >= ncDims.size() || i < 0)
throw NcException(
"Index out of range",__FILE__,__LINE__);
191 ncCheck(nc_inq_varnatts(groupId,myId, &attCount),__FILE__,__LINE__);
201 map<string,NcVarAtt> ncAtts;
202 for (
int i=0; i<attCount; i++){
204 ncAtts.insert(pair<const string,NcVarAtt>(tmpAtt.
getName(),tmpAtt));
213 map<string,NcVarAtt> attributeList =
getAtts();
214 map<string,NcVarAtt>::iterator myIter;
215 myIter = attributeList.find(name);
216 if(myIter == attributeList.end()){
217 string msg(
"Attribute '"+name+
"' not found");
231 ncCheck(nc_put_att_text(groupId,myId,name.c_str(),dataValues.size(),dataValues.c_str()),__FILE__,__LINE__);
241 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
243 ncCheck(nc_put_att_uchar(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
254 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
256 ncCheck(nc_put_att_schar(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
269 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
271 ncCheck(nc_put_att_short(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
282 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
284 ncCheck(nc_put_att_int(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
294 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
296 ncCheck(nc_put_att_long(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
306 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
308 ncCheck(nc_put_att_float(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
319 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
321 ncCheck(nc_put_att_double(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
332 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
334 ncCheck(nc_put_att_ushort(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
344 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
346 ncCheck(nc_put_att_uint(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
356 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
358 ncCheck(nc_put_att_longlong(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
369 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
371 ncCheck(nc_put_att_ulonglong(groupId,myId,name.c_str(),type.
getId(),1,&datumValue),__FILE__,__LINE__);
394 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
396 ncCheck(nc_put_att_short(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
407 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
409 ncCheck(nc_put_att_int(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
419 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
421 ncCheck(nc_put_att_long(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
431 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
433 ncCheck(nc_put_att_float(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
444 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
446 ncCheck(nc_put_att_double(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
457 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
459 ncCheck(nc_put_att_ushort(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
469 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
471 ncCheck(nc_put_att_uint(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
481 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
483 ncCheck(nc_put_att_longlong(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
494 ncCheck(nc_put_att(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
496 ncCheck(nc_put_att_ulonglong(groupId,myId,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
505 ncCheck(nc_put_att_string(groupId,myId,name.c_str(),len,dataValues),__FILE__,__LINE__);
513 ncCheck(nc_put_att(groupId,myId ,name.c_str(),type.
getId(),len,dataValues),__FILE__,__LINE__);
529 char charName[NC_MAX_NAME+1];
530 ncCheck(nc_inq_varname(groupId, myId, charName),__FILE__,__LINE__);
531 return string(charName);
544 size_t *chunkSizesPtr = chunkSizes.empty() ? 0 : &chunkSizes[0];
545 ncCheck(nc_def_var_chunking(groupId,myId,
static_cast<int> (chunkMode), chunkSizesPtr),__FILE__,__LINE__);
553 size_t *chunkSizesPtr = chunkSizes.empty() ? 0 : &chunkSizes[0];
554 ncCheck(nc_inq_var_chunking(groupId,myId, &chunkModeInt, chunkSizesPtr),__FILE__,__LINE__);
555 chunkMode =
static_cast<ChunkMode> (chunkModeInt);
571 if(fillMode && fillValue == NULL)
572 throw NcException(
"FillMode was set to zero but fillValue has invalid pointer",__FILE__,__LINE__);
574 ncCheck(nc_def_var_fill(groupId,myId,
static_cast<int> (!fillMode),fillValue),__FILE__,__LINE__);
579 setFill(fillMode,
const_cast<void*
>(fillValue));
588 ncCheck(nc_inq_var_fill(groupId,myId,&fillModeInt,fillValue),__FILE__,__LINE__);
589 fillMode=
static_cast<bool> (fillModeInt == 0);
604 if(enableDeflateFilter & (deflateLevel < 0 || deflateLevel >9))
605 throw NcException(
"The deflateLevel must be set between 0 and 9.",__FILE__,__LINE__);
607 ncCheck(nc_def_var_deflate(groupId,myId,
608 static_cast<int> (enableShuffleFilter),
609 static_cast<int> (enableDeflateFilter),
610 deflateLevel),__FILE__,__LINE__);
616 int enableShuffleFilterInt;
617 int enableDeflateFilterInt;
618 ncCheck(nc_inq_var_deflate(groupId,myId,
619 &enableShuffleFilterInt,
620 &enableDeflateFilterInt,
621 &deflateLevel),__FILE__,__LINE__);
622 shuffleFilterEnabled =
static_cast<bool> (enableShuffleFilterInt);
623 deflateFilterEnabled =
static_cast<bool> (enableDeflateFilterInt);
628 const unsigned int* parms)
const
630 ncCheck(nc_def_var_filter(groupId,myId,
id,nparams,parms),__FILE__,__LINE__);
636 ncCheck(nc_inq_var_filter(groupId, myId, idp, nparamsp, params),__FILE__,__LINE__);
642 ncCheck(nctypelen(type),__FILE__,__LINE__);
648 ncCheck(nc_free_string(len, data),__FILE__,__LINE__);
654 ncCheck(nc_set_var_chunk_cache(groupId, myId, size, nelems, preemption),__FILE__,__LINE__);
667 ncCheck(nc_def_var_endian(groupId,myId,
static_cast<int> (endianMode)),__FILE__,__LINE__);
675 ncCheck(nc_inq_var_endian(groupId,myId,&endianInt),__FILE__,__LINE__);
690 ncCheck(nc_def_var_fletcher32(groupId,myId,
static_cast<int> (checksumMode)),__FILE__,__LINE__);
697 ncCheck(nc_inq_var_fletcher32(groupId,myId,&checksumInt),__FILE__,__LINE__);
712 ncCheck(nc_rename_var(groupId,myId,newname.c_str()),__FILE__,__LINE__);
730 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
732 ncCheck(nc_put_var_text(groupId, myId,dataValues),__FILE__,__LINE__);
739 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
741 ncCheck(nc_put_var_uchar(groupId, myId,dataValues),__FILE__,__LINE__);
748 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
750 ncCheck(nc_put_var_schar(groupId, myId,dataValues),__FILE__,__LINE__);
757 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
759 ncCheck(nc_put_var_short(groupId, myId,dataValues),__FILE__,__LINE__);
766 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
768 ncCheck(nc_put_var_int(groupId, myId,dataValues),__FILE__,__LINE__);
775 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
777 ncCheck(nc_put_var_long(groupId, myId,dataValues),__FILE__,__LINE__);
784 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
786 ncCheck(nc_put_var_float(groupId, myId,dataValues),__FILE__,__LINE__);
793 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
795 ncCheck(nc_put_var_double(groupId, myId,dataValues),__FILE__,__LINE__);
802 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
804 ncCheck(nc_put_var_ushort(groupId, myId,dataValues),__FILE__,__LINE__);
811 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
813 ncCheck(nc_put_var_uint(groupId, myId,dataValues),__FILE__,__LINE__);
820 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
822 ncCheck(nc_put_var_longlong(groupId, myId,dataValues),__FILE__,__LINE__);
829 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
831 ncCheck(nc_put_var_ulonglong(groupId, myId,dataValues),__FILE__,__LINE__);
838 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
840 ncCheck(nc_put_var_string(groupId, myId,dataValues),__FILE__,__LINE__);
845 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
851void NcVar::putVar(
const vector<size_t>& index,
const string& datumValue)
const {
855 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
858 const char* tmpPtr = datumValue.c_str();
859 ncCheck(nc_put_var1_string(groupId, myId,&index[0],&tmpPtr),__FILE__,__LINE__);
863void NcVar::putVar(
const vector<size_t>& index,
const unsigned char* datumValue)
const {
867 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
869 ncCheck(nc_put_var1_uchar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
872void NcVar::putVar(
const vector<size_t>& index,
const signed char* datumValue)
const {
876 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
878 ncCheck(nc_put_var1_schar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
881void NcVar::putVar(
const vector<size_t>& index,
const short datumValue)
const {
885 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
887 ncCheck(nc_put_var1_short(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
890void NcVar::putVar(
const vector<size_t>& index,
const int datumValue)
const {
894 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
896 ncCheck(nc_put_var1_int(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
899void NcVar::putVar(
const vector<size_t>& index,
const long datumValue)
const {
903 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
905 ncCheck(nc_put_var1_long(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
908void NcVar::putVar(
const vector<size_t>& index,
const float datumValue)
const {
912 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
914 ncCheck(nc_put_var1_float(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
917void NcVar::putVar(
const vector<size_t>& index,
const double datumValue)
const {
921 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
923 ncCheck(nc_put_var1_double(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
926void NcVar::putVar(
const vector<size_t>& index,
const unsigned short datumValue)
const {
930 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
932 ncCheck(nc_put_var1_ushort(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
935void NcVar::putVar(
const vector<size_t>& index,
const unsigned int datumValue)
const {
939 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
941 ncCheck(nc_put_var1_uint(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
944void NcVar::putVar(
const vector<size_t>& index,
const long long datumValue)
const {
948 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
950 ncCheck(nc_put_var1_longlong(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
953void NcVar::putVar(
const vector<size_t>& index,
const unsigned long long datumValue)
const {
957 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
959 ncCheck(nc_put_var1_ulonglong(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
962void NcVar::putVar(
const vector<size_t>& index,
const char** datumValue)
const {
966 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
968 ncCheck(nc_put_var1_string(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
971void NcVar::putVar(
const vector<size_t>& index,
const void* datumValue)
const {
973 ncCheck(nc_put_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
980void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const char* dataValues)
const {
984 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
986 ncCheck(nc_put_vara_text(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
989void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned char* dataValues)
const {
993 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
995 ncCheck(nc_put_vara_uchar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
998void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const signed char* dataValues)
const {
1002 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1004 ncCheck(nc_put_vara_schar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1007void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const short* dataValues)
const {
1011 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1013 ncCheck(nc_put_vara_short(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1016void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const int* dataValues)
const {
1020 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1022 ncCheck(nc_put_vara_int(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1025void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const long* dataValues)
const {
1029 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1031 ncCheck(nc_put_vara_long(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1034void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const float* dataValues)
const {
1038 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1040 ncCheck(nc_put_vara_float(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1043void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const double* dataValues)
const {
1047 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1049 ncCheck(nc_put_vara_double(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1052void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned short* dataValues)
const {
1056 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1058 ncCheck(nc_put_vara_ushort(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1061void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned int* dataValues)
const {
1065 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1067 ncCheck(nc_put_vara_uint(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1070void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const long long* dataValues)
const {
1074 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1076 ncCheck(nc_put_vara_longlong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1079void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned long long* dataValues)
const {
1083 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1085 ncCheck(nc_put_vara_ulonglong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1088void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const char** dataValues)
const {
1092 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1094 ncCheck(nc_put_vara_string(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1097void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const void* dataValues)
const {
1099 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1107void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const char* dataValues)
const {
1111 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1113 ncCheck(nc_put_vars_text(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1116void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned char* dataValues)
const {
1120 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1122 ncCheck(nc_put_vars_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1125void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const signed char* dataValues)
const {
1129 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1131 ncCheck(nc_put_vars_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1134void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const short* dataValues)
const {
1138 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1140 ncCheck(nc_put_vars_short(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1143void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const int* dataValues)
const {
1147 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1149 ncCheck(nc_put_vars_int(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1152void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const long* dataValues)
const {
1156 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1158 ncCheck(nc_put_vars_long(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1161void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const float* dataValues)
const {
1165 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1167 ncCheck(nc_put_vars_float(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1170void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const double* dataValues)
const {
1174 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1176 ncCheck(nc_put_vars_double(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1179void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned short* dataValues)
const {
1183 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1185 ncCheck(nc_put_vars_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1188void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned int* dataValues)
const {
1192 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1194 ncCheck(nc_put_vars_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1197void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const long long* dataValues)
const {
1201 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1203 ncCheck(nc_put_vars_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1206void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned long long* dataValues)
const {
1210 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1212 ncCheck(nc_put_vars_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1215void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const char** dataValues)
const {
1219 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1221 ncCheck(nc_put_vars_string(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1224void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const void* dataValues)
const {
1226 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1232void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const char* dataValues)
const {
1236 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1238 ncCheck(nc_put_varm_text(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1241void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const unsigned char* dataValues)
const {
1245 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1247 ncCheck(nc_put_varm_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1250void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const signed char* dataValues)
const {
1254 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1256 ncCheck(nc_put_varm_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1259void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const short* dataValues)
const {
1263 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1265 ncCheck(nc_put_varm_short(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1268void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const int* dataValues)
const {
1272 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1274 ncCheck(nc_put_varm_int(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1277void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const long* dataValues)
const {
1281 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1283 ncCheck(nc_put_varm_long(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1286void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const float* dataValues)
const {
1290 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1292 ncCheck(nc_put_varm_float(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1295void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const double* dataValues)
const {
1299 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1301 ncCheck(nc_put_varm_double(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1304void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const unsigned short* dataValues)
const {
1308 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1310 ncCheck(nc_put_varm_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1313void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const unsigned int* dataValues)
const {
1317 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1319 ncCheck(nc_put_varm_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1322void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const long long* dataValues)
const {
1326 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1328 ncCheck(nc_put_varm_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1331void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const unsigned long long* dataValues)
const {
1335 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1337 ncCheck(nc_put_varm_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1340void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const char** dataValues)
const {
1344 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1346 ncCheck(nc_put_varm_string(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1349void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
const void* dataValues)
const {
1351 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1366 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1368 ncCheck(nc_get_var_text(groupId, myId,dataValues),__FILE__,__LINE__);
1374 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1376 ncCheck(nc_get_var_uchar(groupId, myId,dataValues),__FILE__,__LINE__);
1382 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1384 ncCheck(nc_get_var_schar(groupId, myId,dataValues),__FILE__,__LINE__);
1390 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1392 ncCheck(nc_get_var_short(groupId, myId,dataValues),__FILE__,__LINE__);
1398 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1400 ncCheck(nc_get_var_int(groupId, myId,dataValues),__FILE__,__LINE__);
1406 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1408 ncCheck(nc_get_var_long(groupId, myId,dataValues),__FILE__,__LINE__);
1414 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1416 ncCheck(nc_get_var_float(groupId, myId,dataValues),__FILE__,__LINE__);
1422 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1424 ncCheck(nc_get_var_double(groupId, myId,dataValues),__FILE__,__LINE__);
1430 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1432 ncCheck(nc_get_var_ushort(groupId, myId,dataValues),__FILE__,__LINE__);
1438 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1440 ncCheck(nc_get_var_uint(groupId, myId,dataValues),__FILE__,__LINE__);
1446 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1448 ncCheck(nc_get_var_longlong(groupId, myId,dataValues),__FILE__,__LINE__);
1454 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1456 ncCheck(nc_get_var_ulonglong(groupId, myId,dataValues),__FILE__,__LINE__);
1462 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1464 ncCheck(nc_get_var_string(groupId, myId,dataValues),__FILE__,__LINE__);
1468 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1476void NcVar::getVar(
const vector<size_t>& index,
char* datumValue)
const {
1479 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1481 ncCheck(nc_get_var1_text(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1484void NcVar::getVar(
const vector<size_t>& index,
unsigned char* datumValue)
const {
1487 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1489 ncCheck(nc_get_var1_uchar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1492void NcVar::getVar(
const vector<size_t>& index,
signed char* datumValue)
const {
1495 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1497 ncCheck(nc_get_var1_schar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1500void NcVar::getVar(
const vector<size_t>& index,
short* datumValue)
const {
1503 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1505 ncCheck(nc_get_var1_short(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1508void NcVar::getVar(
const vector<size_t>& index,
int* datumValue)
const {
1511 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1513 ncCheck(nc_get_var1_int(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1516void NcVar::getVar(
const vector<size_t>& index,
long* datumValue)
const {
1519 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1521 ncCheck(nc_get_var1_long(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1524void NcVar::getVar(
const vector<size_t>& index,
float* datumValue)
const {
1527 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1529 ncCheck(nc_get_var1_float(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1532void NcVar::getVar(
const vector<size_t>& index,
double* datumValue)
const {
1535 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1537 ncCheck(nc_get_var1_double(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1540void NcVar::getVar(
const vector<size_t>& index,
unsigned short* datumValue)
const {
1543 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1545 ncCheck(nc_get_var1_ushort(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1548void NcVar::getVar(
const vector<size_t>& index,
unsigned int* datumValue)
const {
1551 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1553 ncCheck(nc_get_var1_uint(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1556void NcVar::getVar(
const vector<size_t>& index,
long long* datumValue)
const {
1559 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1561 ncCheck(nc_get_var1_longlong(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1564void NcVar::getVar(
const vector<size_t>& index,
unsigned long long* datumValue)
const {
1567 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1569 ncCheck(nc_get_var1_ulonglong(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1572void NcVar::getVar(
const vector<size_t>& index,
char** datumValue)
const {
1575 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1577 ncCheck(nc_get_var1_string(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1580void NcVar::getVar(
const vector<size_t>& index,
void* datumValue)
const {
1581 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1589void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
char* dataValues)
const {
1592 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1594 ncCheck(nc_get_vara_text(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1597void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned char* dataValues)
const {
1600 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1602 ncCheck(nc_get_vara_uchar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1605void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
signed char* dataValues)
const {
1608 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1610 ncCheck(nc_get_vara_schar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1613void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
short* dataValues)
const {
1616 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1618 ncCheck(nc_get_vara_short(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1621void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
int* dataValues)
const {
1624 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1626 ncCheck(nc_get_vara_int(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1629void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
long* dataValues)
const {
1632 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1634 ncCheck(nc_get_vara_long(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1637void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
float* dataValues)
const {
1640 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1642 ncCheck(nc_get_vara_float(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1645void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
double* dataValues)
const {
1648 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1650 ncCheck(nc_get_vara_double(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1653void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned short* dataValues)
const {
1656 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1658 ncCheck(nc_get_vara_ushort(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1661void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned int* dataValues)
const {
1664 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1666 ncCheck(nc_get_vara_uint(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1669void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
long long* dataValues)
const {
1672 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1674 ncCheck(nc_get_vara_longlong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1677void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned long long* dataValues)
const {
1680 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1682 ncCheck(nc_get_vara_ulonglong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1685void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
char** dataValues)
const {
1688 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1690 ncCheck(nc_get_vara_string(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1693void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
void* dataValues)
const {
1694 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1701void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
char* dataValues)
const {
1704 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1706 ncCheck(nc_get_vars_text(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1709void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned char* dataValues)
const {
1712 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1714 ncCheck(nc_get_vars_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1717void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
signed char* dataValues)
const {
1720 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1722 ncCheck(nc_get_vars_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1725void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
short* dataValues)
const {
1728 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1730 ncCheck(nc_get_vars_short(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1733void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
int* dataValues)
const {
1736 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1738 ncCheck(nc_get_vars_int(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1741void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
long* dataValues)
const {
1744 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1746 ncCheck(nc_get_vars_long(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1749void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
float* dataValues)
const {
1752 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1754 ncCheck(nc_get_vars_float(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1757void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
double* dataValues)
const {
1760 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1762 ncCheck(nc_get_vars_double(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1765void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned short* dataValues)
const {
1768 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1770 ncCheck(nc_get_vars_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1773void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned int* dataValues)
const {
1776 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1778 ncCheck(nc_get_vars_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1781void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
long long* dataValues)
const {
1784 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1786 ncCheck(nc_get_vars_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1789void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned long long* dataValues)
const {
1792 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1794 ncCheck(nc_get_vars_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1797void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
char** dataValues)
const {
1800 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1802 ncCheck(nc_get_vars_string(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1805void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
void* dataValues)
const {
1806 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1813void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
char* dataValues)
const {
1816 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1818 ncCheck(nc_get_varm_text(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1821void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
unsigned char* dataValues)
const {
1824 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1826 ncCheck(nc_get_varm_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1829void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
signed char* dataValues)
const {
1832 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1834 ncCheck(nc_get_varm_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1837void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
short* dataValues)
const {
1840 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1842 ncCheck(nc_get_varm_short(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1845void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
int* dataValues)
const {
1848 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1850 ncCheck(nc_get_varm_int(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1853void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
long* dataValues)
const {
1856 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1858 ncCheck(nc_get_varm_long(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1861void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
float* dataValues)
const {
1864 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1866 ncCheck(nc_get_varm_float(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1869void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
double* dataValues)
const {
1872 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1874 ncCheck(nc_get_varm_double(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1877void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
unsigned short* dataValues)
const {
1880 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1882 ncCheck(nc_get_varm_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1885void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
unsigned int* dataValues)
const {
1888 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1890 ncCheck(nc_get_varm_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1893void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
long long* dataValues)
const {
1896 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1898 ncCheck(nc_get_varm_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1901void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
unsigned long long* dataValues)
const {
1904 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1906 ncCheck(nc_get_varm_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1909void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
char** dataValues)
const {
1912 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1914 ncCheck(nc_get_varm_string(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1917void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
const vector<ptrdiff_t>& imapp,
void* dataValues)
const {
1918 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
std::string getName() const
Get the attribute name.
Class represents a netCDF dimension.
Class represents a netCDF group.
@ ParentsAndCurrent
Select from contents of current and parents groups.
Base class inherited by NcOpaque, NcVlen, NcCompound and NcEnum classes.
ncType getTypeClass() const
The type class returned as enumeration type.
ncType
List of netCDF types that can be represented.
@ nc_OPAQUE
"NcOpaque type"
@ nc_COMPOUND
"NcCompound type"
nc_type getId() const
The netCDF Id of this type.
Class represents a netCDF attribute local to a netCDF variable.
Class represents a netCDF variable.
void freeString(size_t len, char **data) const
Free memory allocated for a string.
ChecksumMode getChecksum() const
Gets the checksum parameters of the variable.
bool operator!=(const NcVar &rhs) const
!= operator
void setChecksum(ChecksumMode checksumMode) const
Sets the checksum parameters of a variable.
ChunkMode
Used for chunking specifications (see NcVar::setChunking, NcVar::getChunkingParameters).
void getFilter(unsigned int *idp, size_t *nparamsp, unsigned int *params) const
Query filter properties (if a filter has been applied).
NcGroup getParentGroup() const
Gets parent group.
NcDim getDim(int i) const
Gets the i'th NcDim object.
void getCompressionParameters(bool &shuffleFilterEnabled, bool &deflateFilterEnabled, int &deflateLevel) const
Gets the compression parameters.
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 getTypeLen(nc_type type) const
Query the length of a given ncType.
void setCompression(bool enableShuffleFilter, bool enableDeflateFilter, int deflateLevel) const
Sets the compression parameters.
EndianMode getEndianness() const
Gets the endianness of the variable.
std::string getName() const
Name of this NcVar object.
void rename(const std::string &newname) const
Rename the variable.
ChecksumMode
Used for checksum specification (see NcVar::setChecksum, NcVar::getChecksum).
int getDimCount() const
The the number of dimensions.
void getFillModeParameters(bool &fillMode, void *fillValue=NULL) const
This is an overloaded member function, provided for convenience.
int getId() const
Get the variable id.
void getVar(void *dataValues) const
This is an overloaded member function, provided for convenience.
void setChunkCache(size_t size, size_t nelems, float preemption) const
Change cache setttings for a chunked variable.
bool operator==(const NcVar &rhs) const
equivalence operator
NcVarAtt getAtt(const std::string &name) const
Gets attribute by name.
void putVar(const void *dataValues) const
This is an overloaded member function, provided for convenience.
void setEndianness(EndianMode endianMode) const
Sets the endianness of the variable.
std::map< std::string, NcVarAtt > getAtts() const
Gets the set of attributes.
void setFilter(unsigned int id, size_t nparams, const unsigned int *parms) const
Define new variable for compression/decompression.
NcVar()
Constructor generates a null object.
void setChunking(ChunkMode chunkMode, std::vector< size_t > &chunksizes) const
Sets chunking parameters.
NcType getType() const
Returns the variable type.
bool isNull() const
Returns true if this object variable is not defined.
void setFill(bool fillMode, void *fillValue=NULL) 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.
EndianMode
Used to specifying the endianess of the data, (see NcVar::setEndianness, NcVar::getEndianness).
int getAttCount() const
Gets the number of attributes.
void getChunkingParameters(ChunkMode &chunkMode, std::vector< size_t > &chunkSizes) const
Gets the chunking parameters.
Base object is thrown if a netCDF exception is encountered.
void ncCheckDataMode(int ncid)
Function checks if the file (group) is in data mode.
NcShort ncShort
A global instance of the NcShort class within the netCDF namespace.
NcFloat ncFloat
A global instance of the NcFloat class within the netCDF namespace.
NcInt64 ncInt64
A global instance of the NcInt64 class within the netCDF namespace.
void ncCheckDefineMode(int ncid)
Function checks if the file (group) is in define mode.
NcUint64 ncUint64
A global instance of the NcUint64 class within the netCDF namespace.
NcUint ncUint
A global instance of the NcUint class within the netCDF namespace.
NcString ncString
A global instance of the NcString class within the netCDF namespace.
NcInt ncInt
A global instance of the NcInt class within the netCDF namespace.
NcDouble ncDouble
A global instance of the NcDouble class within the netCDF namespace.
void ncCheck(int retCode, const char *file, int line)
Function checks error code and if necessary throws an exception.
NcUbyte ncUbyte
A global instance of the NcUbyte class within the netCDF namespace.
NcChar ncChar
A global instance of the NcChar class within the netCDF namespace.
NcByte ncByte
A global instance of the NcByte class within the netCDF namespace.