9 #include "ncdispatch.h"
36 odom_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];
60 odom_more(
struct GETodometer* odom)
62 return (odom->index[0] < odom->stop[0]);
73 odom_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];
91 NC_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);
136 NC_get_var(
int ncid,
int varid,
void *value,
nc_type memtype)
138 return NC_get_vara(ncid, varid, NC_coord_zero, NULL, value, memtype);
146 NCDEFAULT_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]);
229 #ifdef RELAX_COORD_BOUND
235 if(i == 0 && isrecvar)
236 myedges[i] = numrecs - start[i];
238 myedges[i] = varshape[i] - mystart[i];
240 myedges[i] = edges[i];
241 #ifdef RELAX_COORD_BOUND
245 if(mystart[i] + myedges[i] > dimlen)
247 mystride[i] = (stride == NULL ? 1 : stride[i]);
250 || ((
unsigned long) mystride[i] >= X_INT_MAX))
252 if(mystride[i] != 1) simplestride = 0;
259 return NC_get_vara(ncid, varid, mystart, myedges, value, memtype);
265 odom_init(&odom,rank,mystart,myedges,mystride);
268 while(odom_more(&odom)) {
271 localstatus = NC_get_vara(ncid,varid,odom.index,nc_sizevector1,memptr,memtype);
277 status = localstatus;
279 memptr += memtypelen;
289 NC_get_var1(
int ncid,
int varid,
const size_t *coord,
void* value,
292 return NC_get_vara(ncid, varid, coord, NC_coord_one, value, memtype);
299 NCDEFAULT_get_varm(
int ncid,
int varid,
const size_t *start,
300 const size_t *edges,
const ptrdiff_t *stride,
301 const ptrdiff_t *imapp,
void *value0,
nc_type memtype)
305 int varndims,maxidim;
308 char* value = (
char*)value0;
310 status = NC_check_id (ncid, &ncp);
311 if(status !=
NC_NOERR)
return status;
318 if(status !=
NC_NOERR)
return status;
320 if(vartype > NC_MAX_ATOMIC_TYPE)
324 if(status !=
NC_NOERR)
return status;
335 memtypelen = nctypelen(memtype);
337 maxidim = (int) varndims - 1;
346 size_t edge1[1] = {1};
347 return NC_get_vara(ncid, varid, start, edge1, value, memtype);
356 size_t *mystart = NULL;
368 isrecvar = NC_is_recvar(ncid,varid,&numrecs);
369 NC_getshape(ncid,varid,varndims,varshape);
376 for (idim = 0; idim <= maxidim; ++idim)
378 if (stride[idim] == 0
380 || ((
unsigned long) stride[idim] >= X_INT_MAX))
384 if(stride[idim] != 1) stride1 = 0;
389 if(stride1 && imapp == NULL) {
390 return NC_get_vara(ncid, varid, start, edges, value, memtype);
396 mystart = (
size_t *)calloc((
size_t)(varndims * 7),
sizeof(ptrdiff_t));
398 myedges = mystart + varndims;
399 iocount = myedges + varndims;
400 stop = iocount + varndims;
401 length = stop + varndims;
402 mystride = (ptrdiff_t *)(length + varndims);
403 mymap = mystride + varndims;
408 for (idim = maxidim; idim >= 0; --idim)
411 idim == 0 && isrecvar
415 mystart[idim] = start != NULL
419 #ifdef RELAX_COORD_BOUND
420 if (mystart[idim] > dimlen)
422 if (mystart[idim] >= dimlen)
430 myedges[idim] = edges != NULL
432 : idim == 0 && isrecvar
433 ? numrecs - mystart[idim]
434 : varshape[idim] - mystart[idim];
437 myedges[idim] = edges[idim];
438 else if (idim == 0 && isrecvar)
439 myedges[idim] = numrecs - mystart[idim];
441 myedges[idim] = varshape[idim] - mystart[idim];
444 #ifdef RELAX_COORD_BOUND
445 if (mystart[idim] == dimlen && myedges[idim] > 0)
452 if (mystart[idim] + myedges[idim] > dimlen)
463 for (idim = maxidim; idim >= 0; --idim)
465 if (edges != NULL && edges[idim] == 0)
471 mystride[idim] = stride != NULL
478 mymap[idim] = (imapp != NULL
480 : (idim == maxidim ? 1
481 : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1]));
484 mymap[idim] = imapp[idim];
485 else if (idim == maxidim)
489 mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
492 length[idim] = ((size_t)mymap[idim]) * myedges[idim];
493 stop[idim] = (mystart[idim] + myedges[idim] * (size_t)mystride[idim]);
503 if (mystride[maxidim] == 1
504 && mymap[maxidim] == 1)
506 iocount[maxidim] = myedges[maxidim];
507 mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
508 mymap[maxidim] = (ptrdiff_t) length[maxidim];
517 int lstatus = NC_get_vara(ncid, varid, mystart, iocount,
531 value += (((int)mymap[idim]) * memtypelen);
532 mystart[idim] += (size_t)mystride[idim];
533 if (mystart[idim] == stop[idim])
535 size_t l = (length[idim] * (size_t)memtypelen);
537 mystart[idim] = start[idim];
582 NC_get_vars(
int ncid,
int varid,
const size_t *start,
583 const size_t *edges,
const ptrdiff_t *stride,
void *value,
587 size_t *my_count = (
size_t *)edges;
588 ptrdiff_t *my_stride = (ptrdiff_t *)stride;
591 stat = NC_check_id(ncid, &ncp);
595 if(start == NULL || edges == NULL || stride == NULL) {
596 stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
600 stat = ncp->dispatch->get_vars(ncid,varid,start,my_count,my_stride,
602 if(edges == NULL) free(my_count);
603 if(stride == NULL) free(my_stride);
644 NC_get_varm(
int ncid,
int varid,
const size_t *start,
645 const size_t *edges,
const ptrdiff_t *stride,
const ptrdiff_t* map,
649 size_t *my_count = (
size_t *)edges;
650 ptrdiff_t *my_stride = (ptrdiff_t *)stride;
653 stat = NC_check_id(ncid, &ncp);
657 if(start == NULL || edges == NULL || stride == NULL) {
658 stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
662 stat = ncp->dispatch->get_varm(ncid, varid, start, my_count, my_stride,
663 map, value, memtype);
664 if(edges == NULL) free(my_count);
665 if(stride == NULL) free(my_stride);
751 const size_t *countp,
void *ip)
755 int stat = NC_check_id(ncid, &ncp);
759 return NC_get_vara(ncid, varid, startp, countp, ip, xtype);
764 const size_t *countp,
char *ip)
766 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_CHAR);
771 const size_t *countp,
signed char *ip)
773 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_BYTE);
778 const size_t *countp,
unsigned char *ip)
780 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip, T_uchar);
785 const size_t *countp,
short *ip)
787 return NC_get_vara(ncid, varid, startp, countp, (
void *)ip,
NC_SHORT);
792 const size_t *startp,
const size_t *countp,
int *ip)
794 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_INT);
799 const size_t *startp,
const size_t *countp,
long *ip)
801 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_long);
806 const size_t *startp,
const size_t *countp,
float *ip)
808 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_float);
813 const size_t *countp,
double *ip)
815 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_double);
820 const size_t *startp,
const size_t *countp,
unsigned char *ip)
822 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_ubyte);
827 const size_t *startp,
const size_t *countp,
unsigned short *ip)
829 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_ushort);
834 const size_t *startp,
const size_t *countp,
unsigned int *ip)
836 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_uint);
841 const size_t *startp,
const size_t *countp,
long long *ip)
843 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,T_longlong);
848 const size_t *countp,
unsigned long long *ip)
850 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_UINT64);
856 const size_t *countp,
char* *ip)
858 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_STRING);
902 return NC_get_var1(ncid, varid, indexp, ip,
NC_NAT);
908 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_CHAR);
914 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_BYTE);
920 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
926 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_SHORT);
932 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT);
939 return NC_get_var1(ncid, varid, indexp, (
void *)ip, longtype);
946 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_FLOAT);
953 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_DOUBLE);
960 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
967 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_USHORT);
974 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT);
981 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT64);
986 unsigned long long *ip)
988 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT64);
995 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_STRING);
1047 return NC_get_var(ncid, varid, ip,
NC_NAT);
1053 return NC_get_var(ncid, varid, (
void *)ip,
NC_CHAR);
1059 return NC_get_var(ncid, varid, (
void *)ip,
NC_BYTE);
1065 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1071 return NC_get_var(ncid, varid, (
void *)ip,
NC_SHORT);
1077 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT);
1083 return NC_get_var(ncid,varid, (
void *)ip, longtype);
1089 return NC_get_var(ncid,varid, (
void *)ip,
NC_FLOAT);
1095 return NC_get_var(ncid,varid, (
void *)ip,
NC_DOUBLE);
1101 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1107 return NC_get_var(ncid,varid, (
void *)ip,
NC_USHORT);
1113 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT);
1119 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT64);
1125 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT64);
1132 return NC_get_var(ncid,varid, (
void *)ip,
NC_STRING);
1180 const size_t * countp,
const ptrdiff_t * stridep,
1183 return NC_get_vars(ncid, varid, startp, countp, stridep,
1189 const size_t *countp,
const ptrdiff_t * stridep,
1192 return NC_get_vars(ncid,varid,startp, countp, stridep,
1198 const size_t *countp,
const ptrdiff_t * stridep,
1201 return NC_get_vars(ncid,varid,startp, countp, stridep,
1207 const size_t *countp,
const ptrdiff_t * stridep,
1210 return NC_get_vars(ncid,varid,startp, countp, stridep,
1211 (
void *)ip, T_uchar);
1216 const size_t *countp,
const ptrdiff_t *stridep,
1219 return NC_get_vars(ncid,varid,startp, countp, stridep,
1225 const size_t *countp,
const ptrdiff_t * stridep,
1228 return NC_get_vars(ncid,varid,startp, countp, stridep,
1234 const size_t *countp,
const ptrdiff_t * stridep,
1237 return NC_get_vars(ncid,varid,startp, countp, stridep,
1238 (
void *)ip, T_long);
1243 const size_t *countp,
const ptrdiff_t * stridep,
1246 return NC_get_vars(ncid,varid,startp, countp, stridep,
1247 (
void *)ip, T_float);
1252 const size_t *countp,
const ptrdiff_t * stridep,
1255 return NC_get_vars(ncid,varid,startp, countp, stridep,
1256 (
void *)ip, T_double);
1261 const size_t *countp,
const ptrdiff_t * stridep,
1264 return NC_get_vars(ncid,varid, startp, countp, stridep,
1265 (
void *)ip, T_ubyte);
1270 const size_t *countp,
const ptrdiff_t * stridep,
1273 return NC_get_vars(ncid,varid,startp,countp, stridep,
1274 (
void *)ip, T_ushort);
1279 const size_t *countp,
const ptrdiff_t * stridep,
1282 return NC_get_vars(ncid,varid,startp, countp, stridep,
1283 (
void *)ip, T_uint);
1288 const size_t *countp,
const ptrdiff_t * stridep,
1291 return NC_get_vars(ncid, varid, startp, countp, stridep,
1292 (
void *)ip, T_longlong);
1297 const size_t *countp,
const ptrdiff_t * stridep,
1298 unsigned long long *ip)
1300 return NC_get_vars(ncid, varid, startp, countp, stridep,
1307 const size_t *startp,
const size_t *countp,
1308 const ptrdiff_t * stridep,
1311 return NC_get_vars(ncid, varid, startp, countp, stridep,
1375 const size_t * countp,
const ptrdiff_t * stridep,
1376 const ptrdiff_t * imapp,
void *ip)
1378 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp, ip,
NC_NAT);
1383 const size_t *startp,
const size_t *countp,
1384 const ptrdiff_t *stridep,
1385 const ptrdiff_t *imapp,
signed char *ip)
1387 return NC_get_varm(ncid, varid, startp, countp,
1388 stridep, imapp, (
void *)ip,
NC_BYTE);
1393 const size_t *startp,
const size_t *countp,
1394 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1397 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_uchar);
1402 const size_t *countp,
const ptrdiff_t *stridep,
1403 const ptrdiff_t *imapp,
short *ip)
1405 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_SHORT);
1410 const size_t *startp,
const size_t *countp,
1411 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1414 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_INT);
1419 const size_t *startp,
const size_t *countp,
1420 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1423 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_long);
1428 const size_t *startp,
const size_t *countp,
1429 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1432 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_float);
1437 const size_t *startp,
const size_t *countp,
1438 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1441 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_double);
1446 const size_t *startp,
const size_t *countp,
1447 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1450 return NC_get_varm(ncid,varid,startp,countp,stridep,
1451 imapp, (
void *)ip, T_ubyte);
1456 const size_t *startp,
const size_t *countp,
1457 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1460 return NC_get_varm(ncid, varid, startp, countp, stridep,
1461 imapp, (
void *)ip, T_ushort);
1466 const size_t *startp,
const size_t *countp,
1467 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1470 return NC_get_varm(ncid, varid, startp, countp,
1471 stridep, imapp, (
void *)ip, T_uint);
1476 const size_t *countp,
const ptrdiff_t *stridep,
1477 const ptrdiff_t *imapp,
long long *ip)
1479 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1480 (
void *)ip, T_longlong);
1485 const size_t *startp,
const size_t *countp,
1486 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1487 unsigned long long *ip)
1489 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1495 const size_t *countp,
const ptrdiff_t *stridep,
1496 const ptrdiff_t *imapp,
char *ip)
1498 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1505 const size_t *countp,
const ptrdiff_t *stridep,
1506 const ptrdiff_t *imapp,
char **ip)
1508 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
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_var_uint(int ncid, int varid, unsigned int *ip)
Read an entire variable in one call.
int nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
Read a single datum from a variable.
#define NC_ENOMEM
Memory allocation (malloc) failure.
int nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
Read an entire variable in one call.
#define NC_CHAR
ISO/ASCII character.
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_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_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_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.
#define NC_UBYTE
unsigned 1 byte int
#define NC_EMAPTYPE
Mapped access for atomic types only.
#define NC_ERANGE
Math result not representable.
#define NC_MAX_VAR_DIMS
max per variable dimensions
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_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_string(int ncid, int varid, const size_t *indexp, char **ip)
Read a single datum from a variable.
#define NC_UINT
unsigned 4-byte int
int nc_get_var_long(int ncid, int varid, long *ip)
Read an entire variable in one call.
#define NC_EINVALCOORDS
Index exceeds dimension bound.
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.
#define NC_INT64
signed 8-byte int
#define NC_DOUBLE
double precision floating point number
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.
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
Learn how many dimensions are associated with a variable.
int nc_get_var_schar(int ncid, int varid, signed char *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_type
The nc_type type is just an int.
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.
#define NC_BYTE
signed 1 byte integer
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_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_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_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_var(int ncid, int varid, void *ip)
Read an entire variable in one call.
int nc_get_var_int(int ncid, int varid, 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_ushort(int ncid, int varid, unsigned short *ip)
Read an entire variable in one call.
int nc_get_var_double(int ncid, int varid, double *ip)
Read an entire variable in one call.
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_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_var_string(int ncid, int varid, char **ip)
Read an entire variable in one call.
#define NC_EBADTYPE
Not a netcdf data type.
#define NC_EEDGE
Start+count exceeds dimension bound.
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_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
int nc_get_var1(int ncid, int varid, const size_t *indexp, void *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.
#define NC_ESTRIDE
Illegal stride.
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_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, long long *ip)
Read an array of values from a variable.
#define NC_INT
signed 4 byte integer
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_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_text(int ncid, int varid, char *ip)
Read an entire variable in one call.
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_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_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_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_var1_float(int ncid, int varid, const size_t *indexp, float *ip)
Read a single datum 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.
#define NC_NAT
Not A Type.
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.
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
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.
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
#define NC_USHORT
unsigned 2-byte int
int nc_get_var_ubyte(int ncid, int varid, unsigned char *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_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_ushort(int ncid, int varid, const size_t *indexp, unsigned short *ip)
Read a single datum from 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_var1_schar(int ncid, int varid, const size_t *indexp, signed char *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_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_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_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_var_float(int ncid, int varid, float *ip)
Read an entire variable in one call.
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_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.
int nc_get_var_short(int ncid, int varid, short *ip)
Read an entire variable in one call.
#define NC_SHORT
signed 2 byte integer
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_var1_double(int ncid, int varid, const size_t *indexp, double *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.
#define NC_NOERR
No Error.
#define NC_ECHAR
Attempt to convert between text & numbers.
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_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_int(int ncid, int varid, const size_t *indexp, int *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.
#define NC_FLOAT
single precision floating point number
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_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_vara(int ncid, int varid, const size_t *startp, const size_t *countp, void *ip)
Read an array of values from a variable.
#define NC_UINT64
unsigned 8-byte int
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.
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_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_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_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.