Defining a New Dimension
Function Syntax
nc_def_dim(int ncid, const char* name, size_t len, int *idp)
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
ncid |
File ID |
Non-negative integer |
Input |
*name |
File name |
Non-empty string of less than 256 bytes |
Input |
len |
Dimension length |
Non-negative integer |
Input |
*idp |
Pointer to the dimension ID |
Non-empty |
Output |
Return Value
- Success: NC_NOERR
- Failure: An error code is returned.
Error Code
Error Code |
Description |
|---|---|
NC_EBADID |
Invalid ncid |
NC_EMAXNAME |
Name too long |
NC_EINVAL |
Invalid argument |
NC_EDIMSIZE |
Invalid dimension size |
NC_ENOMEM |
Insufficient memory |
Parent topic: Information Setting