Main Content

netcdf.inqVarFletcher32

Return checksum parameters for netCDF variable

    Description

    checksumSetting = netcdf.inqVarFletcher32(ncid,varid) returns the Fletcher32 checksum setting for the netCDF variable specified by varid in the file or group specified by ncid. The function returns the checksum setting as 'FLETCHER32' or 'NOCHECKSUM'.

    example

    Examples

    collapse all

    Open the sample netCDF file, and get the Fletcher32 checksum setting for a variable. In this case, Fletcher32 checksum error detection is not enabled for the variable.

    ncid = netcdf.open("example.nc","NOWRITE");
    varid = netcdf.inqVarID(ncid,"temperature");
    checksumSetting = netcdf.inqVarFletcher32(ncid,varid)
    
    checksumSetting =
    
        'NOCHECKSUM'
    

    Close the netCDF file.

    netcdf.close(ncid)
    

    Input Arguments

    collapse all

    NetCDF file or group identifier, specified as a nonnegative integer scalar. You can use the netcdf.create or netcdf.open function to return a file identifier. You can use the netcdf.defGrp function to return a group identifier.

    Data Types: double

    NetCDF variable identifier, specified as a nonnegative integer scalar. You can use the netcdf.defVar function to return a variable identifier.

    Data Types: double

    Tips

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

    Version History

    Introduced in R2010b