36odom_init(
struct GETodometer* odom,
int rank,
const size_t* start,
37 const size_t* edges,
const ptrdiff_t* stride)
40 memset(odom,0,
sizeof(
struct GETodometer));
43 for(i=0;i<odom->rank;i++) {
44 odom->start[i] = (start != NULL ? start[i] : 0);
45 odom->edges[i] = (edges != NULL ? edges[i] : 1);
46 odom->stride[i] = (stride != NULL ? stride[i] : 1);
47 odom->stop[i] = odom->start[i] + (odom->edges[i]*((size_t)odom->stride[i]));
48 odom->index[i] = odom->start[i];
60odom_more(
struct GETodometer* odom)
62 return (odom->index[0] < odom->stop[0]);
73odom_next(
struct GETodometer* odom)
76 if(odom->rank == 0)
return 0;
77 for(i=odom->rank-1;i>=0;i--) {
78 odom->index[i] += (size_t)odom->stride[i];
79 if(odom->index[i] < odom->stop[i])
break;
81 odom->index[i] = odom->start[i];
91NC_get_vara(
int ncid,
int varid,
92 const size_t *start,
const size_t *edges,
96 size_t *my_count = (
size_t *)edges;
97 int stat = NC_check_id(ncid, &ncp);
100 if(start == NULL || edges == NULL) {
101 stat = NC_check_nulls(ncid, varid, start, &my_count, NULL);
104 stat = ncp->dispatch->get_vara(ncid,varid,start,my_count,value,memtype);
105 if(edges == NULL) free(my_count);
136NC_get_var(
int ncid,
int varid,
void *value,
nc_type memtype)
138 return NC_get_vara(ncid, varid, NC_coord_zero, NULL, value, memtype);
146NCDEFAULT_get_vars(
int ncid,
int varid,
const size_t * start,
147 const size_t * edges,
const ptrdiff_t * stride,
153 int i,simplestride,isrecvar;
155 struct GETodometer odom;
161 char* value = (
char*)value0;
169 status = NC_check_id (ncid, &ncp);
170 if(status !=
NC_NOERR)
return status;
173 if(status !=
NC_NOERR)
return status;
175 if(memtype ==
NC_NAT) memtype = vartype;
178 status =
nc_inq_type(ncid,vartype,NULL,&vartypelen);
179 if(status !=
NC_NOERR)
return status;
181 if(memtype > NC_MAX_ATOMIC_TYPE)
182 memtypelen = (int)vartypelen;
184 memtypelen = nctypelen(memtype);
187 if(vartype != memtype) {
189 if(vartype > NC_MAX_ATOMIC_TYPE
190 || memtype > NC_MAX_ATOMIC_TYPE)
199 if(status !=
NC_NOERR)
return status;
202 if(rank > 0 && start == NULL)
206 isrecvar = NC_is_recvar(ncid,varid,&numrecs);
207 NC_getshape(ncid,varid,rank,varshape);
216 size_t edge1[1] = {1};
217 return NC_get_vara(ncid, varid, start, edge1, value, memtype);
223 for(i=0;i<rank;i++) {
225 mystart[i] = (start == NULL ? 0 : start[i]);
227 dimlen = (i == 0 && isrecvar ? numrecs : varshape[i]);
232 if(i == 0 && isrecvar)
233 myedges[i] = numrecs - start[i];
235 myedges[i] = varshape[i] - mystart[i];
237 myedges[i] = edges[i];
242 if(mystart[i] + myedges[i] > dimlen)
244 mystride[i] = (stride == NULL ? 1 : stride[i]);
247 || ((
unsigned long) mystride[i] >= X_INT_MAX))
249 if(mystride[i] != 1) simplestride = 0;
256 return NC_get_vara(ncid, varid, mystart, myedges, value, memtype);
262 odom_init(&odom,rank,mystart,myedges,mystride);
265 while(odom_more(&odom)) {
268 localstatus = NC_get_vara(ncid,varid,odom.index,NC_coord_one,memptr,memtype);
274 status = localstatus;
276 memptr += memtypelen;
286NC_get_var1(
int ncid,
int varid,
const size_t *coord,
void* value,
289 return NC_get_vara(ncid, varid, coord, NC_coord_one, value, memtype);
296NCDEFAULT_get_varm(
int ncid,
int varid,
const size_t *start,
297 const size_t *edges,
const ptrdiff_t *stride,
298 const ptrdiff_t *imapp,
void *value0,
nc_type memtype)
302 int varndims,maxidim;
305 char* value = (
char*)value0;
307 status = NC_check_id (ncid, &ncp);
308 if(status !=
NC_NOERR)
return status;
315 if(status !=
NC_NOERR)
return status;
317 if(vartype > NC_MAX_ATOMIC_TYPE)
321 if(status !=
NC_NOERR)
return status;
332 memtypelen = nctypelen(memtype);
334 maxidim = (int) varndims - 1;
343 size_t edge1[1] = {1};
344 return NC_get_vara(ncid, varid, start, edge1, value, memtype);
353 size_t *mystart = NULL;
365 isrecvar = NC_is_recvar(ncid,varid,&numrecs);
366 NC_getshape(ncid,varid,varndims,varshape);
373 for (idim = 0; idim <= maxidim; ++idim)
375 if (stride[idim] == 0
377 || ((
unsigned long) stride[idim] >= X_INT_MAX))
381 if(stride[idim] != 1) stride1 = 0;
386 if(stride1 && imapp == NULL) {
387 return NC_get_vara(ncid, varid, start, edges, value, memtype);
393 mystart = (
size_t *)calloc((
size_t)(varndims * 7),
sizeof(ptrdiff_t));
395 myedges = mystart + varndims;
396 iocount = myedges + varndims;
397 stop = iocount + varndims;
398 length = stop + varndims;
399 mystride = (ptrdiff_t *)(length + varndims);
400 mymap = mystride + varndims;
405 for (idim = maxidim; idim >= 0; --idim)
408 idim == 0 && isrecvar
412 mystart[idim] = start != NULL
416 if (mystart[idim] > dimlen)
423 myedges[idim] = edges != NULL
425 : idim == 0 && isrecvar
426 ? numrecs - mystart[idim]
427 : varshape[idim] - mystart[idim];
430 myedges[idim] = edges[idim];
431 else if (idim == 0 && isrecvar)
432 myedges[idim] = numrecs - mystart[idim];
434 myedges[idim] = varshape[idim] - mystart[idim];
437 if (mystart[idim] == dimlen && myedges[idim] > 0)
443 if (mystart[idim] + myedges[idim] > dimlen)
454 for (idim = maxidim; idim >= 0; --idim)
456 if (edges != NULL && edges[idim] == 0)
462 mystride[idim] = stride != NULL
469 mymap[idim] = (imapp != NULL
471 : (idim == maxidim ? 1
472 : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1]));
475 mymap[idim] = imapp[idim];
476 else if (idim == maxidim)
480 mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
483 length[idim] = ((size_t)mymap[idim]) * myedges[idim];
484 stop[idim] = (mystart[idim] + myedges[idim] * (size_t)mystride[idim]);
494 if (mystride[maxidim] == 1
495 && mymap[maxidim] == 1)
497 iocount[maxidim] = myedges[maxidim];
498 mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
499 mymap[maxidim] = (ptrdiff_t) length[maxidim];
508 int lstatus = NC_get_vara(ncid, varid, mystart, iocount,
522 value += (((int)mymap[idim]) * memtypelen);
523 mystart[idim] += (size_t)mystride[idim];
524 if (mystart[idim] == stop[idim])
526 size_t l = (length[idim] * (size_t)memtypelen);
528 mystart[idim] = start[idim];
576NC_get_vars(
int ncid,
int varid,
const size_t *start,
577 const size_t *edges,
const ptrdiff_t *stride,
void *value,
581 size_t *my_count = (
size_t *)edges;
582 ptrdiff_t *my_stride = (ptrdiff_t *)stride;
585 stat = NC_check_id(ncid, &ncp);
589 if(start == NULL || edges == NULL || stride == NULL) {
590 stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
594 stat = ncp->dispatch->get_vars(ncid,varid,start,my_count,my_stride,
596 if(edges == NULL) free(my_count);
597 if(stride == NULL) free(my_stride);
638NC_get_varm(
int ncid,
int varid,
const size_t *start,
639 const size_t *edges,
const ptrdiff_t *stride,
const ptrdiff_t* map,
643 size_t *my_count = (
size_t *)edges;
644 ptrdiff_t *my_stride = (ptrdiff_t *)stride;
647 stat = NC_check_id(ncid, &ncp);
651 if(start == NULL || edges == NULL || stride == NULL) {
652 stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
656 stat = ncp->dispatch->get_varm(ncid, varid, start, my_count, my_stride,
657 map, value, memtype);
658 if(edges == NULL) free(my_count);
659 if(stride == NULL) free(my_stride);
747 const size_t *countp,
void *ip)
751 int stat = NC_check_id(ncid, &ncp);
755 return NC_get_vara(ncid, varid, startp, countp, ip, xtype);
760 const size_t *countp,
char *ip)
762 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_CHAR);
767 const size_t *countp,
signed char *ip)
769 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_BYTE);
774 const size_t *countp,
unsigned char *ip)
776 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip, T_uchar);
781 const size_t *countp,
short *ip)
783 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_SHORT);
788 const size_t *startp,
const size_t *countp,
int *ip)
790 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_INT);
795 const size_t *startp,
const size_t *countp,
long *ip)
797 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_long);
802 const size_t *startp,
const size_t *countp,
float *ip)
804 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_float);
809 const size_t *countp,
double *ip)
811 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_double);
816 const size_t *startp,
const size_t *countp,
unsigned char *ip)
818 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_ubyte);
823 const size_t *startp,
const size_t *countp,
unsigned short *ip)
825 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_ushort);
830 const size_t *startp,
const size_t *countp,
unsigned int *ip)
832 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_uint);
837 const size_t *startp,
const size_t *countp,
long long *ip)
839 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_longlong);
844 const size_t *countp,
unsigned long long *ip)
846 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_UINT64);
851 const size_t *countp,
char* *ip)
853 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_STRING);
896 return NC_get_var1(ncid, varid, indexp, ip,
NC_NAT);
902 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_CHAR);
908 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_BYTE);
914 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
920 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_SHORT);
926 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT);
933 return NC_get_var1(ncid, varid, indexp, (
void *)ip, longtype);
940 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_FLOAT);
947 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_DOUBLE);
954 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
961 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_USHORT);
968 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT);
975 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT64);
980 unsigned long long *ip)
982 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT64);
988 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_STRING);
1040 return NC_get_var(ncid, varid, ip,
NC_NAT);
1046 return NC_get_var(ncid, varid, (
void *)ip,
NC_CHAR);
1052 return NC_get_var(ncid, varid, (
void *)ip,
NC_BYTE);
1058 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1064 return NC_get_var(ncid, varid, (
void *)ip,
NC_SHORT);
1070 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT);
1076 return NC_get_var(ncid,varid, (
void *)ip, longtype);
1082 return NC_get_var(ncid,varid, (
void *)ip,
NC_FLOAT);
1088 return NC_get_var(ncid,varid, (
void *)ip,
NC_DOUBLE);
1094 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1100 return NC_get_var(ncid,varid, (
void *)ip,
NC_USHORT);
1106 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT);
1112 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT64);
1118 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT64);
1124 return NC_get_var(ncid,varid, (
void *)ip,
NC_STRING);
1174 const size_t * countp,
const ptrdiff_t * stridep,
1177 return NC_get_vars(ncid, varid, startp, countp, stridep,
1183 const size_t *countp,
const ptrdiff_t * stridep,
1186 return NC_get_vars(ncid,varid,startp, countp, stridep,
1192 const size_t *countp,
const ptrdiff_t * stridep,
1195 return NC_get_vars(ncid,varid,startp, countp, stridep,
1201 const size_t *countp,
const ptrdiff_t * stridep,
1204 return NC_get_vars(ncid,varid,startp, countp, stridep,
1205 (
void *)ip, T_uchar);
1210 const size_t *countp,
const ptrdiff_t *stridep,
1213 return NC_get_vars(ncid,varid,startp, countp, stridep,
1219 const size_t *countp,
const ptrdiff_t * stridep,
1222 return NC_get_vars(ncid,varid,startp, countp, stridep,
1228 const size_t *countp,
const ptrdiff_t * stridep,
1231 return NC_get_vars(ncid,varid,startp, countp, stridep,
1232 (
void *)ip, T_long);
1237 const size_t *countp,
const ptrdiff_t * stridep,
1240 return NC_get_vars(ncid,varid,startp, countp, stridep,
1241 (
void *)ip, T_float);
1246 const size_t *countp,
const ptrdiff_t * stridep,
1249 return NC_get_vars(ncid,varid,startp, countp, stridep,
1250 (
void *)ip, T_double);
1255 const size_t *countp,
const ptrdiff_t * stridep,
1258 return NC_get_vars(ncid,varid, startp, countp, stridep,
1259 (
void *)ip, T_ubyte);
1264 const size_t *countp,
const ptrdiff_t * stridep,
1267 return NC_get_vars(ncid,varid,startp,countp, stridep,
1268 (
void *)ip, T_ushort);
1273 const size_t *countp,
const ptrdiff_t * stridep,
1276 return NC_get_vars(ncid,varid,startp, countp, stridep,
1277 (
void *)ip, T_uint);
1282 const size_t *countp,
const ptrdiff_t * stridep,
1285 return NC_get_vars(ncid, varid, startp, countp, stridep,
1286 (
void *)ip, T_longlong);
1291 const size_t *countp,
const ptrdiff_t * stridep,
1292 unsigned long long *ip)
1294 return NC_get_vars(ncid, varid, startp, countp, stridep,
1300 const size_t *startp,
const size_t *countp,
1301 const ptrdiff_t * stridep,
1304 return NC_get_vars(ncid, varid, startp, countp, stridep,
1371 const size_t * countp,
const ptrdiff_t * stridep,
1372 const ptrdiff_t * imapp,
void *ip)
1374 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp, ip,
NC_NAT);
1379 const size_t *startp,
const size_t *countp,
1380 const ptrdiff_t *stridep,
1381 const ptrdiff_t *imapp,
signed char *ip)
1383 return NC_get_varm(ncid, varid, startp, countp,
1384 stridep, imapp, (
void *)ip,
NC_BYTE);
1389 const size_t *startp,
const size_t *countp,
1390 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1393 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_uchar);
1398 const size_t *countp,
const ptrdiff_t *stridep,
1399 const ptrdiff_t *imapp,
short *ip)
1401 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_SHORT);
1406 const size_t *startp,
const size_t *countp,
1407 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1410 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_INT);
1415 const size_t *startp,
const size_t *countp,
1416 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1419 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_long);
1424 const size_t *startp,
const size_t *countp,
1425 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1428 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_float);
1433 const size_t *startp,
const size_t *countp,
1434 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1437 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_double);
1442 const size_t *startp,
const size_t *countp,
1443 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1446 return NC_get_varm(ncid,varid,startp,countp,stridep,
1447 imapp, (
void *)ip, T_ubyte);
1452 const size_t *startp,
const size_t *countp,
1453 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1456 return NC_get_varm(ncid, varid, startp, countp, stridep,
1457 imapp, (
void *)ip, T_ushort);
1462 const size_t *startp,
const size_t *countp,
1463 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1466 return NC_get_varm(ncid, varid, startp, countp,
1467 stridep, imapp, (
void *)ip, T_uint);
1472 const size_t *countp,
const ptrdiff_t *stridep,
1473 const ptrdiff_t *imapp,
long long *ip)
1475 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1476 (
void *)ip, T_longlong);
1481 const size_t *startp,
const size_t *countp,
1482 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1483 unsigned long long *ip)
1485 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1491 const size_t *countp,
const ptrdiff_t *stridep,
1492 const ptrdiff_t *imapp,
char *ip)
1494 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1500 const size_t *countp,
const ptrdiff_t *stridep,
1501 const ptrdiff_t *imapp,
char **ip)
1503 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
Learn how many dimensions are associated with a variable.
int nc_get_vara_float(int ncid, int varid, const size_t *startp, const size_t *countp, float *ip)
Read an array of values from a variable.
int nc_get_vars_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, char *ip)
Read a strided array from a variable.
int nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, long long *ip)
Read a single datum from a variable.
int nc_get_varm_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, double *ip)
Read a mapped array from a variable.
int nc_get_var_schar(int ncid, int varid, signed char *ip)
Read an entire variable in one call.
int nc_get_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, void *ip)
Read a strided array from a variable.
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
int nc_get_varm_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, char *ip)
Read a mapped array from a variable.
int nc_get_vara_text(int ncid, int varid, const size_t *startp, const size_t *countp, char *ip)
Read an array of values from a variable.
int nc_get_var1_short(int ncid, int varid, const size_t *indexp, short *ip)
Read a single datum from a variable.
int nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, unsigned short *ip)
Read a single datum from a variable.
int nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
int nc_get_vars_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, int *ip)
Read a strided array from a variable.
int nc_get_varm_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, long *ip)
Read a mapped array from a variable.
int nc_get_var1_uint(int ncid, int varid, const size_t *indexp, unsigned int *ip)
Read a single datum from a variable.
int nc_get_vara_double(int ncid, int varid, const size_t *startp, const size_t *countp, double *ip)
Read an array of values from a variable.
int nc_get_vars_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned char *ip)
Read a strided array from a variable.
int nc_get_var_long(int ncid, int varid, long *ip)
Read an entire variable in one call.
int nc_get_var1_string(int ncid, int varid, const size_t *indexp, char **ip)
Read a single datum from a variable.
int nc_get_varm_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned char *ip)
Read a mapped array from a variable.
int nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
int nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
int nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
Read an entire variable in one call.
int nc_get_vara_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned char *ip)
Read an array of values from a variable.
int nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned long long *ip)
Read a strided array from a variable.
int nc_get_vara(int ncid, int varid, const size_t *startp, const size_t *countp, void *ip)
Read an array of values from a variable.
int nc_get_varm_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, short *ip)
Read a mapped array from a variable.
int nc_get_vars_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, long long *ip)
Read a strided array from a variable.
int nc_get_vars_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned char *ip)
Read a strided array from a variable.
int nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, unsigned long long *ip)
Read a single datum from a variable.
int nc_get_vars_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, signed char *ip)
Read a strided array from a variable.
int nc_get_vara_string(int ncid, int varid, const size_t *startp, const size_t *countp, char **ip)
Read an array of values from a variable.
int nc_get_vars_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned short *ip)
Read a strided array from a variable.
int nc_get_var(int ncid, int varid, void *ip)
Read an entire variable in one call.
int nc_get_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, void *ip)
Read a mapped array from a variable.
int nc_get_varm_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, long long *ip)
Read a mapped array from a variable.
int nc_get_vara_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned short *ip)
Read an array of values from a variable.
int nc_get_varm_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned char *ip)
Read a mapped array from a variable.
int nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip)
Read a single datum from a variable.
int nc_get_varm_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned short *ip)
Read a mapped array from a variable.
int nc_get_varm_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, signed char *ip)
Read a mapped array from a variable.
int nc_get_varm_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned long long *ip)
Read a mapped array from a variable.
int nc_get_var_double(int ncid, int varid, double *ip)
Read an entire variable in one call.
int nc_get_vara_schar(int ncid, int varid, const size_t *startp, const size_t *countp, signed char *ip)
Read an array of values from a variable.
int nc_get_vars_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, short *ip)
Read a strided array from a variable.
int nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
Read a single datum from a variable.
int nc_get_var_text(int ncid, int varid, char *ip)
Read an entire variable in one call.
int nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip)
Read a single datum from a variable.
int nc_get_vara_int(int ncid, int varid, const size_t *startp, const size_t *countp, int *ip)
Read an array of values from a variable.
int nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
Read an entire variable in one call.
int nc_get_vars_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, float *ip)
Read a strided array from a variable.
int nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip)
Read a single datum from a variable.
int nc_get_vars_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, unsigned int *ip)
Read a strided array from a variable.
int nc_get_var_uint(int ncid, int varid, unsigned int *ip)
Read an entire variable in one call.
int nc_get_vara_short(int ncid, int varid, const size_t *startp, const size_t *countp, short *ip)
Read an array of values from a variable.
int nc_get_var_short(int ncid, int varid, short *ip)
Read an entire variable in one call.
int nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
Read a single datum from a variable.
int nc_get_varm_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, float *ip)
Read a mapped array from a variable.
int nc_get_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, double *ip)
Read a strided array from a variable.
int nc_get_varm_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, int *ip)
Read a mapped array from a variable.
int nc_get_var_float(int ncid, int varid, float *ip)
Read an entire variable in one call.
int nc_get_var_longlong(int ncid, int varid, long long *ip)
Read an entire variable in one call.
int nc_get_varm_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, unsigned int *ip)
Read a mapped array from a variable.
int nc_get_vara_uint(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned int *ip)
Read an array of values from a variable.
int nc_get_vara_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, long long *ip)
Read an array of values from a variable.
int nc_get_var_int(int ncid, int varid, int *ip)
Read an entire variable in one call.
int nc_get_var_string(int ncid, int varid, char **ip)
Read an entire variable in one call.
int nc_get_vars_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, char **ip)
Read a strided array from a variable.
int nc_get_vara_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned char *ip)
Read an array of values from a variable.
int nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, unsigned long long *ip)
Read an array of values from a variable.
int nc_get_vars_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, long *ip)
Read a strided array from a variable.
int nc_get_var1_schar(int ncid, int varid, const size_t *indexp, signed char *ip)
Read a single datum from a variable.
int nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
int nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip)
Read a single datum from a variable.
int nc_get_varm_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, char **ip)
Read a mapped array from a variable.
int nc_get_vara_long(int ncid, int varid, const size_t *startp, const size_t *countp, long *ip)
Read an array of values from a variable.
#define NC_ECHAR
Attempt to convert between text & numbers.
#define NC_EBADTYPE
Not a netcdf data type.
#define NC_UINT
unsigned 4-byte int
#define NC_INT
signed 4 byte integer
#define NC_MAX_VAR_DIMS
max per variable dimensions
#define NC_BYTE
signed 1 byte integer
#define NC_NAT
Not A Type.
#define NC_EEDGE
Start+count exceeds dimension bound.
#define NC_DOUBLE
double precision floating point number
#define NC_UBYTE
unsigned 1 byte int
#define NC_FLOAT
single precision floating point number
#define NC_ENOMEM
Memory allocation (malloc) failure.
#define NC_SHORT
signed 2 byte integer
#define NC_EINVALCOORDS
Index exceeds dimension bound.
#define NC_INT64
signed 8-byte int
#define NC_UINT64
unsigned 8-byte int
#define NC_NOERR
No Error.
#define NC_USHORT
unsigned 2-byte int
#define NC_EMAPTYPE
Mapped access for atomic types only.
#define NC_ESTRIDE
Illegal stride.
#define NC_CHAR
ISO/ASCII character.
#define NC_ERANGE
Math result not representable.
int nc_type
The nc_type type is just an int.