ncwriteschema
R2026bAdd netCDF schema definitions to netCDF file
Description
ncwriteschema(
creates or adds attributes, dimensions, variable definitions, and group structure defined in
filename,schema)schema to the netCDF file filename.
You can use the ncwriteschema function in combination with the
ncinfo function
to create a netCDF file based on the schema of an existing file.
The
ncwriteschemafunction does not write variable data. Use thencwritefunction to write data to the created variables. Unlimited dimensions have an initial size of 0 until you write data.The
ncwriteschemafunction cannot change the format of an existing file. It cannot redefine existing variables or dimensions infilename. Ifschemacontains attributes, dimensions, variable definitions, or a group structure that already exist in the file, then thencwriteschemafunction issues a warning but continues processing.The
ncwriteschemafunction cannot create new files in the 64-bit data format. To create a file in this format, use thenetcdf.createfunction with the'64BIT_DATA'creation mode.
Examples
Input Arguments
Version History
Introduced in R2011a