6 #include "ncException.h" 31 nullObject = rhs.nullObject;
33 groupId = rhs.groupId;
38 NcVar::NcVar(
const NcVar& rhs) :
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__);
617 int enableShuffleFilterInt;
618 int enableDeflateFilterInt;
619 ncCheck(nc_inq_var_deflate(groupId,myId,
620 &enableShuffleFilterInt,
621 &enableDeflateFilterInt,
622 &deflateLevel),__FILE__,__LINE__);
623 shuffleFilterEnabled =
static_cast<bool> (enableShuffleFilterInt);
624 deflateFilterEnabled =
static_cast<bool> (enableDeflateFilterInt);
639 ncCheck(nc_def_var_endian(groupId,myId,static_cast<int> (endianMode)),__FILE__,__LINE__);
647 ncCheck(nc_inq_var_endian(groupId,myId,&endianInt),__FILE__,__LINE__);
662 ncCheck(nc_def_var_fletcher32(groupId,myId,static_cast<int> (checksumMode)),__FILE__,__LINE__);
669 ncCheck(nc_inq_var_fletcher32(groupId,myId,&checksumInt),__FILE__,__LINE__);
684 ncCheck(nc_rename_var(groupId,myId,newname.c_str()),__FILE__,__LINE__);
702 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
704 ncCheck(nc_put_var_text(groupId, myId,dataValues),__FILE__,__LINE__);
711 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
713 ncCheck(nc_put_var_uchar(groupId, myId,dataValues),__FILE__,__LINE__);
720 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
722 ncCheck(nc_put_var_schar(groupId, myId,dataValues),__FILE__,__LINE__);
729 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
731 ncCheck(nc_put_var_short(groupId, myId,dataValues),__FILE__,__LINE__);
738 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
740 ncCheck(nc_put_var_int(groupId, myId,dataValues),__FILE__,__LINE__);
747 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
749 ncCheck(nc_put_var_long(groupId, myId,dataValues),__FILE__,__LINE__);
756 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
758 ncCheck(nc_put_var_float(groupId, myId,dataValues),__FILE__,__LINE__);
765 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
767 ncCheck(nc_put_var_double(groupId, myId,dataValues),__FILE__,__LINE__);
774 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
776 ncCheck(nc_put_var_ushort(groupId, myId,dataValues),__FILE__,__LINE__);
783 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
785 ncCheck(nc_put_var_uint(groupId, myId,dataValues),__FILE__,__LINE__);
792 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
794 ncCheck(nc_put_var_longlong(groupId, myId,dataValues),__FILE__,__LINE__);
801 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
803 ncCheck(nc_put_var_ulonglong(groupId, myId,dataValues),__FILE__,__LINE__);
810 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
812 ncCheck(nc_put_var_string(groupId, myId,dataValues),__FILE__,__LINE__);
817 ncCheck(nc_put_var(groupId, myId,dataValues),__FILE__,__LINE__);
823 void NcVar::putVar(
const vector<size_t>& index,
const string& datumValue)
const {
827 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
830 const char* tmpPtr = datumValue.c_str();
831 ncCheck(nc_put_var1_string(groupId, myId,&index[0],&tmpPtr),__FILE__,__LINE__);
835 void NcVar::putVar(
const vector<size_t>& index,
const unsigned char* datumValue)
const {
839 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
841 ncCheck(nc_put_var1_uchar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
844 void NcVar::putVar(
const vector<size_t>& index,
const signed char* datumValue)
const {
848 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
850 ncCheck(nc_put_var1_schar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
853 void NcVar::putVar(
const vector<size_t>& index,
const short datumValue)
const {
857 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
859 ncCheck(nc_put_var1_short(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
862 void NcVar::putVar(
const vector<size_t>& index,
const int datumValue)
const {
866 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
868 ncCheck(nc_put_var1_int(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
871 void NcVar::putVar(
const vector<size_t>& index,
const long datumValue)
const {
875 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
877 ncCheck(nc_put_var1_long(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
880 void NcVar::putVar(
const vector<size_t>& index,
const float datumValue)
const {
884 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
886 ncCheck(nc_put_var1_float(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
889 void NcVar::putVar(
const vector<size_t>& index,
const double datumValue)
const {
893 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
895 ncCheck(nc_put_var1_double(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
898 void NcVar::putVar(
const vector<size_t>& index,
const unsigned short datumValue)
const {
902 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
904 ncCheck(nc_put_var1_ushort(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
907 void NcVar::putVar(
const vector<size_t>& index,
const unsigned int datumValue)
const {
911 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
913 ncCheck(nc_put_var1_uint(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
916 void NcVar::putVar(
const vector<size_t>& index,
const long long datumValue)
const {
920 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
922 ncCheck(nc_put_var1_longlong(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
925 void NcVar::putVar(
const vector<size_t>& index,
const unsigned long long datumValue)
const {
929 ncCheck(nc_put_var1(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
931 ncCheck(nc_put_var1_ulonglong(groupId, myId,&index[0],&datumValue),__FILE__,__LINE__);
934 void NcVar::putVar(
const vector<size_t>& index,
const char** datumValue)
const {
938 throw NcException(
"user-defined type must be of type void",__FILE__,__LINE__);
940 ncCheck(nc_put_var1_string(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
943 void NcVar::putVar(
const vector<size_t>& index,
const void* datumValue)
const {
945 ncCheck(nc_put_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
952 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const char* dataValues)
const {
956 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
958 ncCheck(nc_put_vara_text(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
961 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned char* dataValues)
const {
965 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
967 ncCheck(nc_put_vara_uchar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
970 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const signed char* dataValues)
const {
974 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
976 ncCheck(nc_put_vara_schar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
979 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const short* dataValues)
const {
983 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
985 ncCheck(nc_put_vara_short(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
988 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const int* dataValues)
const {
992 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
994 ncCheck(nc_put_vara_int(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
997 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const long* dataValues)
const {
1001 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1003 ncCheck(nc_put_vara_long(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1006 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const float* dataValues)
const {
1010 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1012 ncCheck(nc_put_vara_float(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1015 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const double* dataValues)
const {
1019 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1021 ncCheck(nc_put_vara_double(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1024 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned short* dataValues)
const {
1028 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1030 ncCheck(nc_put_vara_ushort(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1033 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned int* dataValues)
const {
1037 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1039 ncCheck(nc_put_vara_uint(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1042 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const long long* dataValues)
const {
1046 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1048 ncCheck(nc_put_vara_longlong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1051 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const unsigned long long* dataValues)
const {
1055 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1057 ncCheck(nc_put_vara_ulonglong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1060 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const char** dataValues)
const {
1064 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1066 ncCheck(nc_put_vara_string(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1069 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const void* dataValues)
const {
1071 ncCheck(nc_put_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1079 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const char* dataValues)
const {
1083 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1085 ncCheck(nc_put_vars_text(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1088 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned char* dataValues)
const {
1092 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1094 ncCheck(nc_put_vars_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1097 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const signed char* dataValues)
const {
1101 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1103 ncCheck(nc_put_vars_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1106 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const short* dataValues)
const {
1110 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1112 ncCheck(nc_put_vars_short(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1115 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const int* dataValues)
const {
1119 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1121 ncCheck(nc_put_vars_int(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1124 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const long* dataValues)
const {
1128 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1130 ncCheck(nc_put_vars_long(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1133 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const float* dataValues)
const {
1137 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1139 ncCheck(nc_put_vars_float(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1142 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const double* dataValues)
const {
1146 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1148 ncCheck(nc_put_vars_double(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1151 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned short* dataValues)
const {
1155 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1157 ncCheck(nc_put_vars_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1160 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned int* dataValues)
const {
1164 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1166 ncCheck(nc_put_vars_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1169 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const long long* dataValues)
const {
1173 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1175 ncCheck(nc_put_vars_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1178 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const unsigned long long* dataValues)
const {
1182 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1184 ncCheck(nc_put_vars_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1187 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const char** dataValues)
const {
1191 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1193 ncCheck(nc_put_vars_string(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1196 void NcVar::putVar(
const vector<size_t>& startp,
const vector<size_t>&countp,
const vector<ptrdiff_t>& stridep,
const void* dataValues)
const {
1198 ncCheck(nc_put_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1204 void 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 {
1208 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1210 ncCheck(nc_put_varm_text(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1213 void 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 {
1217 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1219 ncCheck(nc_put_varm_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1222 void 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 {
1226 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1228 ncCheck(nc_put_varm_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1231 void 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 {
1235 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1237 ncCheck(nc_put_varm_short(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1240 void 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 {
1244 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1246 ncCheck(nc_put_varm_int(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1249 void 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 {
1253 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1255 ncCheck(nc_put_varm_long(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1258 void 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 {
1262 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1264 ncCheck(nc_put_varm_float(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1267 void 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 {
1271 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1273 ncCheck(nc_put_varm_double(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1276 void 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 {
1280 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1282 ncCheck(nc_put_varm_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1285 void 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 {
1289 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1291 ncCheck(nc_put_varm_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1294 void 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 {
1298 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1300 ncCheck(nc_put_varm_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1303 void 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 {
1307 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1309 ncCheck(nc_put_varm_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1312 void 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 {
1316 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1318 ncCheck(nc_put_varm_string(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1321 void 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 {
1323 ncCheck(nc_put_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1338 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1340 ncCheck(nc_get_var_text(groupId, myId,dataValues),__FILE__,__LINE__);
1346 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1348 ncCheck(nc_get_var_uchar(groupId, myId,dataValues),__FILE__,__LINE__);
1354 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1356 ncCheck(nc_get_var_schar(groupId, myId,dataValues),__FILE__,__LINE__);
1362 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1364 ncCheck(nc_get_var_short(groupId, myId,dataValues),__FILE__,__LINE__);
1370 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1372 ncCheck(nc_get_var_int(groupId, myId,dataValues),__FILE__,__LINE__);
1378 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1380 ncCheck(nc_get_var_long(groupId, myId,dataValues),__FILE__,__LINE__);
1386 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1388 ncCheck(nc_get_var_float(groupId, myId,dataValues),__FILE__,__LINE__);
1394 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1396 ncCheck(nc_get_var_double(groupId, myId,dataValues),__FILE__,__LINE__);
1402 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1404 ncCheck(nc_get_var_ushort(groupId, myId,dataValues),__FILE__,__LINE__);
1410 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1412 ncCheck(nc_get_var_uint(groupId, myId,dataValues),__FILE__,__LINE__);
1418 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1420 ncCheck(nc_get_var_longlong(groupId, myId,dataValues),__FILE__,__LINE__);
1426 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1428 ncCheck(nc_get_var_ulonglong(groupId, myId,dataValues),__FILE__,__LINE__);
1434 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1436 ncCheck(nc_get_var_string(groupId, myId,dataValues),__FILE__,__LINE__);
1440 ncCheck(nc_get_var(groupId, myId,dataValues),__FILE__,__LINE__);
1448 void NcVar::getVar(
const vector<size_t>& index,
char* datumValue)
const {
1451 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1453 ncCheck(nc_get_var1_text(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1456 void NcVar::getVar(
const vector<size_t>& index,
unsigned char* datumValue)
const {
1459 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1461 ncCheck(nc_get_var1_uchar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1464 void NcVar::getVar(
const vector<size_t>& index,
signed char* datumValue)
const {
1467 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1469 ncCheck(nc_get_var1_schar(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1472 void NcVar::getVar(
const vector<size_t>& index,
short* datumValue)
const {
1475 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1477 ncCheck(nc_get_var1_short(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1480 void NcVar::getVar(
const vector<size_t>& index,
int* datumValue)
const {
1483 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1485 ncCheck(nc_get_var1_int(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1488 void NcVar::getVar(
const vector<size_t>& index,
long* datumValue)
const {
1491 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1493 ncCheck(nc_get_var1_long(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1496 void NcVar::getVar(
const vector<size_t>& index,
float* datumValue)
const {
1499 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1501 ncCheck(nc_get_var1_float(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1504 void NcVar::getVar(
const vector<size_t>& index,
double* datumValue)
const {
1507 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1509 ncCheck(nc_get_var1_double(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1512 void NcVar::getVar(
const vector<size_t>& index,
unsigned short* datumValue)
const {
1515 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1517 ncCheck(nc_get_var1_ushort(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1520 void NcVar::getVar(
const vector<size_t>& index,
unsigned int* datumValue)
const {
1523 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1525 ncCheck(nc_get_var1_uint(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1528 void NcVar::getVar(
const vector<size_t>& index,
long long* datumValue)
const {
1531 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1533 ncCheck(nc_get_var1_longlong(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1536 void NcVar::getVar(
const vector<size_t>& index,
unsigned long long* datumValue)
const {
1539 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1541 ncCheck(nc_get_var1_ulonglong(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1544 void NcVar::getVar(
const vector<size_t>& index,
char** datumValue)
const {
1547 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1549 ncCheck(nc_get_var1_string(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1552 void NcVar::getVar(
const vector<size_t>& index,
void* datumValue)
const {
1553 ncCheck(nc_get_var1(groupId, myId,&index[0],datumValue),__FILE__,__LINE__);
1561 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
char* dataValues)
const {
1564 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1566 ncCheck(nc_get_vara_text(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1569 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned char* dataValues)
const {
1572 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1574 ncCheck(nc_get_vara_uchar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1577 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
signed char* dataValues)
const {
1580 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1582 ncCheck(nc_get_vara_schar(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1585 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
short* dataValues)
const {
1588 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1590 ncCheck(nc_get_vara_short(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1593 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
int* dataValues)
const {
1596 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1598 ncCheck(nc_get_vara_int(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1601 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
long* dataValues)
const {
1604 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1606 ncCheck(nc_get_vara_long(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1609 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
float* dataValues)
const {
1612 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1614 ncCheck(nc_get_vara_float(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1617 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
double* dataValues)
const {
1620 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1622 ncCheck(nc_get_vara_double(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1625 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned short* dataValues)
const {
1628 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1630 ncCheck(nc_get_vara_ushort(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1633 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned int* dataValues)
const {
1636 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1638 ncCheck(nc_get_vara_uint(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1641 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
long long* dataValues)
const {
1644 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1646 ncCheck(nc_get_vara_longlong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1649 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
unsigned long long* dataValues)
const {
1652 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1654 ncCheck(nc_get_vara_ulonglong(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1657 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
char** dataValues)
const {
1660 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1662 ncCheck(nc_get_vara_string(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1665 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
void* dataValues)
const {
1666 ncCheck(nc_get_vara(groupId, myId,&startp[0],&countp[0],dataValues),__FILE__,__LINE__);
1673 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
char* dataValues)
const {
1676 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1678 ncCheck(nc_get_vars_text(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1681 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned char* dataValues)
const {
1684 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1686 ncCheck(nc_get_vars_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1689 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
signed char* dataValues)
const {
1692 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1694 ncCheck(nc_get_vars_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1697 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
short* dataValues)
const {
1700 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1702 ncCheck(nc_get_vars_short(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1705 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
int* dataValues)
const {
1708 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1710 ncCheck(nc_get_vars_int(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1713 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
long* dataValues)
const {
1716 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1718 ncCheck(nc_get_vars_long(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1721 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
float* dataValues)
const {
1724 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1726 ncCheck(nc_get_vars_float(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1729 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
double* dataValues)
const {
1732 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1734 ncCheck(nc_get_vars_double(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1737 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned short* dataValues)
const {
1740 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1742 ncCheck(nc_get_vars_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1745 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned int* dataValues)
const {
1748 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1750 ncCheck(nc_get_vars_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1753 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
long long* dataValues)
const {
1756 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1758 ncCheck(nc_get_vars_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1761 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
unsigned long long* dataValues)
const {
1764 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1766 ncCheck(nc_get_vars_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1769 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
char** dataValues)
const {
1772 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1774 ncCheck(nc_get_vars_string(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1777 void NcVar::getVar(
const vector<size_t>& startp,
const vector<size_t>& countp,
const vector<ptrdiff_t>& stridep,
void* dataValues)
const {
1778 ncCheck(nc_get_vars(groupId, myId,&startp[0],&countp[0],&stridep[0],dataValues),__FILE__,__LINE__);
1785 void 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 {
1788 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1790 ncCheck(nc_get_varm_text(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1793 void 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 {
1796 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1798 ncCheck(nc_get_varm_uchar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1801 void 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 {
1804 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1806 ncCheck(nc_get_varm_schar(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1809 void 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 {
1812 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1814 ncCheck(nc_get_varm_short(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1817 void 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 {
1820 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1822 ncCheck(nc_get_varm_int(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1825 void 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 {
1828 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1830 ncCheck(nc_get_varm_long(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1833 void 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 {
1836 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1838 ncCheck(nc_get_varm_float(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1841 void 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 {
1844 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1846 ncCheck(nc_get_varm_double(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1849 void 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 {
1852 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1854 ncCheck(nc_get_varm_ushort(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1857 void 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 {
1860 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1862 ncCheck(nc_get_varm_uint(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1865 void 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 {
1868 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1870 ncCheck(nc_get_varm_longlong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1873 void 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 {
1876 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1878 ncCheck(nc_get_varm_ulonglong(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1881 void 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 {
1884 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1886 ncCheck(nc_get_varm_string(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
1889 void 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 {
1890 ncCheck(nc_get_varm(groupId, myId,&startp[0],&countp[0],&stridep[0],&imapp[0],dataValues),__FILE__,__LINE__);
int getAttCount() const
Gets the number of attributes.
ChecksumMode
Used for checksum specification (see NcVar::setChecksum, NcVar::getChecksum).
int getDimCount() const
The the number of dimensions.
void getChunkingParameters(ChunkMode &chunkMode, std::vector< size_t > &chunkSizes) const
Gets the chunking parameters.
Base class inherited by NcOpaque, NcVlen, NcCompound and NcEnum classes.
NcUint64 ncUint64
A global instance of the NcUint64 class within the netCDF namespace.
bool operator!=(const NcVar &rhs) const
!= operator
std::string getName() const
Get the attribute name.
int getId() const
Get the variable id.
std::map< std::string, NcVarAtt > getAtts() const
Gets the set of attributes.
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...
NcByte ncByte
A global instance of the NcByte class within the netCDF namespace.
void setCompression(bool enableShuffleFilter, bool enableDeflateFilter, int deflateLevel) const
Sets the compression parameters.
void setChecksum(ChecksumMode checksumMode) const
Sets the checksum parameters of a variable.
EndianMode getEndianness() const
Gets the endianness of the variable.
NcFloat ncFloat
A global instance of the NcFloat class within the netCDF namespace.
Class represents a netCDF group.
std::vector< NcDim > getDims() const
Gets the set of NcDim objects.
NcVarAtt getAtt(const std::string &name) const
Gets attribute by name.
ncType
List of netCDF types that can be represented.
NcUint ncUint
A global instance of the NcUint class within the netCDF namespace.
NcChar ncChar
A global instance of the NcChar class within the netCDF namespace.
void setEndianness(EndianMode endianMode) const
Sets the endianness of the variable.
NcGroup getParentGroup() const
Gets parent group.
NcType getType() const
Returns the variable type.
bool isNull() const
Returns true if this object variable is not defined.
void getVar(void *dataValues) const
This is an overloaded member function, provided for convenience.
void setFill(bool fillMode, void *fillValue=NULL) 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.
nc_type getId() const
The netCDF Id of this type.
NcDouble ncDouble
A global instance of the NcDouble class within the netCDF namespace.
Class represents a netCDF dimension.
Base object is thrown if a netCDF exception is encountered.
Select from contents of current and parents groups.
void ncCheckDataMode(int ncid)
Function checks if the file (group) is in data mode.
bool operator==(const NcVar &rhs) const
equivalence operator
void ncCheck(int retCode, const char *file, int line)
Function checks error code and if necessary throws an exception.
NcShort ncShort
A global instance of the NcShort class within the netCDF namespace.
std::string getName() const
Name of this NcVar object.
void ncCheckDefineMode(int ncid)
Function checks if the file (group) is in define mode.
void putVar(const void *dataValues) const
This is an overloaded member function, provided for convenience.
Class represents a netCDF attribute local to a netCDF variable.
void setChunking(ChunkMode chunkMode, std::vector< size_t > &chunksizes) const
Sets chunking parameters.
void rename(const std::string &newname) const
Rename the variable.
NcString ncString
A global instance of the NcString class within the netCDF namespace.
void getCompressionParameters(bool &shuffleFilterEnabled, bool &deflateFilterEnabled, int &deflateLevel) const
Gets the compression parameters.
Class represents a netCDF variable.
NcVar()
Constructor generates a null object.
void getFillModeParameters(bool &fillMode, void *fillValue=NULL) const
This is an overloaded member function, provided for convenience.
ChunkMode
Used for chunking specifications (see NcVar::setChunking, NcVar::getChunkingParameters).
NcInt ncInt
A global instance of the NcInt class within the netCDF namespace.
ChecksumMode getChecksum() const
Gets the checksum parameters of the variable.
ncType getTypeClass() const
The type class returned as enumeration type.
NcUbyte ncUbyte
A global instance of the NcUbyte class within the netCDF namespace.
NcInt64 ncInt64
A global instance of the NcInt64 class within the netCDF namespace.
EndianMode
Used to specifying the endianess of the data, (see NcVar::setEndianness, NcVar::getEndianness).