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

Return to the Main Unidata NetCDF page.
Generated on Tue Oct 22 2019 13:02:54 for NetCDF. NetCDF is a Unidata library.