Writing in Array Mode
Function Syntax
- Write data in stride mode.
nc_put_vars_text(int ncid, int varid, const size_t* startp, const size_t* countp, const ptrdiff_t* stridep, const char* op)
- Write data in array mode.
nc_put_vara(int ncid, int varid, const size_t* startp, const size_t* countp, const void* op)
- Write data of the double type in array mode.
nc_put_vara_double(int ncid, int varid, const size_t* startp, const size_t* countp, const double* op)
- Write data of the char type in array mode.
int nc_put_vara_text(int ncid, int varid, const size_t* startp, const size_t* countp, const char* op)
- Write data of the unsigned char type in array mode.
int nc_put_vara_uchar(int ncid, int varid, const size_t* startp, const size_t* countp, const unsigned char* op)
- Write data of the signed char type in array mode.
int nc_put_vara_schar(int ncid, int varid, const size_t* startp, const size_t* countp, const signed char* op)
- Write data of the short type in array mode.
int nc_put_vara_short(int ncid, int varid, const size_t* startp, const size_t* countp, const short* op)
- Write data of the int type in array mode.
int nc_put_vara_int(int ncid, int varid, const size_t* startp, const size_t* countp, const int* op)
- Write data of the long type in array mode.
int nc_put_vara_long(int ncid, int varid, const size_t* startp, const size_t* countp, const long* op)
- Write data of the float type in array mode.
int nc_put_vara_float(int ncid, int varid, const size_t* startp, const size_t* countp, const float* op)
- Write data of the unsigned short type in array mode.
int nc_put_vara_ushort(int ncid, int varid, const size_t* startp, const size_t* countp, const unsigned short* op)
- Write data of the unsigned int type in array mode.
int nc_put_vara_uint(int ncid, int varid, const size_t* startp, const size_t* countp, const unsigned int* op)
- Write data of the long long type in array mode.
int nc_put_vara_longlong(int ncid, int varid, const size_t* startp, const size_t* countp, const long long* op)
- Write data of the unsigned long long type in array mode.
int nc_put_vara_ulonglong(int ncid, int varid, const size_t* startp, const size_t* countp, const unsigned long long* op)
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
ncid |
File ID |
Non-negative integer |
Input |
varid |
Variable ID |
Non-negative integer |
Input |
*startp |
Starting vector for data access |
Non-empty |
Input |
*countp |
Range vector for data access |
Non-empty |
Input |
*op |
Pointer to data |
Non-empty |
Input |
const* stridep |
Stride vector |
Non-empty |
Input |
Return Value
- Success: NC_NOERR
- Failure: An error code is returned.
Error Code
Error Code |
Description |
|---|---|
NC_EBADID |
Invalid ncid |
NC_ENOTVAR |
Variable not found |
NC_EINVALCOORDS |
Invalid coordinate argument |
NC_EEDGE |
Dimension out of bounds |
Notes
Ensure that the pointer memory size is correct. Hyper IO cannot check the pointer size.