NetCDF  4.7.2
dvarput.c
Go to the documentation of this file.
1 
8 #include "ncdispatch.h"
9 
10 struct PUTodometer {
11  int rank;
12  size_t index[NC_MAX_VAR_DIMS];
13  size_t start[NC_MAX_VAR_DIMS];
14  size_t edges[NC_MAX_VAR_DIMS];
15  ptrdiff_t stride[NC_MAX_VAR_DIMS];
16  size_t stop[NC_MAX_VAR_DIMS];
17 };
18 
29 static void
30 odom_init(struct PUTodometer* odom, int rank, const size_t* start,
31  const size_t* edges, const ptrdiff_t* stride)
32 {
33  int i;
34  memset(odom,0,sizeof(struct PUTodometer));
35  odom->rank = rank;
36  assert(odom->rank <= NC_MAX_VAR_DIMS);
37  for(i=0;i<odom->rank;i++) {
38  odom->start[i] = (start != NULL ? start[i] : 0);
39  odom->edges[i] = (edges != NULL ? edges[i] : 1);
40  odom->stride[i] = (stride != NULL ? stride[i] : 1);
41  odom->stop[i] = odom->start[i] + (odom->edges[i]*(size_t)odom->stride[i]);
42  odom->index[i] = odom->start[i];
43  }
44 }
45 
53 static int
54 odom_more(struct PUTodometer* odom)
55 {
56  return (odom->index[0] < odom->stop[0]);
57 }
58 
66 static int
67 odom_next(struct PUTodometer* odom)
68 {
69  int i;
70  if(odom->rank == 0) return 0;
71  for(i=odom->rank-1;i>=0;i--) {
72  odom->index[i] += (size_t)odom->stride[i];
73  if(odom->index[i] < odom->stop[i]) break;
74  if(i == 0) return 0; /* leave the 0th entry if it overflows*/
75  odom->index[i] = odom->start[i]; /* reset this position*/
76  }
77  return 1;
78 }
79 
83 static int
84 NC_put_vara(int ncid, int varid, const size_t *start,
85  const size_t *edges, const void *value, nc_type memtype)
86 {
87  NC* ncp;
88  size_t *my_count = (size_t *)edges;
89 
90  int stat = NC_check_id(ncid, &ncp);
91  if(stat != NC_NOERR) return stat;
92 
93  if(start == NULL || edges == NULL) {
94  stat = NC_check_nulls(ncid, varid, start, &my_count, NULL);
95  if(stat != NC_NOERR) return stat;
96  }
97  stat = ncp->dispatch->put_vara(ncid, varid, start, my_count, value, memtype);
98  if(edges == NULL) free(my_count);
99  return stat;
100 }
101 
105 static int
106 NC_put_var(int ncid, int varid, const void *value, nc_type memtype)
107 {
108  int ndims;
109  size_t shape[NC_MAX_VAR_DIMS];
110  int stat = nc_inq_varndims(ncid,varid, &ndims);
111  if(stat) return stat;
112  stat = NC_getshape(ncid,varid, ndims, shape);
113  if(stat) return stat;
114  return NC_put_vara(ncid, varid, NC_coord_zero, shape, value, memtype);
115 }
116 
120 static int
121 NC_put_var1(int ncid, int varid, const size_t *coord, const void* value,
122  nc_type memtype)
123 {
124  return NC_put_vara(ncid, varid, coord, NC_coord_one, value, memtype);
125 }
126 
130 int
131 NCDEFAULT_put_vars(int ncid, int varid, const size_t * start,
132  const size_t * edges, const ptrdiff_t * stride,
133  const void *value0, nc_type memtype)
134 {
135  /* Rebuilt put_vars code to simplify and avoid use of put_varm */
136 
137  int status = NC_NOERR;
138  int i,isstride1,isrecvar;
139  int rank;
140  struct PUTodometer odom;
141  nc_type vartype = NC_NAT;
142  NC* ncp;
143  size_t vartypelen;
144  size_t nels;
145  int memtypelen;
146  const char* value = (const char*)value0;
147  int nrecdims; /* number of record dims for a variable */
148  int is_recdim[NC_MAX_VAR_DIMS]; /* for variable's dimensions */
149  size_t varshape[NC_MAX_VAR_DIMS];
150  size_t mystart[NC_MAX_VAR_DIMS];
151  size_t myedges[NC_MAX_VAR_DIMS];
152  ptrdiff_t mystride[NC_MAX_VAR_DIMS];
153  const char* memptr = value;
154 
155  status = NC_check_id (ncid, &ncp);
156  if(status != NC_NOERR) return status;
157 
158  status = nc_inq_vartype(ncid, varid, &vartype);
159  if(status != NC_NOERR) return status;
160 
161  if(memtype == NC_NAT) memtype = vartype;
162 
163  /* compute the variable type size */
164  status = nc_inq_type(ncid,vartype,NULL,&vartypelen);
165  if(status != NC_NOERR) return status;
166 
167  if(memtype > NC_MAX_ATOMIC_TYPE)
168  memtypelen = (int)vartypelen;
169  else
170  memtypelen = nctypelen(memtype);
171 
172  /* Check gross internal/external type compatibility */
173  if(vartype != memtype) {
174  /* If !atomic, the two types must be the same */
175  if(vartype > NC_MAX_ATOMIC_TYPE
176  || memtype > NC_MAX_ATOMIC_TYPE)
177  return NC_EBADTYPE;
178  /* ok, the types differ but both are atomic */
179  if(memtype == NC_CHAR || vartype == NC_CHAR)
180  return NC_ECHAR;
181  }
182 
183  /* Get the variable rank */
184  status = nc_inq_varndims(ncid, varid, &rank);
185  if(status != NC_NOERR) return status;
186 
187  /* Start array is always required for non-scalar vars. */
188  if(rank > 0 && start == NULL)
189  return NC_EINVALCOORDS;
190 
191  /* Get variable dimension sizes */
192  status = NC_inq_recvar(ncid,varid,&nrecdims,is_recdim);
193  if(status != NC_NOERR) return status;
194  isrecvar = (nrecdims > 0);
195  NC_getshape(ncid,varid,rank,varshape);
196 
197  /* Optimize out using various checks */
198  if (rank == 0) {
199  /*
200  * The variable is a scalar; consequently,
201  * there is only one thing to get and only one place to put it.
202  * (Why was I called?)
203  */
204  size_t edge1[1] = {1};
205  return NC_put_vara(ncid, varid, start, edge1, value0, memtype);
206  }
207 
208  /* Do various checks and fixups on start/edges/stride */
209  isstride1 = 1; /* assume so */
210  nels = 1;
211  for(i=0;i<rank;i++) {
212  size_t dimlen;
213  mystart[i] = (start == NULL ? 0 : start[i]);
214 #if 0
215  dimlen = (i == 0 && isrecvar ? numrecs : varshape[i]);
216  if(i == 0 && isrecvar) {/*do nothing*/}
217 #else
218  /* illegal value checks */
219  dimlen = varshape[i];
220  if(is_recdim[i]) {/*do nothing*/}
221 #endif
222  else {
223  /* mystart is unsigned, will never be < 0 */
224 #ifdef RELAX_COORD_BOUND
225  if (mystart[i] > dimlen) return NC_EINVALCOORDS;
226 #else
227  if (mystart[i] >= dimlen) return NC_EINVALCOORDS;
228 #endif
229  }
230  if(edges == NULL) {
231 #if 0
232  if(i == 0 && isrecvar)
233  myedges[i] = numrecs - start[i];
234 #else
235  if(is_recdim[i] && isrecvar)
236  myedges[i] = varshape[i] - start[i];
237 #endif
238  else
239  myedges[i] = varshape[i] - mystart[i];
240  } else
241  myedges[i] = edges[i];
242 #ifdef RELAX_COORD_BOUND
243  if(!is_recdim[i]) {
244  if (mystart[i] == dimlen && myedges[i] > 0)
245  return NC_EINVALCOORDS;
246  }
247 #endif
248  if(!is_recdim[i]) {
249  /* myediges is unsigned, will never be < 0 */
250  if(mystart[i] + myedges[i] > dimlen)
251  return NC_EEDGE;
252  }
253  mystride[i] = (stride == NULL ? 1 : stride[i]);
254  if(mystride[i] <= 0
255  /* cast needed for braindead systems with signed size_t */
256  || ((unsigned long) mystride[i] >= X_INT_MAX))
257  return NC_ESTRIDE;
258  if(mystride[i] != 1) isstride1 = 0;
259  nels *= myedges[i];
260  }
261 
262  if(isstride1) {
263  return NC_put_vara(ncid, varid, mystart, myedges, value, memtype);
264  }
265 
266  if(nels == 0) {
267  /* This should be here instead of before NC_put_vara call to
268  * avoid hang in parallel write for single stride.
269  * Still issue with parallel hang if stride > 1
270  */
271  return NC_NOERR; /* cannot write anything */
272  }
273 
274  /* Initial version uses and odometer to walk the variable
275  and read each value one at a time. This can later be optimized
276  to read larger chunks at a time.
277  */
278 
279 
280  odom_init(&odom,rank,mystart,myedges,mystride);
281 
282  /* walk the odometer to extract values */
283  while(odom_more(&odom)) {
284  int localstatus = NC_NOERR;
285  /* Write a single value */
286  localstatus = NC_put_vara(ncid,varid,odom.index,NC_coord_one,memptr,memtype);
287  /* So it turns out that when get_varm is used, all errors are
288  delayed and ERANGE will be overwritten by more serious errors.
289  */
290  if(localstatus != NC_NOERR) {
291  if(status == NC_NOERR || localstatus != NC_ERANGE)
292  status = localstatus;
293  }
294  memptr += memtypelen;
295  odom_next(&odom);
296  }
297  return status;
298 }
299 
303 int
304 NCDEFAULT_put_varm(
305  int ncid,
306  int varid,
307  const size_t * start,
308  const size_t * edges,
309  const ptrdiff_t * stride,
310  const ptrdiff_t * imapp,
311  const void *value0,
312  nc_type memtype)
313 {
314  int status = NC_NOERR;
315  nc_type vartype = NC_NAT;
316  int varndims = 0;
317  int maxidim = 0;
318  NC* ncp;
319  int memtypelen;
320  const char* value = (char*)value0;
321 
322  status = NC_check_id (ncid, &ncp);
323  if(status != NC_NOERR) return status;
324 
325 /*
326  if(NC_indef(ncp)) return NC_EINDEFINE;
327  if(NC_readonly (ncp)) return NC_EPERM;
328 */
329 
330  /* mid body */
331  status = nc_inq_vartype(ncid, varid, &vartype);
332  if(status != NC_NOERR) return status;
333  /* Check that this is an atomic type */
334  if(vartype > NC_MAX_ATOMIC_TYPE)
335  return NC_EMAPTYPE;
336 
337  status = nc_inq_varndims(ncid, varid, &varndims);
338  if(status != NC_NOERR) return status;
339 
340  if(memtype == NC_NAT) {
341  memtype = vartype;
342  }
343 
344  if(memtype == NC_CHAR && vartype != NC_CHAR)
345  return NC_ECHAR;
346  else if(memtype != NC_CHAR && vartype == NC_CHAR)
347  return NC_ECHAR;
348 
349  memtypelen = nctypelen(memtype);
350 
351  maxidim = (int) varndims - 1;
352 
353  if (maxidim < 0)
354  {
355  /*
356  * The variable is a scalar; consequently,
357  * there s only one thing to get and only one place to put it.
358  * (Why was I called?)
359  */
360  size_t edge1[1] = {1};
361  return NC_put_vara(ncid, varid, start, edge1, value, memtype);
362  }
363 
364  /*
365  * else
366  * The variable is an array.
367  */
368  {
369  int idim;
370  size_t *mystart = NULL;
371  size_t *myedges = 0;
372  size_t *iocount= 0; /* count vector */
373  size_t *stop = 0; /* stop indexes */
374  size_t *length = 0; /* edge lengths in bytes */
375  ptrdiff_t *mystride = 0;
376  ptrdiff_t *mymap= 0;
377  size_t varshape[NC_MAX_VAR_DIMS];
378  int isrecvar;
379  size_t numrecs;
380  int stride1; /* is stride all ones? */
381 
382  /*
383  * Verify stride argument.
384  */
385  stride1 = 1; /* assume ok; */
386  if(stride != NULL) {
387  for (idim = 0; idim <= maxidim; ++idim) {
388  if ((stride[idim] == 0)
389  /* cast needed for braindead systems with signed size_t */
390  || ((unsigned long) stride[idim] >= X_INT_MAX))
391  {
392  return NC_ESTRIDE;
393  }
394  if(stride[idim] != 1) stride1 = 0;
395  }
396  }
397 
398  /* If stride1 is true, and there is no imap, then call get_vara
399  directly
400  */
401  if(stride1 && imapp == NULL) {
402  return NC_put_vara(ncid, varid, start, edges, value, memtype);
403  }
404 
405  /* Compute some dimension related values */
406  isrecvar = NC_is_recvar(ncid,varid,&numrecs);
407  NC_getshape(ncid,varid,varndims,varshape);
408 
409  /* assert(sizeof(ptrdiff_t) >= sizeof(size_t)); */
410  mystart = (size_t *)calloc((size_t)(varndims * 7), sizeof(ptrdiff_t));
411  if(mystart == NULL) return NC_ENOMEM;
412  myedges = mystart + varndims;
413  iocount = myedges + varndims;
414  stop = iocount + varndims;
415  length = stop + varndims;
416  mystride = (ptrdiff_t *)(length + varndims);
417  mymap = mystride + varndims;
418 
419  /*
420  * Check start, edges
421  */
422  for (idim = maxidim; idim >= 0; --idim)
423  {
424  mystart[idim] = start != NULL
425  ? start[idim]
426  : 0;
427 
428  myedges[idim] = edges != NULL
429  ? edges[idim]
430  : idim == 0 && isrecvar
431  ? numrecs - mystart[idim]
432  : varshape[idim] - mystart[idim];
433  }
434 
435  for (idim = isrecvar; idim <= maxidim; ++idim)
436  {
437 #ifdef RELAX_COORD_BOUND
438  if (mystart[idim] > varshape[idim] ||
439  (mystart[idim] == varshape[idim] && myedges[idim] > 0))
440 #else
441  if (mystart[idim] >= varshape[idim])
442 #endif
443  {
444  status = NC_EINVALCOORDS;
445  goto done;
446  }
447 
448  if (mystart[idim] + myedges[idim] > varshape[idim])
449  {
450  status = NC_EEDGE;
451  goto done;
452  }
453  }
454 
455  /*
456  * Initialize I/O parameters.
457  */
458  for (idim = maxidim; idim >= 0; --idim)
459  {
460  if (edges != NULL && edges[idim] == 0)
461  {
462  status = NC_NOERR; /* read/write no data */
463  goto done;
464  }
465 
466  mystride[idim] = stride != NULL
467  ? stride[idim]
468  : 1;
469  mymap[idim] = imapp != NULL
470  ? imapp[idim]
471  : idim == maxidim
472  ? 1
473  : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
474 
475  iocount[idim] = 1;
476  length[idim] = ((size_t)mymap[idim]) * myedges[idim];
477  stop[idim] = mystart[idim] + myedges[idim] * (size_t)mystride[idim];
478  }
479 
480  /* Lower body */
481  /*
482  * As an optimization, adjust I/O parameters when the fastest
483  * dimension has unity stride both externally and internally.
484  * In this case, the user could have called a simpler routine
485  * (i.e. ncvar$1()
486  */
487  if (mystride[maxidim] == 1
488  && mymap[maxidim] == 1)
489  {
490  iocount[maxidim] = myedges[maxidim];
491  mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
492  mymap[maxidim] = (ptrdiff_t) length[maxidim];
493  }
494 
495  /*
496  * Perform I/O. Exit when done.
497  */
498  for (;;)
499  {
500  /* TODO: */
501  int lstatus = NC_put_vara(ncid, varid, mystart, iocount,
502  value, memtype);
503  if (lstatus != NC_NOERR) {
504  if(status == NC_NOERR || lstatus != NC_ERANGE)
505  status = lstatus;
506  }
507 
508  /*
509  * The following code permutes through the variable s
510  * external start-index space and it s internal address
511  * space. At the UPC, this algorithm is commonly
512  * called "odometer code".
513  */
514  idim = maxidim;
515  carry:
516  value += (mymap[idim] * memtypelen);
517  mystart[idim] += (size_t)mystride[idim];
518  if (mystart[idim] == stop[idim])
519  {
520  size_t l = (length[idim] * (size_t)memtypelen);
521  value -= l;
522  mystart[idim] = start[idim];
523  if (--idim < 0)
524  break; /* normal return */
525  goto carry;
526  }
527  } /* I/O loop */
528  done:
529  free(mystart);
530  } /* variable is array */
531  return status;
532 }
533 
537 static int
538 NC_put_vars(int ncid, int varid, const size_t *start,
539  const size_t *edges, const ptrdiff_t *stride,
540  const void *value, nc_type memtype)
541 {
542  NC* ncp;
543  size_t *my_count = (size_t *)edges;
544  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
545  int stat;
546 
547  stat = NC_check_id(ncid, &ncp);
548  if(stat != NC_NOERR) return stat;
549 
550  /* Handle any NULL parameters. */
551  if(start == NULL || edges == NULL || stride == NULL) {
552  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
553  if(stat != NC_NOERR) return stat;
554  }
555 
556  stat = ncp->dispatch->put_vars(ncid, varid, start, my_count, my_stride,
557  value, memtype);
558  if(edges == NULL) free(my_count);
559  if(stride == NULL) free(my_stride);
560  return stat;
561 }
562 
566 static int
567 NC_put_varm(int ncid, int varid, const size_t *start,
568  const size_t *edges, const ptrdiff_t *stride, const ptrdiff_t* map,
569  const void *value, nc_type memtype)
570 {
571  NC* ncp;
572  size_t *my_count = (size_t *)edges;
573  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
574  int stat;
575 
576  stat = NC_check_id(ncid, &ncp);
577  if(stat != NC_NOERR) return stat;
578 
579  /* Handle any NULL parameters. */
580  if(start == NULL || edges == NULL || stride == NULL) {
581  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
582  if(stat != NC_NOERR) return stat;
583  }
584 
585  stat = ncp->dispatch->put_varm(ncid, varid, start, my_count, my_stride,
586  map, value, memtype);
587  if(edges == NULL) free(my_count);
588  if(stride == NULL) free(my_stride);
589  return stat;
590 }
591  /* All these functions are part of this named group... */
596 
638 int
639 nc_put_vara(int ncid, int varid, const size_t *startp,
640  const size_t *countp, const void *op)
641 {
642  NC* ncp;
643  int stat = NC_check_id(ncid, &ncp);
644  nc_type xtype;
645  if(stat != NC_NOERR) return stat;
646  stat = nc_inq_vartype(ncid, varid, &xtype);
647  if(stat != NC_NOERR) return stat;
648  return NC_put_vara(ncid, varid, startp, countp, op, xtype);
649 }
650 
651 int
652 nc_put_vara_text(int ncid, int varid, const size_t *startp,
653  const size_t *countp, const char *op)
654 {
655  return NC_put_vara(ncid, varid, startp, countp,
656  (void*)op, NC_CHAR);
657 }
658 
659 int
660 nc_put_vara_schar(int ncid, int varid, const size_t *startp,
661  const size_t *countp, const signed char *op)
662 {
663  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
664  NC_BYTE);
665 }
666 
667 int
668 nc_put_vara_uchar(int ncid, int varid, const size_t *startp,
669  const size_t *countp, const unsigned char *op)
670 {
671  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
672  T_uchar);
673 }
674 
675 int
676 nc_put_vara_short(int ncid, int varid, const size_t *startp,
677  const size_t *countp, const short *op)
678 {
679  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
680  NC_SHORT);
681 }
682 
683 int
684 nc_put_vara_int(int ncid, int varid, const size_t *startp,
685  const size_t *countp, const int *op)
686 {
687  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
688  NC_INT);
689 }
690 
691 int
692 nc_put_vara_long(int ncid, int varid, const size_t *startp,
693  const size_t *countp, const long *op)
694 {
695  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
696  T_long);
697 }
698 
699 int
700 nc_put_vara_float(int ncid, int varid, const size_t *startp,
701  const size_t *countp, const float *op)
702 {
703  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
704  T_float);
705 }
706 
707 int
708 nc_put_vara_double(int ncid, int varid, const size_t *startp,
709  const size_t *countp, const double *op)
710 {
711  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
712  T_double);
713 }
714 
715 int
716 nc_put_vara_ubyte(int ncid, int varid, const size_t *startp,
717  const size_t *countp, const unsigned char *op)
718 {
719  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
720  T_ubyte);
721 }
722 
723 int
724 nc_put_vara_ushort(int ncid, int varid, const size_t *startp,
725  const size_t *countp, const unsigned short *op)
726 {
727  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
728  T_ushort);
729 }
730 
731 int
732 nc_put_vara_uint(int ncid, int varid, const size_t *startp,
733  const size_t *countp, const unsigned int *op)
734 {
735  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
736  T_uint);
737 }
738 
739 int
740 nc_put_vara_longlong(int ncid, int varid, const size_t *startp,
741  const size_t *countp, const long long *op)
742 {
743  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
744  T_longlong);
745 }
746 
747 int
748 nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp,
749  const size_t *countp, const unsigned long long *op)
750 {
751  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
752  NC_UINT64);
753 }
754 
755 int
756 nc_put_vara_string(int ncid, int varid, const size_t *startp,
757  const size_t *countp, const char* *op)
758 {
759  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
760  NC_STRING);
761 }
762 
788 int
789 nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
790 {
791  return NC_put_var1(ncid, varid, indexp, op, NC_NAT);
792 }
793 
794 int
795 nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
796 {
797  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_CHAR);
798 }
799 
800 int
801 nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
802 {
803  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_BYTE);
804 }
805 
806 int
807 nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
808 {
809  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
810 }
811 
812 int
813 nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
814 {
815  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_SHORT);
816 }
817 
818 int
819 nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
820 {
821  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT);
822 }
823 
824 int
825 nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
826 {
827  return NC_put_var1(ncid, varid, indexp, (void*)op, longtype);
828 }
829 
830 int
831 nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
832 {
833  return NC_put_var1(ncid, varid, indexp, (void*)op, NC_FLOAT);
834 }
835 
836 int
837 nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
838 {
839  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_DOUBLE);
840 }
841 
842 int
843 nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
844 {
845  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
846 }
847 
848 int
849 nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
850 {
851  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_USHORT);
852 }
853 
854 int
855 nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
856 {
857  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT);
858 }
859 
860 int
861 nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
862 {
863  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT64);
864 }
865 
866 int
867 nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
868 {
869  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT64);
870 }
871 
872 int
873 nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char* *op)
874 {
875  return NC_put_var1(ncid, varid, indexp, (void*)op, NC_STRING);
876 }
877 
927 int
928 nc_put_var(int ncid, int varid, const void *op)
929 {
930  return NC_put_var(ncid, varid, op, NC_NAT);
931 }
932 
933 int
934 nc_put_var_text(int ncid, int varid, const char *op)
935 {
936  return NC_put_var(ncid,varid,(void*)op,NC_CHAR);
937 }
938 
939 int
940 nc_put_var_schar(int ncid, int varid, const signed char *op)
941 {
942  return NC_put_var(ncid,varid,(void*)op,NC_BYTE);
943 }
944 
945 int
946 nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
947 {
948  return NC_put_var(ncid,varid,(void*)op,T_uchar);
949 }
950 
951 int
952 nc_put_var_short(int ncid, int varid, const short *op)
953 {
954  return NC_put_var(ncid,varid,(void*)op,NC_SHORT);
955 }
956 
957 int
958 nc_put_var_int(int ncid, int varid, const int *op)
959 {
960  return NC_put_var(ncid,varid,(void*)op,NC_INT);
961 }
962 
963 int
964 nc_put_var_long(int ncid, int varid, const long *op)
965 {
966  return NC_put_var(ncid,varid,(void*)op,T_long);
967 }
968 
969 int
970 nc_put_var_float(int ncid, int varid, const float *op)
971 {
972  return NC_put_var(ncid,varid,(void*)op,T_float);
973 }
974 
975 int
976 nc_put_var_double(int ncid, int varid, const double *op)
977 {
978  return NC_put_var(ncid,varid,(void*)op,T_double);
979 }
980 
981 int
982 nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
983 {
984  return NC_put_var(ncid,varid,(void*)op,T_ubyte);
985 }
986 
987 int
988 nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
989 {
990  return NC_put_var(ncid,varid,(void*)op,T_ushort);
991 }
992 
993 int
994 nc_put_var_uint(int ncid, int varid, const unsigned int *op)
995 {
996  return NC_put_var(ncid,varid,(void*)op,T_uint);
997 }
998 
999 int
1000 nc_put_var_longlong(int ncid, int varid, const long long *op)
1001 {
1002  return NC_put_var(ncid,varid,(void*)op,T_longlong);
1003 }
1004 
1005 int
1006 nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
1007 {
1008  return NC_put_var(ncid,varid,(void*)op,NC_UINT64);
1009 }
1010 
1011 int
1012 nc_put_var_string(int ncid, int varid, const char* *op)
1013 {
1014  return NC_put_var(ncid,varid,(void*)op,NC_STRING);
1015 }
1016 
1050 int
1051 nc_put_vars(int ncid, int varid, const size_t *startp,
1052  const size_t *countp, const ptrdiff_t *stridep,
1053  const void *op)
1054 {
1055  return NC_put_vars(ncid, varid, startp, countp, stridep, op, NC_NAT);
1056 }
1057 
1058 int
1059 nc_put_vars_text(int ncid, int varid, const size_t *startp,
1060  const size_t *countp, const ptrdiff_t *stridep,
1061  const char *op)
1062 {
1063  return NC_put_vars(ncid, varid, startp, countp,
1064  stridep,(void*)op,NC_CHAR);
1065 }
1066 
1067 int
1068 nc_put_vars_schar(int ncid, int varid, const size_t *startp,
1069  const size_t *countp, const ptrdiff_t *stridep,
1070  const signed char *op)
1071 {
1072  return NC_put_vars(ncid, varid, startp, countp,
1073  stridep,(void*)op,NC_BYTE);
1074 }
1075 
1076 int
1077 nc_put_vars_uchar(int ncid, int varid,
1078  const size_t *startp, const size_t *countp,
1079  const ptrdiff_t *stridep,
1080  const unsigned char *op)
1081 {
1082  return NC_put_vars(ncid, varid, startp, countp,
1083  stridep, (void *)op, T_uchar);
1084 }
1085 
1086 int
1087 nc_put_vars_short(int ncid, int varid,
1088  const size_t *startp, const size_t *countp,
1089  const ptrdiff_t *stridep,
1090  const short *op)
1091 {
1092  return NC_put_vars(ncid, varid, startp, countp,
1093  stridep, (void *)op, NC_SHORT);
1094 }
1095 
1096 int
1097 nc_put_vars_int(int ncid, int varid,
1098  const size_t *startp, const size_t *countp,
1099  const ptrdiff_t *stridep,
1100  const int *op)
1101 {
1102  return NC_put_vars(ncid, varid, startp, countp,
1103  stridep, (void *)op, NC_INT);
1104 }
1105 
1106 int
1107 nc_put_vars_long(int ncid, int varid,
1108  const size_t *startp, const size_t *countp,
1109  const ptrdiff_t *stridep,
1110  const long *op)
1111 {
1112  return NC_put_vars(ncid, varid, startp, countp,
1113  stridep, (void *)op, T_long);
1114 }
1115 
1116 int
1117 nc_put_vars_float(int ncid, int varid,
1118  const size_t *startp, const size_t *countp,
1119  const ptrdiff_t *stridep,
1120  const float *op)
1121 {
1122  return NC_put_vars(ncid, varid, startp, countp,
1123  stridep, (void *)op, T_float);
1124 }
1125 
1126 int
1127 nc_put_vars_double(int ncid, int varid,
1128  const size_t *startp, const size_t *countp,
1129  const ptrdiff_t *stridep,
1130  const double *op)
1131 {
1132  return NC_put_vars(ncid, varid, startp, countp,
1133  stridep, (void *)op, T_double);
1134 }
1135 
1136 int
1137 nc_put_vars_ubyte(int ncid, int varid,
1138  const size_t *startp, const size_t *countp,
1139  const ptrdiff_t *stridep,
1140  const unsigned char *op)
1141 {
1142  return NC_put_vars(ncid, varid, startp, countp,
1143  stridep, (void *)op, T_ubyte);
1144 }
1145 
1146 int
1147 nc_put_vars_ushort(int ncid, int varid,
1148  const size_t *startp, const size_t *countp,
1149  const ptrdiff_t *stridep,
1150  const unsigned short *op)
1151 {
1152  return NC_put_vars(ncid, varid, startp, countp,
1153  stridep, (void *)op, T_ushort);
1154 }
1155 
1156 int
1157 nc_put_vars_uint(int ncid, int varid,
1158  const size_t *startp, const size_t *countp,
1159  const ptrdiff_t *stridep,
1160  const unsigned int *op)
1161 {
1162  return NC_put_vars(ncid, varid, startp, countp,
1163  stridep, (void *)op, T_uint);
1164 }
1165 
1166 int
1167 nc_put_vars_longlong(int ncid, int varid,
1168  const size_t *startp, const size_t *countp,
1169  const ptrdiff_t *stridep,
1170  const long long *op)
1171 {
1172  return NC_put_vars(ncid, varid, startp, countp,
1173  stridep, (void *)op, T_longlong);
1174 }
1175 
1176 int
1177 nc_put_vars_ulonglong(int ncid, int varid,
1178  const size_t *startp, const size_t *countp,
1179  const ptrdiff_t *stridep,
1180  const unsigned long long *op)
1181 {
1182  return NC_put_vars(ncid, varid, startp, countp,
1183  stridep, (void *)op, NC_UINT64);
1184 }
1185 
1186 int
1187 nc_put_vars_string(int ncid, int varid,
1188  const size_t *startp, const size_t *countp,
1189  const ptrdiff_t *stridep,
1190  const char**op)
1191 {
1192  return NC_put_vars(ncid, varid, startp, countp, stridep,
1193  (void *)op, NC_STRING);
1194 }
1195 
1242 int
1243 nc_put_varm(int ncid, int varid, const size_t *startp,
1244  const size_t *countp, const ptrdiff_t *stridep,
1245  const ptrdiff_t *imapp, const void *op)
1246 {
1247  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp, op, NC_NAT);
1248 }
1249 
1250 int
1251 nc_put_varm_text(int ncid, int varid, const size_t *startp,
1252  const size_t *countp, const ptrdiff_t *stridep,
1253  const ptrdiff_t *imapp, const char *op)
1254 {
1255  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1256  (void *)op, NC_CHAR);
1257 }
1258 
1259 int
1260 nc_put_varm_schar(int ncid, int varid,
1261  const size_t *startp, const size_t *countp,
1262  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1263  const signed char *op)
1264 {
1265  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1266  (void *)op, NC_BYTE);
1267 }
1268 
1269 int
1270 nc_put_varm_uchar(int ncid, int varid,
1271  const size_t *startp, const size_t *countp,
1272  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1273  const unsigned char *op)
1274 {
1275  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1276  (void *)op, T_uchar);
1277 }
1278 
1279 int
1280 nc_put_varm_short(int ncid, int varid,
1281  const size_t *startp, const size_t *countp,
1282  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1283  const short *op)
1284 {
1285  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1286  (void *)op, NC_SHORT);
1287 }
1288 
1289 int
1290 nc_put_varm_int(int ncid, int varid,
1291  const size_t *startp, const size_t *countp,
1292  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1293  const int *op)
1294 {
1295  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1296  (void *)op, NC_INT);
1297 }
1298 
1299 int
1300 nc_put_varm_long(int ncid, int varid,
1301  const size_t *startp, const size_t *countp,
1302  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1303  const long *op)
1304 {
1305  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1306  (void *)op, T_long);
1307 }
1308 
1309 int
1310 nc_put_varm_float(int ncid, int varid,
1311  const size_t *startp, const size_t *countp,
1312  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1313  const float *op)
1314 {
1315  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1316  (void *)op, T_float);
1317 }
1318 
1319 int
1320 nc_put_varm_double(int ncid, int varid,
1321  const size_t *startp, const size_t *countp,
1322  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1323  const double *op)
1324 {
1325  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1326  (void *)op, T_double);
1327 }
1328 
1329 int
1330 nc_put_varm_ubyte(int ncid, int varid,
1331  const size_t *startp, const size_t *countp,
1332  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1333  const unsigned char *op)
1334 {
1335  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1336  (void *)op, T_ubyte);
1337 }
1338 
1339 int
1340 nc_put_varm_ushort(int ncid, int varid,
1341  const size_t *startp, const size_t *countp,
1342  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1343  const unsigned short *op)
1344 {
1345  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1346  (void *)op, T_ushort);
1347 }
1348 
1349 int
1350 nc_put_varm_uint(int ncid, int varid,
1351  const size_t *startp, const size_t *countp,
1352  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1353  const unsigned int *op)
1354 {
1355  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1356  (void *)op, T_uint);
1357 }
1358 
1359 int
1360 nc_put_varm_longlong(int ncid, int varid,
1361  const size_t *startp, const size_t *countp,
1362  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1363  const long long *op)
1364 {
1365  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1366  (void *)op, T_longlong);
1367 }
1368 
1369 int
1370 nc_put_varm_ulonglong(int ncid, int varid,
1371  const size_t *startp, const size_t *countp,
1372  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1373  const unsigned long long *op)
1374 {
1375  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1376  (void *)op, NC_UINT64);
1377 }
1378 
1379 int
1380 nc_put_varm_string(int ncid, int varid,
1381  const size_t *startp, const size_t *countp,
1382  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1383  const char**op)
1384 {
1385  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1386  (void *)op, NC_STRING);
1387 }
1388  /*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_put_vara_uchar
int nc_put_vara_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Definition: dvarput.c:668
nc_put_var_ubyte
int nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
Definition: dvarput.c:982
nc_put_vars_long
int nc_put_vars_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const long *op)
Definition: dvarput.c:1107
nc_put_var1_short
int nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
Definition: dvarput.c:813
nc_put_vars_string
int nc_put_vars_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char **op)
Definition: dvarput.c:1187
nc_put_vara_short
int nc_put_vara_short(int ncid, int varid, const size_t *startp, const size_t *countp, const short *op)
Definition: dvarput.c:676
NC_FLOAT
#define NC_FLOAT
single precision floating point number
Definition: netcdf.h:40
nc_put_vara_uint
int nc_put_vara_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned int *op)
Definition: dvarput.c:732
NC_DOUBLE
#define NC_DOUBLE
double precision floating point number
Definition: netcdf.h:41
nc_put_vara_schar
int nc_put_vara_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const signed char *op)
Definition: dvarput.c:660
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_put_var_int
int nc_put_var_int(int ncid, int varid, const int *op)
Definition: dvarput.c:958
nc_put_var1_double
int nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
Definition: dvarput.c:837
nc_put_var1_uchar
int nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Definition: dvarput.c:807
nc_put_var_string
int nc_put_var_string(int ncid, int varid, const char **op)
Definition: dvarput.c:1012
nc_put_vars_ulonglong
int nc_put_vars_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned long long *op)
Definition: dvarput.c:1177
nc_put_vara_ubyte
int nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Definition: dvarput.c:716
nc_put_vars_ushort
int nc_put_vars_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned short *op)
Definition: dvarput.c:1147
NC_EEDGE
#define NC_EEDGE
Start+count exceeds dimension bound.
Definition: netcdf.h:395
nc_put_var_long
int nc_put_var_long(int ncid, int varid, const long *op)
Definition: dvarput.c:964
nc_put_vars_text
int nc_put_vars_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char *op)
Definition: dvarput.c:1059
nc_put_var1_float
int nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
Definition: dvarput.c:831
nc_put_var1_string
int nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char **op)
Definition: dvarput.c:873
NC_BYTE
#define NC_BYTE
signed 1 byte integer
Definition: netcdf.h:35
nc_put_varm_string
int nc_put_varm_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const char **op)
Definition: dvarput.c:1380
nc_put_var_uint
int nc_put_var_uint(int ncid, int varid, const unsigned int *op)
Definition: dvarput.c:994
nc_put_varm_ubyte
int nc_put_varm_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned char *op)
Definition: dvarput.c:1330
nc_put_var_schar
int nc_put_var_schar(int ncid, int varid, const signed char *op)
Definition: dvarput.c:940
nc_put_vars_double
int nc_put_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const double *op)
Definition: dvarput.c:1127
nc_put_var1_schar
int nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
Definition: dvarput.c:801
nc_put_vars_uchar
int nc_put_vars_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned char *op)
Definition: dvarput.c:1077
NC_INT
#define NC_INT
signed 4 byte integer
Definition: netcdf.h:38
nc_put_varm_double
int nc_put_varm_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const double *op)
Definition: dvarput.c:1320
nc_put_vars_float
int nc_put_vars_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const float *op)
Definition: dvarput.c:1117
nc_put_vars
int nc_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const void *op)
Definition: dvarput.c:1051
NC_UBYTE
#define NC_UBYTE
unsigned 1 byte int
Definition: netcdf.h:42
nc_put_vars_ubyte
int nc_put_vars_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned char *op)
Definition: dvarput.c:1137
nc_put_vara
int nc_put_vara(int ncid, int varid, const size_t *startp, const size_t *countp, const void *op)
Definition: dvarput.c:639
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_put_varm_int
int nc_put_varm_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const int *op)
Definition: dvarput.c:1290
NC_MAX_VAR_DIMS
#define NC_MAX_VAR_DIMS
max per variable dimensions
Definition: netcdf.h:276
nc_put_vara_string
int nc_put_vara_string(int ncid, int varid, const size_t *startp, const size_t *countp, const char **op)
Definition: dvarput.c:756
nc_put_var_ulonglong
int nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
Definition: dvarput.c:1006
nc_put_var1
int nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
Definition: dvarput.c:789
nc_put_varm_text
int nc_put_varm_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const char *op)
Definition: dvarput.c:1251
nc_put_var_longlong
int nc_put_var_longlong(int ncid, int varid, const long long *op)
Definition: dvarput.c:1000
nc_put_varm_longlong
int nc_put_varm_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const long long *op)
Definition: dvarput.c:1360
nc_put_varm
int nc_put_varm(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const void *op)
Definition: dvarput.c:1243
nc_put_vars_short
int nc_put_vars_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const short *op)
Definition: dvarput.c:1087
nc_put_var1_long
int nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
Definition: dvarput.c:825
nc_put_var
int nc_put_var(int ncid, int varid, const void *op)
Definition: dvarput.c:928
nc_put_var_ushort
int nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
Definition: dvarput.c:988
nc_put_varm_short
int nc_put_varm_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const short *op)
Definition: dvarput.c:1280
nc_put_vara_text
int nc_put_vara_text(int ncid, int varid, const size_t *startp, const size_t *countp, const char *op)
Definition: dvarput.c:652
nc_put_vara_longlong
int nc_put_vara_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const long long *op)
Definition: dvarput.c:740
nc_put_vara_ulonglong
int nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned long long *op)
Definition: dvarput.c:748
nc_put_varm_ulonglong
int nc_put_varm_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned long long *op)
Definition: dvarput.c:1370
nc_put_var1_ulonglong
int nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
Definition: dvarput.c:867
nc_put_var1_uint
int nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
Definition: dvarput.c:855
nc_put_varm_schar
int nc_put_varm_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const signed char *op)
Definition: dvarput.c:1260
nc_inq_type
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Definition: dfile.c:1699
nc_put_vara_long
int nc_put_vara_long(int ncid, int varid, const size_t *startp, const size_t *countp, const long *op)
Definition: dvarput.c:692
nc_put_var1_text
int nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
Definition: dvarput.c:795
NC_SHORT
#define NC_SHORT
signed 2 byte integer
Definition: netcdf.h:37
nc_put_var1_ubyte
int nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Definition: dvarput.c:843
nc_put_var_float
int nc_put_var_float(int ncid, int varid, const float *op)
Definition: dvarput.c:970
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_put_var_double
int nc_put_var_double(int ncid, int varid, const double *op)
Definition: dvarput.c:976
nc_put_varm_uint
int nc_put_varm_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned int *op)
Definition: dvarput.c:1350
NC_EBADTYPE
#define NC_EBADTYPE
Not a netcdf data type.
Definition: netcdf.h:367
NC_ECHAR
#define NC_ECHAR
Attempt to convert between text & numbers.
Definition: netcdf.h:386
nc_put_var_short
int nc_put_var_short(int ncid, int varid, const short *op)
Definition: dvarput.c:952
nc_put_var1_int
int nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
Definition: dvarput.c:819
nc_put_vars_schar
int nc_put_vars_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const signed char *op)
Definition: dvarput.c:1068
nc_put_vara_int
int nc_put_vara_int(int ncid, int varid, const size_t *startp, const size_t *countp, const int *op)
Definition: dvarput.c:684
NC_EINVALCOORDS
#define NC_EINVALCOORDS
Index exceeds dimension bound.
Definition: netcdf.h:357
nc_put_var_text
int nc_put_var_text(int ncid, int varid, const char *op)
Definition: dvarput.c:934
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_put_vara_ushort
int nc_put_vara_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned short *op)
Definition: dvarput.c:724
NC_UINT64
#define NC_UINT64
unsigned 8-byte int
Definition: netcdf.h:46
NC_UINT
#define NC_UINT
unsigned 4-byte int
Definition: netcdf.h:44
NC_STRING
#define NC_STRING
string
Definition: netcdf.h:47
nc_put_vars_uint
int nc_put_vars_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const unsigned int *op)
Definition: dvarput.c:1157
nc_put_varm_ushort
int nc_put_varm_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned short *op)
Definition: dvarput.c:1340
nc_put_var1_longlong
int nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
Definition: dvarput.c:861
nc_put_varm_long
int nc_put_varm_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const long *op)
Definition: dvarput.c:1300
nc_put_varm_uchar
int nc_put_varm_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const unsigned char *op)
Definition: dvarput.c:1270
nc_put_var_uchar
int nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
Definition: dvarput.c:946
nc_put_vara_double
int nc_put_vara_double(int ncid, int varid, const size_t *startp, const size_t *countp, const double *op)
Definition: dvarput.c:708
nc_put_vars_longlong
int nc_put_vars_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const long long *op)
Definition: dvarput.c:1167
nc_put_vars_int
int nc_put_vars_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const int *op)
Definition: dvarput.c:1097
NC_CHAR
#define NC_CHAR
ISO/ASCII character.
Definition: netcdf.h:36
NC_ESTRIDE
#define NC_ESTRIDE
Illegal stride.
Definition: netcdf.h:396
nc_put_var1_ushort
int nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
Definition: dvarput.c:849
nc_put_vara_float
int nc_put_vara_float(int ncid, int varid, const size_t *startp, const size_t *countp, const float *op)
Definition: dvarput.c:700
nc_put_varm_float
int nc_put_varm_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const ptrdiff_t *imapp, const float *op)
Definition: dvarput.c:1310
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.