netcdf.inqVarFletcher32

Fletcher32 checksum setting for NetCDF variable

Syntax

setting = netcdf.inqVarFletcher32(ncid,varid)

Description

setting = netcdf.inqVarFletcher32(ncid,varid) returns the Fletcher32 checksum setting for the NetCDF variable specified by varid in the file or group specified by ncid.

Input Arguments

ncid

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

varid

Identifier of NetCDF variable.

Output Arguments

setting

Text string specifying whether the Fletcher32 checksum is turned on for the specified variable. netcdf.inqVarFletcher32 returns the text string FLETCHER32 if the checksum is turned on for the variable; otherwise, NOCHECKSUM.

Examples

This example opens the sample NetCDF file and gets information about the checksum setting for a variable.

ncid = netcdf.open('example.nc','NOWRITE');
varid = netcdf.inqVarID(ncid,'temperature');
setting = netcdf.inqVarFletcher32(ncid,varid);
netcdf.close(ncid);

References

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

For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt for more information.

Was this topic helpful?