Documentation Center

  • Trial Software
  • Product Updates

netcdf.setDefaultFormat

Change default netCDF file format

Syntax

oldFormat = netcdf.setDefaultFormat(newFormat)

Description

oldFormat = netcdf.setDefaultFormat(newFormat) changes the default format used by netCDF.create when creating new netCDF files, and returns the value of the old format. You can use this function to change the format used by a netCDF file without having to change the creation mode flag used in each call to netCDF.create.

newFormat can be either of the following values.

ValueDescription
'NC_FORMAT_CLASSIC'Original netCDF file format
'NC_FORMAT_64BIT'

64-bit offset format; relaxes limitations on creating very large files

You can also specify the numeric equivalent of these values, as retrieved by netcdf.getConstant.

This function corresponds to the nc_set_default_format function in the netCDF library C API. To use this function, you should be familiar with the netCDF programming paradigm. See netcdf for more information.

Examples

oldFormat = netcdf.setDefaultFormat('NC_FORMAT_64BIT');

See Also

Was this topic helpful?