netcdf.inqVarFill

Determine values of fill parameters for NetCDF variable

Syntax

[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid)

Description

[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid) returns the fill mode and the fill value for the variable varid in the file or group specified by ncid.

Input Arguments

ncid

Identifier of a NetCDF file, returned by netcdf.create or netcdf.open, or a NetCDF group, returned by netcdf.defGrp.

varid

Identifier of NetCDF variable.

Output Arguments

noFillMode

Boolean value. true indicates that use of the fill values for the variable has been disabled.

fillValue

Specifies the value to use in the variable when no other value is specified and use of fill values has been enabled.

Examples

This example opens the NetCDF sample dataset and gets the fill mode and fill value used with a variable.

ncid = netcdf.open('example.nc','NOWRITE');
varid = netcdf.inqVarID(ncid,'temperature');
[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid);
netcdf.close(ncid);

References

This function corresponds to the nc_inq_var_fill function in the netCDF library C API.

For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.

Was this topic helpful?