NetCDF  4.9.3
dvarget.c
Go to the documentation of this file.
1 
9 #include "ncdispatch.h"
10 
15 struct GETodometer {
16  int rank;
17  size_t index[NC_MAX_VAR_DIMS];
18  size_t start[NC_MAX_VAR_DIMS];
19  size_t edges[NC_MAX_VAR_DIMS];
20  ptrdiff_t stride[NC_MAX_VAR_DIMS];
21  size_t stop[NC_MAX_VAR_DIMS];
22 };
23 
24 
35 static void
36 odom_init(struct GETodometer* odom, int rank, const size_t* start,
37  const size_t* edges, const ptrdiff_t* stride)
38 {
39  int i;
40  memset(odom,0,sizeof(struct GETodometer));
41  odom->rank = rank;
42  assert(odom->rank <= NC_MAX_VAR_DIMS);
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];
49  }
50 }
51 
59 static int
60 odom_more(struct GETodometer* odom)
61 {
62  return (odom->index[0] < odom->stop[0]);
63 }
64 
72 static int
73 odom_next(struct GETodometer* odom)
74 {
75  int i;
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;
80  if(i == 0) return 0; /* leave the 0th entry if it overflows*/
81  odom->index[i] = odom->start[i]; /* reset this position*/
82  }
83  return 1;
84 }
85 
90 int
91 NC_get_vara(int ncid, int varid,
92  const size_t *start, const size_t *edges,
93  void *value, nc_type memtype)
94 {
95  NC* ncp;
96  size_t *my_count = (size_t *)edges;
97  int stat = NC_check_id(ncid, &ncp);
98  if(stat != NC_NOERR) return stat;
99 
100  if(start == NULL || edges == NULL) {
101  stat = NC_check_nulls(ncid, varid, start, &my_count, NULL);
102  if(stat != NC_NOERR) return stat;
103  }
104  stat = ncp->dispatch->get_vara(ncid,varid,start,my_count,value,memtype);
105  if(edges == NULL) free(my_count);
106  return stat;
107 }
108 
135 static int
136 NC_get_var(int ncid, int varid, void *value, nc_type memtype)
137 {
138  return NC_get_vara(ncid, varid, NC_coord_zero, NULL, value, memtype);
139 }
140 
145 int
146 NCDEFAULT_get_vars(int ncid, int varid, const size_t * start,
147  const size_t * edges, const ptrdiff_t * stride,
148  void *value0, nc_type memtype)
149 {
150  /* Rebuilt get_vars code to simplify and avoid use of get_varm */
151 
152  int status = NC_NOERR;
153  int i,simplestride,isrecvar;
154  int rank;
155  struct GETodometer odom;
156  nc_type vartype = NC_NAT;
157  NC* ncp;
158  int memtypelen;
159  size_t vartypelen;
160  size_t nels;
161  char* value = (char*)value0;
162  size_t numrecs;
163  size_t varshape[NC_MAX_VAR_DIMS];
164  size_t mystart[NC_MAX_VAR_DIMS];
165  size_t myedges[NC_MAX_VAR_DIMS];
166  ptrdiff_t mystride[NC_MAX_VAR_DIMS];
167  char *memptr = NULL;
168 
169  status = NC_check_id (ncid, &ncp);
170  if(status != NC_NOERR) return status;
171 
172  status = nc_inq_vartype(ncid, varid, &vartype);
173  if(status != NC_NOERR) return status;
174 
175  if(memtype == NC_NAT) memtype = vartype;
176 
177  /* compute the variable type size */
178  status = nc_inq_type(ncid,vartype,NULL,&vartypelen);
179  if(status != NC_NOERR) return status;
180 
181  if(memtype > NC_MAX_ATOMIC_TYPE)
182  memtypelen = (int)vartypelen;
183  else
184  memtypelen = nctypelen(memtype);
185 
186  /* Check gross internal/external type compatibility */
187  if(vartype != memtype) {
188  /* If !atomic, the two types must be the same */
189  if(vartype > NC_MAX_ATOMIC_TYPE
190  || memtype > NC_MAX_ATOMIC_TYPE)
191  return NC_EBADTYPE;
192  /* ok, the types differ but both are atomic */
193  if(memtype == NC_CHAR || vartype == NC_CHAR)
194  return NC_ECHAR;
195  }
196 
197  /* Get the variable rank */
198  status = nc_inq_varndims(ncid, varid, &rank);
199  if(status != NC_NOERR) return status;
200 
201  /* Start array is always required for non-scalar vars. */
202  if(rank > 0 && start == NULL)
203  return NC_EINVALCOORDS;
204 
205  /* Get variable dimension sizes */
206  isrecvar = NC_is_recvar(ncid,varid,&numrecs);
207  NC_getshape(ncid,varid,rank,varshape);
208 
209  /* Optimize out using various checks */
210  if (rank == 0) {
211  /*
212  * The variable is a scalar; consequently,
213  * there s only one thing to get and only one place to put it.
214  * (Why was I called?)
215  */
216  size_t edge1[1] = {1};
217  return NC_get_vara(ncid, varid, start, edge1, value, memtype);
218  }
219 
220  /* Do various checks and fixups on start/edges/stride */
221  simplestride = 1; /* assume so */
222  nels = 1;
223  for(i=0;i<rank;i++) {
224  size_t dimlen;
225  mystart[i] = (start == NULL ? 0 : start[i]);
226  /* illegal value checks */
227  dimlen = (i == 0 && isrecvar ? numrecs : varshape[i]);
228  /* mystart is unsigned, never < 0 */
229  if (mystart[i] > dimlen) return NC_EINVALCOORDS;
230 
231  if(edges == NULL) {
232  if(i == 0 && isrecvar)
233  myedges[i] = numrecs - start[i];
234  else
235  myedges[i] = varshape[i] - mystart[i];
236  } else
237  myedges[i] = edges[i];
238 
239  if (mystart[i] == dimlen && myedges[i] > 0) return NC_EINVALCOORDS;
240 
241  /* myedges is unsigned, never < 0 */
242  if(mystart[i] + myedges[i] > dimlen)
243  return NC_EEDGE;
244  mystride[i] = (stride == NULL ? 1 : stride[i]);
245  if(mystride[i] <= 0
246  /* cast needed for braindead systems with signed size_t */
247  || ((unsigned long) mystride[i] >= X_INT_MAX))
248  return NC_ESTRIDE;
249  if(mystride[i] != 1) simplestride = 0;
250  if(myedges[i] == 0)
251  nels = 0;
252  }
253  if(nels == 0)
254  return NC_NOERR; /* cannot read anything */
255  if(simplestride) {
256  return NC_get_vara(ncid, varid, mystart, myedges, value, memtype);
257  }
258 
259  /* memptr indicates where to store the next value */
260  memptr = value;
261 
262  odom_init(&odom,rank,mystart,myedges,mystride);
263 
264  /* walk the odometer to extract values */
265  while(odom_more(&odom)) {
266  int localstatus = NC_NOERR;
267  /* Read a single value */
268  localstatus = NC_get_vara(ncid,varid,odom.index,NC_coord_one,memptr,memtype);
269  /* So it turns out that when get_varm is used, all errors are
270  delayed and ERANGE will be overwritten by more serious errors.
271  */
272  if(localstatus != NC_NOERR) {
273  if(status == NC_NOERR || localstatus != NC_ERANGE)
274  status = localstatus;
275  }
276  memptr += memtypelen;
277  odom_next(&odom);
278  }
279  return status;
280 }
281 
285 static int
286 NC_get_var1(int ncid, int varid, const size_t *coord, void* value,
287  nc_type memtype)
288 {
289  return NC_get_vara(ncid, varid, coord, NC_coord_one, value, memtype);
290 }
291 
295 int
296 NCDEFAULT_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)
299 {
300  int status = NC_NOERR;
301  nc_type vartype = NC_NAT;
302  int varndims,maxidim;
303  NC* ncp;
304  int memtypelen;
305  char* value = (char*)value0;
306 
307  status = NC_check_id (ncid, &ncp);
308  if(status != NC_NOERR) return status;
309 
310 /*
311  if(NC_indef(ncp)) return NC_EINDEFINE;
312 */
313 
314  status = nc_inq_vartype(ncid, varid, &vartype);
315  if(status != NC_NOERR) return status;
316  /* Check that this is an atomic type */
317  if(vartype > NC_MAX_ATOMIC_TYPE)
318  return NC_EMAPTYPE;
319 
320  status = nc_inq_varndims(ncid, varid, &varndims);
321  if(status != NC_NOERR) return status;
322 
323  if(memtype == NC_NAT) {
324  memtype = vartype;
325  }
326 
327  if(memtype == NC_CHAR && vartype != NC_CHAR)
328  return NC_ECHAR;
329  else if(memtype != NC_CHAR && vartype == NC_CHAR)
330  return NC_ECHAR;
331 
332  memtypelen = nctypelen(memtype);
333 
334  maxidim = (int) varndims - 1;
335 
336  if (maxidim < 0)
337  {
338  /*
339  * The variable is a scalar; consequently,
340  * there s only one thing to get and only one place to put it.
341  * (Why was I called?)
342  */
343  size_t edge1[1] = {1};
344  return NC_get_vara(ncid, varid, start, edge1, value, memtype);
345  }
346 
347  /*
348  * else
349  * The variable is an array.
350  */
351  {
352  int idim;
353  size_t *mystart = NULL;
354  size_t *myedges;
355  size_t *iocount; /* count vector */
356  size_t *stop; /* stop indexes */
357  size_t *length; /* edge lengths in bytes */
358  ptrdiff_t *mystride;
359  ptrdiff_t *mymap;
360  size_t varshape[NC_MAX_VAR_DIMS];
361  int isrecvar;
362  size_t numrecs;
363 
364  /* Compute some dimension related values */
365  isrecvar = NC_is_recvar(ncid,varid,&numrecs);
366  NC_getshape(ncid,varid,varndims,varshape);
367 
368  /*
369  * Verify stride argument; also see if stride is all ones
370  */
371  if(stride != NULL) {
372  int stride1 = 1;
373  for (idim = 0; idim <= maxidim; ++idim)
374  {
375  if (stride[idim] == 0
376  /* cast needed for braindead systems with signed size_t */
377  || ((unsigned long) stride[idim] >= X_INT_MAX))
378  {
379  return NC_ESTRIDE;
380  }
381  if(stride[idim] != 1) stride1 = 0;
382  }
383  /* If stride1 is true, and there is no imap
384  then call get_vara directly.
385  */
386  if(stride1 && imapp == NULL) {
387  return NC_get_vara(ncid, varid, start, edges, value, memtype);
388  }
389  }
390 
391  /* assert(sizeof(ptrdiff_t) >= sizeof(size_t)); */
392  /* Allocate space for mystart,mystride,mymap etc.all at once */
393  mystart = (size_t *)calloc((size_t)(varndims * 7), sizeof(ptrdiff_t));
394  if(mystart == NULL) return NC_ENOMEM;
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;
401 
402  /*
403  * Check start, edges
404  */
405  for (idim = maxidim; idim >= 0; --idim)
406  {
407  size_t dimlen =
408  idim == 0 && isrecvar
409  ? numrecs
410  : varshape[idim];
411 
412  mystart[idim] = start != NULL
413  ? start[idim]
414  : 0;
415 
416  if (mystart[idim] > dimlen)
417  {
418  status = NC_EINVALCOORDS;
419  goto done;
420  }
421 
422 #ifdef COMPLEX
423  myedges[idim] = edges != NULL
424  ? edges[idim]
425  : idim == 0 && isrecvar
426  ? numrecs - mystart[idim]
427  : varshape[idim] - mystart[idim];
428 #else
429  if(edges != NULL)
430  myedges[idim] = edges[idim];
431  else if (idim == 0 && isrecvar)
432  myedges[idim] = numrecs - mystart[idim];
433  else
434  myedges[idim] = varshape[idim] - mystart[idim];
435 #endif
436 
437  if (mystart[idim] == dimlen && myedges[idim] > 0)
438  {
439  status = NC_EINVALCOORDS;
440  goto done;
441  }
442 
443  if (mystart[idim] + myedges[idim] > dimlen)
444  {
445  status = NC_EEDGE;
446  goto done;
447  }
448  }
449 
450 
451  /*
452  * Initialize I/O parameters.
453  */
454  for (idim = maxidim; idim >= 0; --idim)
455  {
456  if (edges != NULL && edges[idim] == 0)
457  {
458  status = NC_NOERR; /* read/write no data */
459  goto done;
460  }
461 
462  mystride[idim] = stride != NULL
463  ? stride[idim]
464  : 1;
465 
466  /* Remember: in netCDF-2 imapp is byte oriented, not index oriented
467  * Starting from netCDF-3, imapp is index oriented */
468 #ifdef COMPLEX
469  mymap[idim] = (imapp != NULL
470  ? imapp[idim]
471  : (idim == maxidim ? 1
472  : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1]));
473 #else
474  if(imapp != NULL)
475  mymap[idim] = imapp[idim];
476  else if (idim == maxidim)
477  mymap[idim] = 1;
478  else
479  mymap[idim] =
480  mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
481 #endif
482  iocount[idim] = 1;
483  length[idim] = ((size_t)mymap[idim]) * myedges[idim];
484  stop[idim] = (mystart[idim] + myedges[idim] * (size_t)mystride[idim]);
485  }
486 
487  /* Lower body */
488  /*
489  * As an optimization, adjust I/O parameters when the fastest
490  * dimension has unity stride both externally and internally.
491  * In this case, the user could have called a simpler routine
492  * (i.e. ncvar$1()
493  */
494  if (mystride[maxidim] == 1
495  && mymap[maxidim] == 1)
496  {
497  iocount[maxidim] = myedges[maxidim];
498  mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
499  mymap[maxidim] = (ptrdiff_t) length[maxidim];
500  }
501 
502  /*
503  * Perform I/O. Exit when done.
504  */
505  for (;;)
506  {
507  /* TODO: */
508  int lstatus = NC_get_vara(ncid, varid, mystart, iocount,
509  value, memtype);
510  if (lstatus != NC_NOERR) {
511  if(status == NC_NOERR || lstatus != NC_ERANGE)
512  status = lstatus;
513  }
514  /*
515  * The following code permutes through the variable s
516  * external start-index space and it s internal address
517  * space. At the UPC, this algorithm is commonly
518  * called "odometer code".
519  */
520  idim = maxidim;
521  carry:
522  value += (((int)mymap[idim]) * memtypelen);
523  mystart[idim] += (size_t)mystride[idim];
524  if (mystart[idim] == stop[idim])
525  {
526  size_t l = (length[idim] * (size_t)memtypelen);
527  value -= l;
528  mystart[idim] = start[idim];
529  if (--idim < 0)
530  break; /* normal return */
531  goto carry;
532  }
533  } /* I/O loop */
534  done:
535  free(mystart);
536  } /* variable is array */
537  return status;
538 }
539 
575 static int
576 NC_get_vars(int ncid, int varid, const size_t *start,
577  const size_t *edges, const ptrdiff_t *stride, void *value,
578  nc_type memtype)
579 {
580  NC* ncp;
581  size_t *my_count = (size_t *)edges;
582  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
583  int stat;
584 
585  stat = NC_check_id(ncid, &ncp);
586  if(stat != NC_NOERR) return stat;
587 
588  /* Handle any NULL parameters. */
589  if(start == NULL || edges == NULL || stride == NULL) {
590  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
591  if(stat != NC_NOERR) return stat;
592  }
593 
594  stat = ncp->dispatch->get_vars(ncid,varid,start,my_count,my_stride,
595  value,memtype);
596  if(edges == NULL) free(my_count);
597  if(stride == NULL) free(my_stride);
598  return stat;
599 }
600 
637 static int
638 NC_get_varm(int ncid, int varid, const size_t *start,
639  const size_t *edges, const ptrdiff_t *stride, const ptrdiff_t* map,
640  void *value, nc_type memtype)
641 {
642  NC* ncp;
643  size_t *my_count = (size_t *)edges;
644  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
645  int stat;
646 
647  stat = NC_check_id(ncid, &ncp);
648  if(stat != NC_NOERR) return stat;
649 
650  /* Handle any NULL parameters. */
651  if(start == NULL || edges == NULL || stride == NULL) {
652  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
653  if(stat != NC_NOERR) return stat;
654  }
655 
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);
660  return stat;
661 }
662  /* All these functions are part of this named group... */
667 
745 int
746 nc_get_vara(int ncid, int varid, const size_t *startp,
747  const size_t *countp, void *ip)
748 {
749  NC* ncp;
750  nc_type xtype = NC_NAT;
751  int stat = NC_check_id(ncid, &ncp);
752  if(stat != NC_NOERR) return stat;
753  stat = nc_inq_vartype(ncid, varid, &xtype);
754  if(stat != NC_NOERR) return stat;
755  return NC_get_vara(ncid, varid, startp, countp, ip, xtype);
756 }
757 
758 int
759 nc_get_vara_text(int ncid, int varid, const size_t *startp,
760  const size_t *countp, char *ip)
761 {
762  return NC_get_vara(ncid, varid, startp, countp, (void *)ip, NC_CHAR);
763 }
764 
765 int
766 nc_get_vara_schar(int ncid, int varid, const size_t *startp,
767  const size_t *countp, signed char *ip)
768 {
769  return NC_get_vara(ncid, varid, startp, countp, (void *)ip, NC_BYTE);
770 }
771 
772 int
773 nc_get_vara_uchar(int ncid, int varid, const size_t *startp,
774  const size_t *countp, unsigned char *ip)
775 {
776  return NC_get_vara(ncid, varid, startp, countp, (void *)ip, T_uchar);
777 }
778 
779 int
780 nc_get_vara_short(int ncid, int varid, const size_t *startp,
781  const size_t *countp, short *ip)
782 {
783  return NC_get_vara(ncid, varid, startp, countp, (void *)ip, NC_SHORT);
784 }
785 
786 int
787 nc_get_vara_int(int ncid, int varid,
788  const size_t *startp, const size_t *countp, int *ip)
789 {
790  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_INT);
791 }
792 
793 int
794 nc_get_vara_long(int ncid, int varid,
795  const size_t *startp, const size_t *countp, long *ip)
796 {
797  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_long);
798 }
799 
800 int
801 nc_get_vara_float(int ncid, int varid,
802  const size_t *startp, const size_t *countp, float *ip)
803 {
804  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_float);
805 }
806 
807 int
808 nc_get_vara_double(int ncid, int varid, const size_t *startp,
809  const size_t *countp, double *ip)
810 {
811  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_double);
812 }
813 
814 int
815 nc_get_vara_ubyte(int ncid, int varid,
816  const size_t *startp, const size_t *countp, unsigned char *ip)
817 {
818  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_ubyte);
819 }
820 
821 int
822 nc_get_vara_ushort(int ncid, int varid,
823  const size_t *startp, const size_t *countp, unsigned short *ip)
824 {
825  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_ushort);
826 }
827 
828 int
829 nc_get_vara_uint(int ncid, int varid,
830  const size_t *startp, const size_t *countp, unsigned int *ip)
831 {
832  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_uint);
833 }
834 
835 int
836 nc_get_vara_longlong(int ncid, int varid,
837  const size_t *startp, const size_t *countp, long long *ip)
838 {
839  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,T_longlong);
840 }
841 
842 int
843 nc_get_vara_ulonglong(int ncid, int varid, const size_t *startp,
844  const size_t *countp, unsigned long long *ip)
845 {
846  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_UINT64);
847 }
848 
849 int
850 nc_get_vara_string(int ncid, int varid, const size_t *startp,
851  const size_t *countp, char* *ip)
852 {
853  return NC_get_vara(ncid,varid,startp,countp, (void *)ip,NC_STRING);
854 }
855 
893 int
894 nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
895 {
896  return NC_get_var1(ncid, varid, indexp, ip, NC_NAT);
897 }
898 
899 int
900 nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
901 {
902  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_CHAR);
903 }
904 
905 int
906 nc_get_var1_schar(int ncid, int varid, const size_t *indexp, signed char *ip)
907 {
908  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_BYTE);
909 }
910 
911 int
912 nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
913 {
914  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UBYTE);
915 }
916 
917 int
918 nc_get_var1_short(int ncid, int varid, const size_t *indexp, short *ip)
919 {
920  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_SHORT);
921 }
922 
923 int
924 nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip)
925 {
926  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_INT);
927 }
928 
929 int
930 nc_get_var1_long(int ncid, int varid, const size_t *indexp,
931  long *ip)
932 {
933  return NC_get_var1(ncid, varid, indexp, (void *)ip, longtype);
934 }
935 
936 int
937 nc_get_var1_float(int ncid, int varid, const size_t *indexp,
938  float *ip)
939 {
940  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_FLOAT);
941 }
942 
943 int
944 nc_get_var1_double(int ncid, int varid, const size_t *indexp,
945  double *ip)
946 {
947  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_DOUBLE);
948 }
949 
950 int
951 nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp,
952  unsigned char *ip)
953 {
954  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UBYTE);
955 }
956 
957 int
958 nc_get_var1_ushort(int ncid, int varid, const size_t *indexp,
959  unsigned short *ip)
960 {
961  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_USHORT);
962 }
963 
964 int
965 nc_get_var1_uint(int ncid, int varid, const size_t *indexp,
966  unsigned int *ip)
967 {
968  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UINT);
969 }
970 
971 int
972 nc_get_var1_longlong(int ncid, int varid, const size_t *indexp,
973  long long *ip)
974 {
975  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_INT64);
976 }
977 
978 int
979 nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp,
980  unsigned long long *ip)
981 {
982  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_UINT64);
983 }
984 
985 int
986 nc_get_var1_string(int ncid, int varid, const size_t *indexp, char* *ip)
987 {
988  return NC_get_var1(ncid, varid, indexp, (void *)ip, NC_STRING);
989 }
990 
1037 int
1038 nc_get_var(int ncid, int varid, void *ip)
1039 {
1040  return NC_get_var(ncid, varid, ip, NC_NAT);
1041 }
1042 
1043 int
1044 nc_get_var_text(int ncid, int varid, char *ip)
1045 {
1046  return NC_get_var(ncid, varid, (void *)ip, NC_CHAR);
1047 }
1048 
1049 int
1050 nc_get_var_schar(int ncid, int varid, signed char *ip)
1051 {
1052  return NC_get_var(ncid, varid, (void *)ip, NC_BYTE);
1053 }
1054 
1055 int
1056 nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
1057 {
1058  return NC_get_var(ncid,varid, (void *)ip, NC_UBYTE);
1059 }
1060 
1061 int
1062 nc_get_var_short(int ncid, int varid, short *ip)
1063 {
1064  return NC_get_var(ncid, varid, (void *)ip, NC_SHORT);
1065 }
1066 
1067 int
1068 nc_get_var_int(int ncid, int varid, int *ip)
1069 {
1070  return NC_get_var(ncid,varid, (void *)ip, NC_INT);
1071 }
1072 
1073 int
1074 nc_get_var_long(int ncid, int varid, long *ip)
1075 {
1076  return NC_get_var(ncid,varid, (void *)ip, longtype);
1077 }
1078 
1079 int
1080 nc_get_var_float(int ncid, int varid, float *ip)
1081 {
1082  return NC_get_var(ncid,varid, (void *)ip, NC_FLOAT);
1083 }
1084 
1085 int
1086 nc_get_var_double(int ncid, int varid, double *ip)
1087 {
1088  return NC_get_var(ncid,varid, (void *)ip, NC_DOUBLE);
1089 }
1090 
1091 int
1092 nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
1093 {
1094  return NC_get_var(ncid,varid, (void *)ip, NC_UBYTE);
1095 }
1096 
1097 int
1098 nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
1099 {
1100  return NC_get_var(ncid,varid, (void *)ip, NC_USHORT);
1101 }
1102 
1103 int
1104 nc_get_var_uint(int ncid, int varid, unsigned int *ip)
1105 {
1106  return NC_get_var(ncid,varid, (void *)ip, NC_UINT);
1107 }
1108 
1109 int
1110 nc_get_var_longlong(int ncid, int varid, long long *ip)
1111 {
1112  return NC_get_var(ncid,varid, (void *)ip, NC_INT64);
1113 }
1114 
1115 int
1116 nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
1117 {
1118  return NC_get_var(ncid,varid, (void *)ip,NC_UINT64);
1119 }
1120 
1121 int
1122 nc_get_var_string(int ncid, int varid, char* *ip)
1123 {
1124  return NC_get_var(ncid,varid, (void *)ip,NC_STRING);
1125 }
1172 int
1173 nc_get_vars(int ncid, int varid, const size_t * startp,
1174  const size_t * countp, const ptrdiff_t * stridep,
1175  void *ip)
1176 {
1177  return NC_get_vars(ncid, varid, startp, countp, stridep,
1178  ip, NC_NAT);
1179 }
1180 
1181 int
1182 nc_get_vars_text(int ncid, int varid, const size_t *startp,
1183  const size_t *countp, const ptrdiff_t * stridep,
1184  char *ip)
1185 {
1186  return NC_get_vars(ncid,varid,startp, countp, stridep,
1187  (void *)ip, NC_CHAR);
1188 }
1189 
1190 int
1191 nc_get_vars_schar(int ncid, int varid, const size_t *startp,
1192  const size_t *countp, const ptrdiff_t * stridep,
1193  signed char *ip)
1194 {
1195  return NC_get_vars(ncid,varid,startp, countp, stridep,
1196  (void *)ip, NC_BYTE);
1197 }
1198 
1199 int
1200 nc_get_vars_uchar(int ncid, int varid, const size_t *startp,
1201  const size_t *countp, const ptrdiff_t * stridep,
1202  unsigned char *ip)
1203 {
1204  return NC_get_vars(ncid,varid,startp, countp, stridep,
1205  (void *)ip, T_uchar);
1206 }
1207 
1208 int
1209 nc_get_vars_short(int ncid, int varid, const size_t *startp,
1210  const size_t *countp, const ptrdiff_t *stridep,
1211  short *ip)
1212 {
1213  return NC_get_vars(ncid,varid,startp, countp, stridep,
1214  (void *)ip, NC_SHORT);
1215 }
1216 
1217 int
1218 nc_get_vars_int(int ncid, int varid, const size_t *startp,
1219  const size_t *countp, const ptrdiff_t * stridep,
1220  int *ip)
1221 {
1222  return NC_get_vars(ncid,varid,startp, countp, stridep,
1223  (void *)ip, NC_INT);
1224 }
1225 
1226 int
1227 nc_get_vars_long(int ncid, int varid, const size_t *startp,
1228  const size_t *countp, const ptrdiff_t * stridep,
1229  long *ip)
1230 {
1231  return NC_get_vars(ncid,varid,startp, countp, stridep,
1232  (void *)ip, T_long);
1233 }
1234 
1235 int
1236 nc_get_vars_float(int ncid, int varid, const size_t *startp,
1237  const size_t *countp, const ptrdiff_t * stridep,
1238  float *ip)
1239 {
1240  return NC_get_vars(ncid,varid,startp, countp, stridep,
1241  (void *)ip, T_float);
1242 }
1243 
1244 int
1245 nc_get_vars_double(int ncid, int varid, const size_t *startp,
1246  const size_t *countp, const ptrdiff_t * stridep,
1247  double *ip)
1248 {
1249  return NC_get_vars(ncid,varid,startp, countp, stridep,
1250  (void *)ip, T_double);
1251 }
1252 
1253 int
1254 nc_get_vars_ubyte(int ncid, int varid, const size_t *startp,
1255  const size_t *countp, const ptrdiff_t * stridep,
1256  unsigned char *ip)
1257 {
1258  return NC_get_vars(ncid,varid, startp, countp, stridep,
1259  (void *)ip, T_ubyte);
1260 }
1261 
1262 int
1263 nc_get_vars_ushort(int ncid, int varid, const size_t *startp,
1264  const size_t *countp, const ptrdiff_t * stridep,
1265  unsigned short *ip)
1266 {
1267  return NC_get_vars(ncid,varid,startp,countp, stridep,
1268  (void *)ip, T_ushort);
1269 }
1270 
1271 int
1272 nc_get_vars_uint(int ncid, int varid, const size_t *startp,
1273  const size_t *countp, const ptrdiff_t * stridep,
1274  unsigned int *ip)
1275 {
1276  return NC_get_vars(ncid,varid,startp, countp, stridep,
1277  (void *)ip, T_uint);
1278 }
1279 
1280 int
1281 nc_get_vars_longlong(int ncid, int varid, const size_t *startp,
1282  const size_t *countp, const ptrdiff_t * stridep,
1283  long long *ip)
1284 {
1285  return NC_get_vars(ncid, varid, startp, countp, stridep,
1286  (void *)ip, T_longlong);
1287 }
1288 
1289 int
1290 nc_get_vars_ulonglong(int ncid, int varid, const size_t *startp,
1291  const size_t *countp, const ptrdiff_t * stridep,
1292  unsigned long long *ip)
1293 {
1294  return NC_get_vars(ncid, varid, startp, countp, stridep,
1295  (void *)ip, NC_UINT64);
1296 }
1297 
1298 int
1299 nc_get_vars_string(int ncid, int varid,
1300  const size_t *startp, const size_t *countp,
1301  const ptrdiff_t * stridep,
1302  char* *ip)
1303 {
1304  return NC_get_vars(ncid, varid, startp, countp, stridep,
1305  (void *)ip, NC_STRING);
1306 }
1307 
1369 int
1370 nc_get_varm(int ncid, int varid, const size_t * startp,
1371  const size_t * countp, const ptrdiff_t * stridep,
1372  const ptrdiff_t * imapp, void *ip)
1373 {
1374  return NC_get_varm(ncid, varid, startp, countp, stridep, imapp, ip, NC_NAT);
1375 }
1376 
1377 int
1378 nc_get_varm_schar(int ncid, int varid,
1379  const size_t *startp, const size_t *countp,
1380  const ptrdiff_t *stridep,
1381  const ptrdiff_t *imapp, signed char *ip)
1382 {
1383  return NC_get_varm(ncid, varid, startp, countp,
1384  stridep, imapp, (void *)ip, NC_BYTE);
1385 }
1386 
1387 int
1388 nc_get_varm_uchar(int ncid, int varid,
1389  const size_t *startp, const size_t *countp,
1390  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1391  unsigned char *ip)
1392 {
1393  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_uchar);
1394 }
1395 
1396 int
1397 nc_get_varm_short(int ncid, int varid, const size_t *startp,
1398  const size_t *countp, const ptrdiff_t *stridep,
1399  const ptrdiff_t *imapp, short *ip)
1400 {
1401  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,NC_SHORT);
1402 }
1403 
1404 int
1405 nc_get_varm_int(int ncid, int varid,
1406  const size_t *startp, const size_t *countp,
1407  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1408  int *ip)
1409 {
1410  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,NC_INT);
1411 }
1412 
1413 int
1414 nc_get_varm_long(int ncid, int varid,
1415  const size_t *startp, const size_t *countp,
1416  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1417  long *ip)
1418 {
1419  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_long);
1420 }
1421 
1422 int
1423 nc_get_varm_float(int ncid, int varid,
1424  const size_t *startp, const size_t *countp,
1425  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1426  float *ip)
1427 {
1428  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_float);
1429 }
1430 
1431 int
1432 nc_get_varm_double(int ncid, int varid,
1433  const size_t *startp, const size_t *countp,
1434  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1435  double *ip)
1436 {
1437  return NC_get_varm(ncid,varid,startp,countp,stridep,imapp, (void *)ip,T_double);
1438 }
1439 
1440 int
1441 nc_get_varm_ubyte(int ncid, int varid,
1442  const size_t *startp, const size_t *countp,
1443  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1444  unsigned char *ip)
1445 {
1446  return NC_get_varm(ncid,varid,startp,countp,stridep,
1447  imapp, (void *)ip, T_ubyte);
1448 }
1449 
1450 int
1451 nc_get_varm_ushort(int ncid, int varid,
1452  const size_t *startp, const size_t *countp,
1453  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1454  unsigned short *ip)
1455 {
1456  return NC_get_varm(ncid, varid, startp, countp, stridep,
1457  imapp, (void *)ip, T_ushort);
1458 }
1459 
1460 int
1461 nc_get_varm_uint(int ncid, int varid,
1462  const size_t *startp, const size_t *countp,
1463  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1464  unsigned int *ip)
1465 {
1466  return NC_get_varm(ncid, varid, startp, countp,
1467  stridep, imapp, (void *)ip, T_uint);
1468 }
1469 
1470 int
1471 nc_get_varm_longlong(int ncid, int varid, const size_t *startp,
1472  const size_t *countp, const ptrdiff_t *stridep,
1473  const ptrdiff_t *imapp, long long *ip)
1474 {
1475  return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1476  (void *)ip, T_longlong);
1477 }
1478 
1479 int
1480 nc_get_varm_ulonglong(int ncid, int varid,
1481  const size_t *startp, const size_t *countp,
1482  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1483  unsigned long long *ip)
1484 {
1485  return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1486  (void *)ip, NC_UINT64);
1487 }
1488 
1489 int
1490 nc_get_varm_text(int ncid, int varid, const size_t *startp,
1491  const size_t *countp, const ptrdiff_t *stridep,
1492  const ptrdiff_t *imapp, char *ip)
1493 {
1494  return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1495  (void *)ip, NC_CHAR);
1496 }
1497 
1498 int
1499 nc_get_varm_string(int ncid, int varid, const size_t *startp,
1500  const size_t *countp, const ptrdiff_t *stridep,
1501  const ptrdiff_t *imapp, char **ip)
1502 {
1503  return NC_get_varm(ncid, varid, startp, countp, stridep, imapp,
1504  (void *)ip, NC_STRING);
1505 } /* End of named group... */
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.
Definition: dvarget.c:829
int nc_get_var_uint(int ncid, int varid, unsigned int *ip)
Read an entire variable in one call.
Definition: dvarget.c:1104
int nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip)
Read a single datum from a variable.
Definition: dvarget.c:900
#define NC_ENOMEM
Memory allocation (malloc) failure.
Definition: netcdf.h:458
int nc_get_var_ulonglong(int ncid, int varid, unsigned long long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1116
#define NC_CHAR
ISO/ASCII character.
Definition: netcdf.h:36
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.
Definition: dvarget.c:1397
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.
Definition: dvarget.c:1441
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.
Definition: dvarget.c:808
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.
Definition: dvarget.c:1423
#define NC_UBYTE
unsigned 1 byte int
Definition: netcdf.h:42
#define NC_EMAPTYPE
Mapped access for atomic types only.
Definition: netcdf.h:511
#define NC_ERANGE
Math result not representable.
Definition: netcdf.h:457
#define NC_MAX_VAR_DIMS
max per variable dimensions
Definition: netcdf.h:292
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.
Definition: dvarget.c:1182
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.
Definition: dvarget.c:1254
int nc_get_var1_string(int ncid, int varid, const size_t *indexp, char **ip)
Read a single datum from a variable.
Definition: dvarget.c:986
#define NC_UINT
unsigned 4-byte int
Definition: netcdf.h:44
int nc_get_var_long(int ncid, int varid, long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1074
#define NC_EINVALCOORDS
Index exceeds dimension bound.
Definition: netcdf.h:410
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.
Definition: dvarget.c:1378
#define NC_INT64
signed 8-byte int
Definition: netcdf.h:45
#define NC_STRING
string
Definition: netcdf.h:47
#define NC_DOUBLE
double precision floating point number
Definition: netcdf.h:41
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.
Definition: dvarget.c:1245
EXTERNL int nc_inq_varndims(int ncid, int varid, int *ndimsp)
Learn how many dimensions are associated with a variable.
Definition: dvarinq.c:202
int nc_get_var_schar(int ncid, int varid, signed char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1050
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.
Definition: dvarget.c:1370
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:25
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.
Definition: dvarget.c:850
#define NC_BYTE
signed 1 byte integer
Definition: netcdf.h:35
int nc_get_var1_longlong(int ncid, int varid, const size_t *indexp, long long *ip)
Read a single datum from a variable.
Definition: dvarget.c:972
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.
Definition: dvarget.c:1405
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.
Definition: dvarget.c:1281
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.
Definition: dvarget.c:822
int nc_get_var(int ncid, int varid, void *ip)
Read an entire variable in one call.
Definition: dvarget.c:1038
int nc_get_var_int(int ncid, int varid, int *ip)
Read an entire variable in one call.
Definition: dvarget.c:1068
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.
Definition: dvarget.c:780
int nc_get_var_ushort(int ncid, int varid, unsigned short *ip)
Read an entire variable in one call.
Definition: dvarget.c:1098
int nc_get_var_double(int ncid, int varid, double *ip)
Read an entire variable in one call.
Definition: dvarget.c:1086
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.
Definition: dvarget.c:801
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.
Definition: dvarget.c:1461
int nc_get_var_string(int ncid, int varid, char **ip)
Read an entire variable in one call.
Definition: dvarget.c:1122
#define NC_EBADTYPE
Not a netcdf data type.
Definition: netcdf.h:420
#define NC_EEDGE
Start+count exceeds dimension bound.
Definition: netcdf.h:448
int nc_get_var1_ubyte(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
Definition: dvarget.c:951
int nc_get_var1_uchar(int ncid, int varid, const size_t *indexp, unsigned char *ip)
Read a single datum from a variable.
Definition: dvarget.c:912
int nc_get_var1(int ncid, int varid, const size_t *indexp, void *ip)
Read a single datum from a variable.
Definition: dvarget.c:894
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.
Definition: dvarget.c:787
#define NC_ESTRIDE
Illegal stride.
Definition: netcdf.h:449
int nc_get_var1_uint(int ncid, int varid, const size_t *indexp, unsigned int *ip)
Read a single datum from a variable.
Definition: dvarget.c:965
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.
Definition: dvarget.c:836
#define NC_INT
signed 4 byte integer
Definition: netcdf.h:38
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.
Definition: dvarget.c:843
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.
Definition: dvarget.c:1200
int nc_get_var_text(int ncid, int varid, char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1044
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.
Definition: dvarget.c:1388
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.
Definition: dvarget.c:1290
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.
Definition: dvarget.c:1218
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.
Definition: dvarget.c:815
int nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip)
Read a single datum from a variable.
Definition: dvarget.c:937
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.
Definition: dvarget.c:759
#define NC_NAT
Not A Type.
Definition: netcdf.h:34
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.
Definition: dvarget.c:766
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
Definition: dvarinq.c:178
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.
Definition: dvarget.c:1236
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
Definition: dfile.c:1728
#define NC_USHORT
unsigned 2-byte int
Definition: netcdf.h:43
int nc_get_var_ubyte(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1092
int nc_get_var_longlong(int ncid, int varid, long long *ip)
Read an entire variable in one call.
Definition: dvarget.c:1110
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.
Definition: dvarget.c:1209
int nc_get_var1_ushort(int ncid, int varid, const size_t *indexp, unsigned short *ip)
Read a single datum from a variable.
Definition: dvarget.c:958
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.
Definition: dvarget.c:1490
int nc_get_var1_schar(int ncid, int varid, const size_t *indexp, signed char *ip)
Read a single datum from a variable.
Definition: dvarget.c:906
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.
Definition: dvarget.c:1191
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.
Definition: dvarget.c:1227
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.
Definition: dvarget.c:1263
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.
Definition: dvarget.c:773
int nc_get_var_float(int ncid, int varid, float *ip)
Read an entire variable in one call.
Definition: dvarget.c:1080
int nc_get_var1_short(int ncid, int varid, const size_t *indexp, short *ip)
Read a single datum from a variable.
Definition: dvarget.c:918
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.
Definition: dvarget.c:1173
int nc_get_var_short(int ncid, int varid, short *ip)
Read an entire variable in one call.
Definition: dvarget.c:1062
#define NC_SHORT
signed 2 byte integer
Definition: netcdf.h:37
int nc_get_var1_ulonglong(int ncid, int varid, const size_t *indexp, unsigned long long *ip)
Read a single datum from a variable.
Definition: dvarget.c:979
int nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip)
Read a single datum from a variable.
Definition: dvarget.c:944
int nc_get_var_uchar(int ncid, int varid, unsigned char *ip)
Read an entire variable in one call.
Definition: dvarget.c:1056
#define NC_NOERR
No Error.
Definition: netcdf.h:378
#define NC_ECHAR
Attempt to convert between text & numbers.
Definition: netcdf.h:439
int nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip)
Read a single datum from a variable.
Definition: dvarget.c:930
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.
Definition: dvarget.c:1414
int nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip)
Read a single datum from a variable.
Definition: dvarget.c:924
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.
Definition: dvarget.c:1451
#define NC_FLOAT
single precision floating point number
Definition: netcdf.h:40
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.
Definition: dvarget.c:1499
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.
Definition: dvarget.c:1432
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.
Definition: dvarget.c:746
#define NC_UINT64
unsigned 8-byte int
Definition: netcdf.h:46
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.
Definition: dvarget.c:794
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.
Definition: dvarget.c:1471
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.
Definition: dvarget.c:1299
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.
Definition: dvarget.c:1272
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.
Definition: dvarget.c:1480