Writing in Single-Element Mode
Function Syntax
- Write data in single-element mode.
nc_put_var1(int ncid, int varid, const size_t* indexp, const void* op)
- Write data of the int type in single-element mode.
nc_put_var1_int(int ncid, int varid, const size_t* indexp, const int* op)
- Write data of the double type in single-element mode.
nc_put_var1_double(int ncid, int varid, const size_t* indexp, const double* op)
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
ncid |
File ID |
Non-negative integer |
Input |
varid |
Variable ID |
Non-negative integer |
Input |
*indexp |
Starting vector for data access |
Non-empty |
Input |
*op |
Pointer to data |
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.
Parent topic: NetCDF Bridging Functions