|
|
|||
|
||||
Next: nc_inq_var_fill, Previous: nc_inq_var_chunking, Up: Variables
nc_def_var_fillThe function nc_def_var_fill sets the fill parameters for a variable in a netCDF-4 file.
This function must be called after the variable is defined, but before nc_enddef is called.
int nc_def_var_fill(int ncid, int varid, int no_fill, void *fill_value);
ncidvaridno_fill*fill_valueNC_NOERRNC_BADIDNC_ENOTNC4NC_ENOTVARNC_ELATEDEFNC_ENOTINDEFINENC_EPERMThis example is from libsrc4/tst_vars.c
int dimids[NDIMS];
size_t index[NDIMS];
int varid;
int no_fill;
unsigned short ushort_data = 42, ushort_data_in, fill_value_in;
/* Create a netcdf-4 file with one dim and 1 NC_USHORT var. */
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
if (nc_def_dim(ncid, DIM7_NAME, DIM7_LEN, &dimids[0])) ERR;
if (nc_def_var(ncid, VAR7_NAME, NC_USHORT, NDIMS, dimids,
&varid)) ERR;
if (nc_def_var_fill(ncid, varid, 1, NULL)) ERR;
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | |||||
|
|||||