NetCDF  4.9.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  if (mystart[i] > dimlen) return NC_EINVALCOORDS;
225  }
226  if(edges == NULL) {
227 #if 0
228  if(i == 0 && isrecvar)
229  myedges[i] = numrecs - start[i];
230 #else
231  if(is_recdim[i] && isrecvar)
232  myedges[i] = varshape[i] - start[i];
233 #endif
234  else
235  myedges[i] = varshape[i] - mystart[i];
236  } else
237  myedges[i] = edges[i];
238 
239  if(!is_recdim[i]) {
240  if (mystart[i] == dimlen && myedges[i] > 0)
241  return NC_EINVALCOORDS;
242  }
243 
244  if(!is_recdim[i]) {
245  /* myediges is unsigned, will never be < 0 */
246  if(mystart[i] + myedges[i] > dimlen)
247  return NC_EEDGE;
248  }
249  mystride[i] = (stride == NULL ? 1 : stride[i]);
250  if(mystride[i] <= 0
251  /* cast needed for braindead systems with signed size_t */
252  || ((unsigned long) mystride[i] >= X_INT_MAX))
253  return NC_ESTRIDE;
254  if(mystride[i] != 1) isstride1 = 0;
255  nels *= myedges[i];
256  }
257 
258  if(isstride1) {
259  return NC_put_vara(ncid, varid, mystart, myedges, value, memtype);
260  }
261 
262  if(nels == 0) {
263  /* This should be here instead of before NC_put_vara call to
264  * avoid hang in parallel write for single stride.
265  * Still issue with parallel hang if stride > 1
266  */
267  return NC_NOERR; /* cannot write anything */
268  }
269 
270  /* Initial version uses and odometer to walk the variable
271  and read each value one at a time. This can later be optimized
272  to read larger chunks at a time.
273  */
274 
275 
276  odom_init(&odom,rank,mystart,myedges,mystride);
277 
278  /* walk the odometer to extract values */
279  while(odom_more(&odom)) {
280  int localstatus = NC_NOERR;
281  /* Write a single value */
282  localstatus = NC_put_vara(ncid,varid,odom.index,NC_coord_one,memptr,memtype);
283  /* So it turns out that when get_varm is used, all errors are
284  delayed and ERANGE will be overwritten by more serious errors.
285  */
286  if(localstatus != NC_NOERR) {
287  if(status == NC_NOERR || localstatus != NC_ERANGE)
288  status = localstatus;
289  }
290  memptr += memtypelen;
291  odom_next(&odom);
292  }
293  return status;
294 }
295 
299 int
300 NCDEFAULT_put_varm(
301  int ncid,
302  int varid,
303  const size_t * start,
304  const size_t * edges,
305  const ptrdiff_t * stride,
306  const ptrdiff_t * imapp,
307  const void *value0,
308  nc_type memtype)
309 {
310  int status = NC_NOERR;
311  nc_type vartype = NC_NAT;
312  int varndims = 0;
313  int maxidim = 0;
314  NC* ncp;
315  int memtypelen;
316  const char* value = (char*)value0;
317 
318  status = NC_check_id (ncid, &ncp);
319  if(status != NC_NOERR) return status;
320 
321 /*
322  if(NC_indef(ncp)) return NC_EINDEFINE;
323  if(NC_readonly (ncp)) return NC_EPERM;
324 */
325 
326  /* mid body */
327  status = nc_inq_vartype(ncid, varid, &vartype);
328  if(status != NC_NOERR) return status;
329  /* Check that this is an atomic type */
330  if(vartype > NC_MAX_ATOMIC_TYPE)
331  return NC_EMAPTYPE;
332 
333  status = nc_inq_varndims(ncid, varid, &varndims);
334  if(status != NC_NOERR) return status;
335 
336  if(memtype == NC_NAT) {
337  memtype = vartype;
338  }
339 
340  if(memtype == NC_CHAR && vartype != NC_CHAR)
341  return NC_ECHAR;
342  else if(memtype != NC_CHAR && vartype == NC_CHAR)
343  return NC_ECHAR;
344 
345  memtypelen = nctypelen(memtype);
346 
347  maxidim = (int) varndims - 1;
348 
349  if (maxidim < 0)
350  {
351  /*
352  * The variable is a scalar; consequently,
353  * there s only one thing to get and only one place to put it.
354  * (Why was I called?)
355  */
356  size_t edge1[1] = {1};
357  return NC_put_vara(ncid, varid, start, edge1, value, memtype);
358  }
359 
360  /*
361  * else
362  * The variable is an array.
363  */
364  {
365  int idim;
366  size_t *mystart = NULL;
367  size_t *myedges = 0;
368  size_t *iocount= 0; /* count vector */
369  size_t *stop = 0; /* stop indexes */
370  size_t *length = 0; /* edge lengths in bytes */
371  ptrdiff_t *mystride = 0;
372  ptrdiff_t *mymap= 0;
373  size_t varshape[NC_MAX_VAR_DIMS];
374  int isrecvar;
375  size_t numrecs;
376  int stride1; /* is stride all ones? */
377 
378  /*
379  * Verify stride argument.
380  */
381  stride1 = 1; /* assume ok; */
382  if(stride != NULL) {
383  for (idim = 0; idim <= maxidim; ++idim) {
384  if ((stride[idim] == 0)
385  /* cast needed for braindead systems with signed size_t */
386  || ((unsigned long) stride[idim] >= X_INT_MAX))
387  {
388  return NC_ESTRIDE;
389  }
390  if(stride[idim] != 1) stride1 = 0;
391  }
392  }
393 
394  /* If stride1 is true, and there is no imap, then call get_vara
395  directly
396  */
397  if(stride1 && imapp == NULL) {
398  return NC_put_vara(ncid, varid, start, edges, value, memtype);
399  }
400 
401  /* Compute some dimension related values */
402  isrecvar = NC_is_recvar(ncid,varid,&numrecs);
403  NC_getshape(ncid,varid,varndims,varshape);
404 
405  /* assert(sizeof(ptrdiff_t) >= sizeof(size_t)); */
406  mystart = (size_t *)calloc((size_t)(varndims * 7), sizeof(ptrdiff_t));
407  if(mystart == NULL) return NC_ENOMEM;
408  myedges = mystart + varndims;
409  iocount = myedges + varndims;
410  stop = iocount + varndims;
411  length = stop + varndims;
412  mystride = (ptrdiff_t *)(length + varndims);
413  mymap = mystride + varndims;
414 
415  /*
416  * Check start, edges
417  */
418  for (idim = maxidim; idim >= 0; --idim)
419  {
420  mystart[idim] = start != NULL
421  ? start[idim]
422  : 0;
423 
424  myedges[idim] = edges != NULL
425  ? edges[idim]
426  : idim == 0 && isrecvar
427  ? numrecs - mystart[idim]
428  : varshape[idim] - mystart[idim];
429  }
430 
431  for (idim = isrecvar; idim <= maxidim; ++idim)
432  {
433  if (mystart[idim] > varshape[idim] ||
434  (mystart[idim] == varshape[idim] && myedges[idim] > 0))
435  {
436  status = NC_EINVALCOORDS;
437  goto done;
438  }
439 
440  if (mystart[idim] + myedges[idim] > varshape[idim])
441  {
442  status = NC_EEDGE;
443  goto done;
444  }
445  }
446 
447  /*
448  * Initialize I/O parameters.
449  */
450  for (idim = maxidim; idim >= 0; --idim)
451  {
452  if (edges != NULL && edges[idim] == 0)
453  {
454  status = NC_NOERR; /* read/write no data */
455  goto done;
456  }
457 
458  mystride[idim] = stride != NULL
459  ? stride[idim]
460  : 1;
461  mymap[idim] = imapp != NULL
462  ? imapp[idim]
463  : idim == maxidim
464  ? 1
465  : mymap[idim + 1] * (ptrdiff_t) myedges[idim + 1];
466 
467  iocount[idim] = 1;
468  length[idim] = ((size_t)mymap[idim]) * myedges[idim];
469  stop[idim] = mystart[idim] + myedges[idim] * (size_t)mystride[idim];
470  }
471 
472  /* Lower body */
473  /*
474  * As an optimization, adjust I/O parameters when the fastest
475  * dimension has unity stride both externally and internally.
476  * In this case, the user could have called a simpler routine
477  * (i.e. ncvar$1()
478  */
479  if (mystride[maxidim] == 1
480  && mymap[maxidim] == 1)
481  {
482  iocount[maxidim] = myedges[maxidim];
483  mystride[maxidim] = (ptrdiff_t) myedges[maxidim];
484  mymap[maxidim] = (ptrdiff_t) length[maxidim];
485  }
486 
487  /*
488  * Perform I/O. Exit when done.
489  */
490  for (;;)
491  {
492  /* TODO: */
493  int lstatus = NC_put_vara(ncid, varid, mystart, iocount,
494  value, memtype);
495  if (lstatus != NC_NOERR) {
496  if(status == NC_NOERR || lstatus != NC_ERANGE)
497  status = lstatus;
498  }
499 
500  /*
501  * The following code permutes through the variable s
502  * external start-index space and it s internal address
503  * space. At the UPC, this algorithm is commonly
504  * called "odometer code".
505  */
506  idim = maxidim;
507  carry:
508  value += (mymap[idim] * memtypelen);
509  mystart[idim] += (size_t)mystride[idim];
510  if (mystart[idim] == stop[idim])
511  {
512  size_t l = (length[idim] * (size_t)memtypelen);
513  value -= l;
514  mystart[idim] = start[idim];
515  if (--idim < 0)
516  break; /* normal return */
517  goto carry;
518  }
519  } /* I/O loop */
520  done:
521  free(mystart);
522  } /* variable is array */
523  return status;
524 }
525 
529 static int
530 NC_put_vars(int ncid, int varid, const size_t *start,
531  const size_t *edges, const ptrdiff_t *stride,
532  const void *value, nc_type memtype)
533 {
534  NC* ncp;
535  size_t *my_count = (size_t *)edges;
536  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
537  int stat;
538 
539  stat = NC_check_id(ncid, &ncp);
540  if(stat != NC_NOERR) return stat;
541 
542  /* Handle any NULL parameters. */
543  if(start == NULL || edges == NULL || stride == NULL) {
544  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
545  if(stat != NC_NOERR) return stat;
546  }
547 
548  stat = ncp->dispatch->put_vars(ncid, varid, start, my_count, my_stride,
549  value, memtype);
550  if(edges == NULL) free(my_count);
551  if(stride == NULL) free(my_stride);
552  return stat;
553 }
554 
558 static int
559 NC_put_varm(int ncid, int varid, const size_t *start,
560  const size_t *edges, const ptrdiff_t *stride, const ptrdiff_t* map,
561  const void *value, nc_type memtype)
562 {
563  NC* ncp;
564  size_t *my_count = (size_t *)edges;
565  ptrdiff_t *my_stride = (ptrdiff_t *)stride;
566  int stat;
567 
568  stat = NC_check_id(ncid, &ncp);
569  if(stat != NC_NOERR) return stat;
570 
571  /* Handle any NULL parameters. */
572  if(start == NULL || edges == NULL || stride == NULL) {
573  stat = NC_check_nulls(ncid, varid, start, &my_count, &my_stride);
574  if(stat != NC_NOERR) return stat;
575  }
576 
577  stat = ncp->dispatch->put_varm(ncid, varid, start, my_count, my_stride,
578  map, value, memtype);
579  if(edges == NULL) free(my_count);
580  if(stride == NULL) free(my_stride);
581  return stat;
582 }
583  /* All these functions are part of this named group... */
588 
630 int
631 nc_put_vara(int ncid, int varid, const size_t *startp,
632  const size_t *countp, const void *op)
633 {
634  NC* ncp;
635  int stat = NC_check_id(ncid, &ncp);
636  nc_type xtype;
637  if(stat != NC_NOERR) return stat;
638  stat = nc_inq_vartype(ncid, varid, &xtype);
639  if(stat != NC_NOERR) return stat;
640  return NC_put_vara(ncid, varid, startp, countp, op, xtype);
641 }
642 
643 int
644 nc_put_vara_text(int ncid, int varid, const size_t *startp,
645  const size_t *countp, const char *op)
646 {
647  return NC_put_vara(ncid, varid, startp, countp,
648  (void*)op, NC_CHAR);
649 }
650 
651 int
652 nc_put_vara_schar(int ncid, int varid, const size_t *startp,
653  const size_t *countp, const signed char *op)
654 {
655  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
656  NC_BYTE);
657 }
658 
659 int
660 nc_put_vara_uchar(int ncid, int varid, const size_t *startp,
661  const size_t *countp, const unsigned char *op)
662 {
663  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
664  T_uchar);
665 }
666 
667 int
668 nc_put_vara_short(int ncid, int varid, const size_t *startp,
669  const size_t *countp, const short *op)
670 {
671  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
672  NC_SHORT);
673 }
674 
675 int
676 nc_put_vara_int(int ncid, int varid, const size_t *startp,
677  const size_t *countp, const int *op)
678 {
679  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
680  NC_INT);
681 }
682 
683 int
684 nc_put_vara_long(int ncid, int varid, const size_t *startp,
685  const size_t *countp, const long *op)
686 {
687  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
688  T_long);
689 }
690 
691 int
692 nc_put_vara_float(int ncid, int varid, const size_t *startp,
693  const size_t *countp, const float *op)
694 {
695  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
696  T_float);
697 }
698 
699 int
700 nc_put_vara_double(int ncid, int varid, const size_t *startp,
701  const size_t *countp, const double *op)
702 {
703  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
704  T_double);
705 }
706 
707 int
708 nc_put_vara_ubyte(int ncid, int varid, const size_t *startp,
709  const size_t *countp, const unsigned char *op)
710 {
711  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
712  T_ubyte);
713 }
714 
715 int
716 nc_put_vara_ushort(int ncid, int varid, const size_t *startp,
717  const size_t *countp, const unsigned short *op)
718 {
719  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
720  T_ushort);
721 }
722 
723 int
724 nc_put_vara_uint(int ncid, int varid, const size_t *startp,
725  const size_t *countp, const unsigned int *op)
726 {
727  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
728  T_uint);
729 }
730 
731 int
732 nc_put_vara_longlong(int ncid, int varid, const size_t *startp,
733  const size_t *countp, const long long *op)
734 {
735  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
736  T_longlong);
737 }
738 
739 int
740 nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp,
741  const size_t *countp, const unsigned long long *op)
742 {
743  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
744  NC_UINT64);
745 }
746 
747 int
748 nc_put_vara_string(int ncid, int varid, const size_t *startp,
749  const size_t *countp, const char* *op)
750 {
751  return NC_put_vara(ncid, varid, startp, countp, (void *)op,
752  NC_STRING);
753 }
754 
780 int
781 nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
782 {
783  return NC_put_var1(ncid, varid, indexp, op, NC_NAT);
784 }
785 
786 int
787 nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
788 {
789  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_CHAR);
790 }
791 
792 int
793 nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
794 {
795  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_BYTE);
796 }
797 
798 int
799 nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
800 {
801  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
802 }
803 
804 int
805 nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
806 {
807  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_SHORT);
808 }
809 
810 int
811 nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
812 {
813  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT);
814 }
815 
816 int
817 nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
818 {
819  return NC_put_var1(ncid, varid, indexp, (void*)op, longtype);
820 }
821 
822 int
823 nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
824 {
825  return NC_put_var1(ncid, varid, indexp, (void*)op, NC_FLOAT);
826 }
827 
828 int
829 nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
830 {
831  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_DOUBLE);
832 }
833 
834 int
835 nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
836 {
837  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UBYTE);
838 }
839 
840 int
841 nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
842 {
843  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_USHORT);
844 }
845 
846 int
847 nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
848 {
849  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT);
850 }
851 
852 int
853 nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
854 {
855  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_INT64);
856 }
857 
858 int
859 nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
860 {
861  return NC_put_var1(ncid, varid, indexp, (void *)op, NC_UINT64);
862 }
863 
864 int
865 nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char* *op)
866 {
867  return NC_put_var1(ncid, varid, indexp, (void*)op, NC_STRING);
868 }
869 
919 int
920 nc_put_var(int ncid, int varid, const void *op)
921 {
922  return NC_put_var(ncid, varid, op, NC_NAT);
923 }
924 
925 int
926 nc_put_var_text(int ncid, int varid, const char *op)
927 {
928  return NC_put_var(ncid,varid,(void*)op,NC_CHAR);
929 }
930 
931 int
932 nc_put_var_schar(int ncid, int varid, const signed char *op)
933 {
934  return NC_put_var(ncid,varid,(void*)op,NC_BYTE);
935 }
936 
937 int
938 nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
939 {
940  return NC_put_var(ncid,varid,(void*)op,T_uchar);
941 }
942 
943 int
944 nc_put_var_short(int ncid, int varid, const short *op)
945 {
946  return NC_put_var(ncid,varid,(void*)op,NC_SHORT);
947 }
948 
949 int
950 nc_put_var_int(int ncid, int varid, const int *op)
951 {
952  return NC_put_var(ncid,varid,(void*)op,NC_INT);
953 }
954 
955 int
956 nc_put_var_long(int ncid, int varid, const long *op)
957 {
958  return NC_put_var(ncid,varid,(void*)op,T_long);
959 }
960 
961 int
962 nc_put_var_float(int ncid, int varid, const float *op)
963 {
964  return NC_put_var(ncid,varid,(void*)op,T_float);
965 }
966 
967 int
968 nc_put_var_double(int ncid, int varid, const double *op)
969 {
970  return NC_put_var(ncid,varid,(void*)op,T_double);
971 }
972 
973 int
974 nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
975 {
976  return NC_put_var(ncid,varid,(void*)op,T_ubyte);
977 }
978 
979 int
980 nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
981 {
982  return NC_put_var(ncid,varid,(void*)op,T_ushort);
983 }
984 
985 int
986 nc_put_var_uint(int ncid, int varid, const unsigned int *op)
987 {
988  return NC_put_var(ncid,varid,(void*)op,T_uint);
989 }
990 
991 int
992 nc_put_var_longlong(int ncid, int varid, const long long *op)
993 {
994  return NC_put_var(ncid,varid,(void*)op,T_longlong);
995 }
996 
997 int
998 nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
999 {
1000  return NC_put_var(ncid,varid,(void*)op,NC_UINT64);
1001 }
1002 
1003 int
1004 nc_put_var_string(int ncid, int varid, const char* *op)
1005 {
1006  return NC_put_var(ncid,varid,(void*)op,NC_STRING);
1007 }
1008 
1042 int
1043 nc_put_vars(int ncid, int varid, const size_t *startp,
1044  const size_t *countp, const ptrdiff_t *stridep,
1045  const void *op)
1046 {
1047  return NC_put_vars(ncid, varid, startp, countp, stridep, op, NC_NAT);
1048 }
1049 
1050 int
1051 nc_put_vars_text(int ncid, int varid, const size_t *startp,
1052  const size_t *countp, const ptrdiff_t *stridep,
1053  const char *op)
1054 {
1055  return NC_put_vars(ncid, varid, startp, countp,
1056  stridep,(void*)op,NC_CHAR);
1057 }
1058 
1059 int
1060 nc_put_vars_schar(int ncid, int varid, const size_t *startp,
1061  const size_t *countp, const ptrdiff_t *stridep,
1062  const signed char *op)
1063 {
1064  return NC_put_vars(ncid, varid, startp, countp,
1065  stridep,(void*)op,NC_BYTE);
1066 }
1067 
1068 int
1069 nc_put_vars_uchar(int ncid, int varid,
1070  const size_t *startp, const size_t *countp,
1071  const ptrdiff_t *stridep,
1072  const unsigned char *op)
1073 {
1074  return NC_put_vars(ncid, varid, startp, countp,
1075  stridep, (void *)op, T_uchar);
1076 }
1077 
1078 int
1079 nc_put_vars_short(int ncid, int varid,
1080  const size_t *startp, const size_t *countp,
1081  const ptrdiff_t *stridep,
1082  const short *op)
1083 {
1084  return NC_put_vars(ncid, varid, startp, countp,
1085  stridep, (void *)op, NC_SHORT);
1086 }
1087 
1088 int
1089 nc_put_vars_int(int ncid, int varid,
1090  const size_t *startp, const size_t *countp,
1091  const ptrdiff_t *stridep,
1092  const int *op)
1093 {
1094  return NC_put_vars(ncid, varid, startp, countp,
1095  stridep, (void *)op, NC_INT);
1096 }
1097 
1098 int
1099 nc_put_vars_long(int ncid, int varid,
1100  const size_t *startp, const size_t *countp,
1101  const ptrdiff_t *stridep,
1102  const long *op)
1103 {
1104  return NC_put_vars(ncid, varid, startp, countp,
1105  stridep, (void *)op, T_long);
1106 }
1107 
1108 int
1109 nc_put_vars_float(int ncid, int varid,
1110  const size_t *startp, const size_t *countp,
1111  const ptrdiff_t *stridep,
1112  const float *op)
1113 {
1114  return NC_put_vars(ncid, varid, startp, countp,
1115  stridep, (void *)op, T_float);
1116 }
1117 
1118 int
1119 nc_put_vars_double(int ncid, int varid,
1120  const size_t *startp, const size_t *countp,
1121  const ptrdiff_t *stridep,
1122  const double *op)
1123 {
1124  return NC_put_vars(ncid, varid, startp, countp,
1125  stridep, (void *)op, T_double);
1126 }
1127 
1128 int
1129 nc_put_vars_ubyte(int ncid, int varid,
1130  const size_t *startp, const size_t *countp,
1131  const ptrdiff_t *stridep,
1132  const unsigned char *op)
1133 {
1134  return NC_put_vars(ncid, varid, startp, countp,
1135  stridep, (void *)op, T_ubyte);
1136 }
1137 
1138 int
1139 nc_put_vars_ushort(int ncid, int varid,
1140  const size_t *startp, const size_t *countp,
1141  const ptrdiff_t *stridep,
1142  const unsigned short *op)
1143 {
1144  return NC_put_vars(ncid, varid, startp, countp,
1145  stridep, (void *)op, T_ushort);
1146 }
1147 
1148 int
1149 nc_put_vars_uint(int ncid, int varid,
1150  const size_t *startp, const size_t *countp,
1151  const ptrdiff_t *stridep,
1152  const unsigned int *op)
1153 {
1154  return NC_put_vars(ncid, varid, startp, countp,
1155  stridep, (void *)op, T_uint);
1156 }
1157 
1158 int
1159 nc_put_vars_longlong(int ncid, int varid,
1160  const size_t *startp, const size_t *countp,
1161  const ptrdiff_t *stridep,
1162  const long long *op)
1163 {
1164  return NC_put_vars(ncid, varid, startp, countp,
1165  stridep, (void *)op, T_longlong);
1166 }
1167 
1168 int
1169 nc_put_vars_ulonglong(int ncid, int varid,
1170  const size_t *startp, const size_t *countp,
1171  const ptrdiff_t *stridep,
1172  const unsigned long long *op)
1173 {
1174  return NC_put_vars(ncid, varid, startp, countp,
1175  stridep, (void *)op, NC_UINT64);
1176 }
1177 
1178 int
1179 nc_put_vars_string(int ncid, int varid,
1180  const size_t *startp, const size_t *countp,
1181  const ptrdiff_t *stridep,
1182  const char**op)
1183 {
1184  return NC_put_vars(ncid, varid, startp, countp, stridep,
1185  (void *)op, NC_STRING);
1186 }
1187 
1234 int
1235 nc_put_varm(int ncid, int varid, const size_t *startp,
1236  const size_t *countp, const ptrdiff_t *stridep,
1237  const ptrdiff_t *imapp, const void *op)
1238 {
1239  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp, op, NC_NAT);
1240 }
1241 
1242 int
1243 nc_put_varm_text(int ncid, int varid, const size_t *startp,
1244  const size_t *countp, const ptrdiff_t *stridep,
1245  const ptrdiff_t *imapp, const char *op)
1246 {
1247  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1248  (void *)op, NC_CHAR);
1249 }
1250 
1251 int
1252 nc_put_varm_schar(int ncid, int varid,
1253  const size_t *startp, const size_t *countp,
1254  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1255  const signed char *op)
1256 {
1257  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1258  (void *)op, NC_BYTE);
1259 }
1260 
1261 int
1262 nc_put_varm_uchar(int ncid, int varid,
1263  const size_t *startp, const size_t *countp,
1264  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1265  const unsigned char *op)
1266 {
1267  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1268  (void *)op, T_uchar);
1269 }
1270 
1271 int
1272 nc_put_varm_short(int ncid, int varid,
1273  const size_t *startp, const size_t *countp,
1274  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1275  const short *op)
1276 {
1277  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1278  (void *)op, NC_SHORT);
1279 }
1280 
1281 int
1282 nc_put_varm_int(int ncid, int varid,
1283  const size_t *startp, const size_t *countp,
1284  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1285  const int *op)
1286 {
1287  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1288  (void *)op, NC_INT);
1289 }
1290 
1291 int
1292 nc_put_varm_long(int ncid, int varid,
1293  const size_t *startp, const size_t *countp,
1294  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1295  const long *op)
1296 {
1297  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1298  (void *)op, T_long);
1299 }
1300 
1301 int
1302 nc_put_varm_float(int ncid, int varid,
1303  const size_t *startp, const size_t *countp,
1304  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1305  const float *op)
1306 {
1307  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1308  (void *)op, T_float);
1309 }
1310 
1311 int
1312 nc_put_varm_double(int ncid, int varid,
1313  const size_t *startp, const size_t *countp,
1314  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1315  const double *op)
1316 {
1317  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1318  (void *)op, T_double);
1319 }
1320 
1321 int
1322 nc_put_varm_ubyte(int ncid, int varid,
1323  const size_t *startp, const size_t *countp,
1324  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1325  const unsigned char *op)
1326 {
1327  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1328  (void *)op, T_ubyte);
1329 }
1330 
1331 int
1332 nc_put_varm_ushort(int ncid, int varid,
1333  const size_t *startp, const size_t *countp,
1334  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1335  const unsigned short *op)
1336 {
1337  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1338  (void *)op, T_ushort);
1339 }
1340 
1341 int
1342 nc_put_varm_uint(int ncid, int varid,
1343  const size_t *startp, const size_t *countp,
1344  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1345  const unsigned int *op)
1346 {
1347  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1348  (void *)op, T_uint);
1349 }
1350 
1351 int
1352 nc_put_varm_longlong(int ncid, int varid,
1353  const size_t *startp, const size_t *countp,
1354  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1355  const long long *op)
1356 {
1357  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1358  (void *)op, T_longlong);
1359 }
1360 
1361 int
1362 nc_put_varm_ulonglong(int ncid, int varid,
1363  const size_t *startp, const size_t *countp,
1364  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1365  const unsigned long long *op)
1366 {
1367  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1368  (void *)op, NC_UINT64);
1369 }
1370 
1371 int
1372 nc_put_varm_string(int ncid, int varid,
1373  const size_t *startp, const size_t *countp,
1374  const ptrdiff_t *stridep, const ptrdiff_t *imapp,
1375  const char**op)
1376 {
1377  return NC_put_varm(ncid, varid, startp, countp, stridep, imapp,
1378  (void *)op, NC_STRING);
1379 }
1380  /*End of named group... */
EXTERNL int nc_inq_type(int ncid, nc_type xtype, char *name, size_t *size)
Inquire about a type.
Definition: dfile.c:1730
int nc_put_var_ushort(int ncid, int varid, const unsigned short *op)
Write an entire variable with one call.
Definition: dvarput.c:980
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_put_vara_schar(int ncid, int varid, const size_t *startp, const size_t *countp, const signed char *op)
Write an array of values to a variable.
Definition: dvarput.c:652
int nc_put_var_longlong(int ncid, int varid, const long long *op)
Write an entire variable with one call.
Definition: dvarput.c:992
int nc_put_var1_uint(int ncid, int varid, const size_t *indexp, const unsigned int *op)
Write one datum.
Definition: dvarput.c:847
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1139
int nc_put_vara_long(int ncid, int varid, const size_t *startp, const size_t *countp, const long *op)
Write an array of values to a variable.
Definition: dvarput.c:684
int nc_put_vara_ulonglong(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned long long *op)
Write an array of values to a variable.
Definition: dvarput.c:740
int nc_put_vars_int(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const int *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1089
int nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op)
Write one datum.
Definition: dvarput.c:823
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1252
int nc_put_var1_schar(int ncid, int varid, const size_t *indexp, const signed char *op)
Write one datum.
Definition: dvarput.c:793
EXTERNL int nc_inq_vartype(int ncid, int varid, nc_type *xtypep)
Learn the type of a variable.
Definition: dvarinq.c:178
int nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op)
Write one datum.
Definition: dvarput.c:829
int nc_put_vara_float(int ncid, int varid, const size_t *startp, const size_t *countp, const float *op)
Write an array of values to a variable.
Definition: dvarput.c:692
int nc_put_vars_short(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const short *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1079
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1129
int nc_put_var_short(int ncid, int varid, const short *op)
Write an entire variable with one call.
Definition: dvarput.c:944
int nc_put_var1_ushort(int ncid, int varid, const size_t *indexp, const unsigned short *op)
Write one datum.
Definition: dvarput.c:841
int nc_put_var_long(int ncid, int varid, const long *op)
Write an entire variable with one call.
Definition: dvarput.c:956
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1282
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1149
int nc_put_vara_int(int ncid, int varid, const size_t *startp, const size_t *countp, const int *op)
Write an array of values to a variable.
Definition: dvarput.c:676
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1235
int nc_put_var_float(int ncid, int varid, const float *op)
Write an entire variable with one call.
Definition: dvarput.c:962
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1292
int nc_put_var(int ncid, int varid, const void *op)
Write an entire variable with one call.
Definition: dvarput.c:920
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1243
int nc_put_vars_float(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const float *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1109
int nc_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const void *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1043
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1069
int nc_put_var_double(int ncid, int varid, const double *op)
Write an entire variable with one call.
Definition: dvarput.c:968
int nc_put_var_text(int ncid, int varid, const char *op)
Write an entire variable with one call.
Definition: dvarput.c:926
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1342
int nc_put_var1_ubyte(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Write one datum.
Definition: dvarput.c:835
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1372
int nc_put_var_string(int ncid, int varid, const char **op)
Write an entire variable with one call.
Definition: dvarput.c:1004
int nc_put_var1_short(int ncid, int varid, const size_t *indexp, const short *op)
Write one datum.
Definition: dvarput.c:805
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1272
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1262
int nc_put_vara_string(int ncid, int varid, const size_t *startp, const size_t *countp, const char **op)
Write an array of values to a variable.
Definition: dvarput.c:748
int nc_put_vars_double(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const double *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1119
int nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op)
Write one datum.
Definition: dvarput.c:787
int nc_put_vara_ubyte(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Write an array of values to a variable.
Definition: dvarput.c:708
int nc_put_var_schar(int ncid, int varid, const signed char *op)
Write an entire variable with one call.
Definition: dvarput.c:932
int nc_put_var_ulonglong(int ncid, int varid, const unsigned long long *op)
Write an entire variable with one call.
Definition: dvarput.c:998
int nc_put_var_int(int ncid, int varid, const int *op)
Write an entire variable with one call.
Definition: dvarput.c:950
int nc_put_var1_string(int ncid, int varid, const size_t *indexp, const char **op)
Write one datum.
Definition: dvarput.c:865
int nc_put_vars_text(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1051
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1169
int nc_put_var1_ulonglong(int ncid, int varid, const size_t *indexp, const unsigned long long *op)
Write one datum.
Definition: dvarput.c:859
int nc_put_vara_ushort(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned short *op)
Write an array of values to a variable.
Definition: dvarput.c:716
int nc_put_var_uint(int ncid, int varid, const unsigned int *op)
Write an entire variable with one call.
Definition: dvarput.c:986
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1352
int nc_put_vara_longlong(int ncid, int varid, const size_t *startp, const size_t *countp, const long long *op)
Write an array of values to a variable.
Definition: dvarput.c:732
int nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op)
Write one datum.
Definition: dvarput.c:817
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1332
int nc_put_vara_double(int ncid, int varid, const size_t *startp, const size_t *countp, const double *op)
Write an array of values to a variable.
Definition: dvarput.c:700
int nc_put_var1_longlong(int ncid, int varid, const size_t *indexp, const long long *op)
Write one datum.
Definition: dvarput.c:853
int nc_put_vars_long(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const long *op)
Write a strided array of values to a variable.
Definition: dvarput.c:1099
int nc_put_var1_uchar(int ncid, int varid, const size_t *indexp, const unsigned char *op)
Write one datum.
Definition: dvarput.c:799
int nc_put_var_uchar(int ncid, int varid, const unsigned char *op)
Write an entire variable with one call.
Definition: dvarput.c:938
int nc_put_var_ubyte(int ncid, int varid, const unsigned char *op)
Write an entire variable with one call.
Definition: dvarput.c:974
int nc_put_vara_text(int ncid, int varid, const size_t *startp, const size_t *countp, const char *op)
Write an array of values to a variable.
Definition: dvarput.c:644
int nc_put_vara_uint(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned int *op)
Write an array of values to a variable.
Definition: dvarput.c:724
int nc_put_var1(int ncid, int varid, const size_t *indexp, const void *op)
Write one datum.
Definition: dvarput.c:781
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1312
int nc_put_vars_string(int ncid, int varid, const size_t *startp, const size_t *countp, const ptrdiff_t *stridep, const char **op)
Write a strided array of values to a variable.
Definition: dvarput.c:1179
int nc_put_vara(int ncid, int varid, const size_t *startp, const size_t *countp, const void *op)
Write an array of values to a variable.
Definition: dvarput.c:631
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1322
int nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op)
Write one datum.
Definition: dvarput.c:811
int nc_put_vara_short(int ncid, int varid, const size_t *startp, const size_t *countp, const short *op)
Write an array of values to a variable.
Definition: dvarput.c:668
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1362
int nc_put_vara_uchar(int ncid, int varid, const size_t *startp, const size_t *countp, const unsigned char *op)
Write an array of values to a variable.
Definition: dvarput.c:660
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1159
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)
Write a mapped array of values to a variable.
Definition: dvarput.c:1302
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)
Write a strided array of values to a variable.
Definition: dvarput.c:1060
#define NC_ECHAR
Attempt to convert between text & numbers.
Definition: netcdf.h:429
#define NC_EBADTYPE
Not a netcdf data type.
Definition: netcdf.h:410
#define NC_UINT
unsigned 4-byte int
Definition: netcdf.h:44
#define NC_INT
signed 4 byte integer
Definition: netcdf.h:38
#define NC_MAX_VAR_DIMS
max per variable dimensions
Definition: netcdf.h:282
#define NC_BYTE
signed 1 byte integer
Definition: netcdf.h:35
#define NC_NAT
Not A Type.
Definition: netcdf.h:34
#define NC_EEDGE
Start+count exceeds dimension bound.
Definition: netcdf.h:438
#define NC_DOUBLE
double precision floating point number
Definition: netcdf.h:41
#define NC_UBYTE
unsigned 1 byte int
Definition: netcdf.h:42
#define NC_FLOAT
single precision floating point number
Definition: netcdf.h:40
#define NC_ENOMEM
Memory allocation (malloc) failure.
Definition: netcdf.h:448
#define NC_SHORT
signed 2 byte integer
Definition: netcdf.h:37
#define NC_EINVALCOORDS
Index exceeds dimension bound.
Definition: netcdf.h:400
#define NC_INT64
signed 8-byte int
Definition: netcdf.h:45
#define NC_UINT64
unsigned 8-byte int
Definition: netcdf.h:46
#define NC_NOERR
No Error.
Definition: netcdf.h:368
#define NC_USHORT
unsigned 2-byte int
Definition: netcdf.h:43
#define NC_STRING
string
Definition: netcdf.h:47
#define NC_EMAPTYPE
Mapped access for atomic types only.
Definition: netcdf.h:501
#define NC_ESTRIDE
Illegal stride.
Definition: netcdf.h:439
#define NC_CHAR
ISO/ASCII character.
Definition: netcdf.h:36
#define NC_ERANGE
Math result not representable.
Definition: netcdf.h:447
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:25