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_coord_one,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);
855 const size_t *countp,
char* *ip)
857 return NC_get_vara(ncid,varid,startp,countp, (
void *)ip,
NC_STRING);
900 return NC_get_var1(ncid, varid, indexp, ip,
NC_NAT);
906 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_CHAR);
912 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_BYTE);
918 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
924 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_SHORT);
930 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT);
937 return NC_get_var1(ncid, varid, indexp, (
void *)ip, longtype);
944 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_FLOAT);
951 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_DOUBLE);
958 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UBYTE);
965 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_USHORT);
972 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT);
979 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_INT64);
984 unsigned long long *ip)
986 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_UINT64);
992 return NC_get_var1(ncid, varid, indexp, (
void *)ip,
NC_STRING);
1044 return NC_get_var(ncid, varid, ip,
NC_NAT);
1050 return NC_get_var(ncid, varid, (
void *)ip,
NC_CHAR);
1056 return NC_get_var(ncid, varid, (
void *)ip,
NC_BYTE);
1062 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1068 return NC_get_var(ncid, varid, (
void *)ip,
NC_SHORT);
1074 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT);
1080 return NC_get_var(ncid,varid, (
void *)ip, longtype);
1086 return NC_get_var(ncid,varid, (
void *)ip,
NC_FLOAT);
1092 return NC_get_var(ncid,varid, (
void *)ip,
NC_DOUBLE);
1098 return NC_get_var(ncid,varid, (
void *)ip,
NC_UBYTE);
1104 return NC_get_var(ncid,varid, (
void *)ip,
NC_USHORT);
1110 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT);
1116 return NC_get_var(ncid,varid, (
void *)ip,
NC_INT64);
1122 return NC_get_var(ncid,varid, (
void *)ip,
NC_UINT64);
1128 return NC_get_var(ncid,varid, (
void *)ip,
NC_STRING);
1175 const size_t * countp,
const ptrdiff_t * stridep,
1178 return NC_get_vars(ncid, varid, startp, countp, stridep,
1184 const size_t *countp,
const ptrdiff_t * stridep,
1187 return NC_get_vars(ncid,varid,startp, countp, stridep,
1193 const size_t *countp,
const ptrdiff_t * stridep,
1196 return NC_get_vars(ncid,varid,startp, countp, stridep,
1202 const size_t *countp,
const ptrdiff_t * stridep,
1205 return NC_get_vars(ncid,varid,startp, countp, stridep,
1206 (
void *)ip, T_uchar);
1211 const size_t *countp,
const ptrdiff_t *stridep,
1214 return NC_get_vars(ncid,varid,startp, countp, stridep,
1220 const size_t *countp,
const ptrdiff_t * stridep,
1223 return NC_get_vars(ncid,varid,startp, countp, stridep,
1229 const size_t *countp,
const ptrdiff_t * stridep,
1232 return NC_get_vars(ncid,varid,startp, countp, stridep,
1233 (
void *)ip, T_long);
1238 const size_t *countp,
const ptrdiff_t * stridep,
1241 return NC_get_vars(ncid,varid,startp, countp, stridep,
1242 (
void *)ip, T_float);
1247 const size_t *countp,
const ptrdiff_t * stridep,
1250 return NC_get_vars(ncid,varid,startp, countp, stridep,
1251 (
void *)ip, T_double);
1256 const size_t *countp,
const ptrdiff_t * stridep,
1259 return NC_get_vars(ncid,varid, startp, countp, stridep,
1260 (
void *)ip, T_ubyte);
1265 const size_t *countp,
const ptrdiff_t * stridep,
1268 return NC_get_vars(ncid,varid,startp,countp, stridep,
1269 (
void *)ip, T_ushort);
1274 const size_t *countp,
const ptrdiff_t * stridep,
1277 return NC_get_vars(ncid,varid,startp, countp, stridep,
1278 (
void *)ip, T_uint);
1283 const size_t *countp,
const ptrdiff_t * stridep,
1286 return NC_get_vars(ncid, varid, startp, countp, stridep,
1287 (
void *)ip, T_longlong);
1292 const size_t *countp,
const ptrdiff_t * stridep,
1293 unsigned long long *ip)
1295 return NC_get_vars(ncid, varid, startp, countp, stridep,
1301 const size_t *startp,
const size_t *countp,
1302 const ptrdiff_t * stridep,
1305 return NC_get_vars(ncid, varid, startp, countp, stridep,
1369 const size_t * countp,
const ptrdiff_t * stridep,
1370 const ptrdiff_t * imapp,
void *ip)
1372 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp, ip,
NC_NAT);
1377 const size_t *startp,
const size_t *countp,
1378 const ptrdiff_t *stridep,
1379 const ptrdiff_t *imapp,
signed char *ip)
1381 return NC_get_varm(ncid, varid, startp, countp,
1382 stridep, imapp, (
void *)ip,
NC_BYTE);
1387 const size_t *startp,
const size_t *countp,
1388 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1391 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_uchar);
1396 const size_t *countp,
const ptrdiff_t *stridep,
1397 const ptrdiff_t *imapp,
short *ip)
1399 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_SHORT);
1404 const size_t *startp,
const size_t *countp,
1405 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1408 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,
NC_INT);
1413 const size_t *startp,
const size_t *countp,
1414 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1417 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_long);
1422 const size_t *startp,
const size_t *countp,
1423 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1426 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_float);
1431 const size_t *startp,
const size_t *countp,
1432 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1435 return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (
void *)ip,T_double);
1440 const size_t *startp,
const size_t *countp,
1441 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1444 return NC_get_varm(ncid,varid,startp,countp,stridep,
1445 imapp, (
void *)ip, T_ubyte);
1450 const size_t *startp,
const size_t *countp,
1451 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1454 return NC_get_varm(ncid, varid, startp, countp, stridep,
1455 imapp, (
void *)ip, T_ushort);
1460 const size_t *startp,
const size_t *countp,
1461 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1464 return NC_get_varm(ncid, varid, startp, countp,
1465 stridep, imapp, (
void *)ip, T_uint);
1470 const size_t *countp,
const ptrdiff_t *stridep,
1471 const ptrdiff_t *imapp,
long long *ip)
1473 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1474 (
void *)ip, T_longlong);
1479 const size_t *startp,
const size_t *countp,
1480 const ptrdiff_t *stridep,
const ptrdiff_t *imapp,
1481 unsigned long long *ip)
1483 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1489 const size_t *countp,
const ptrdiff_t *stridep,
1490 const ptrdiff_t *imapp,
char *ip)
1492 return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1498 const size_t *countp,
const ptrdiff_t *stridep,
1499 const ptrdiff_t *imapp,
char **ip)
1501 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.