End netCDF file define mode
netcdf.endDef(ncid) takes a netCDF file
out of define mode and into data mode.
a netCDF file identifier returned by
a netCDF file out of define mode, specifying four additional performance
tuning parameters. For example, one reason for using the performance
parameters is to reserve extra space in the netCDF file header using
ncid = netcdf.endDef(ncid,20000,4,0,4);
This reserves 20,000 bytes in the header, which can be used later when adding attributes. This can be extremely efficient when working with very large netCDF 3 files. To understand how to use these performance tuning parameters, see the netCDF library documentation.
This function corresponds to the
nc_enddef in the netCDF library C API. To
use this function, you should be familiar with the netCDF programming paradigm.
When you create a file using
netcdf.create, the functions opens the file in define mode. This example uses
netcdf.endDef to take the file out of define mode.
Create a netCDF file.
ncid = netcdf.create('myfile.nc','CLASSIC_MODEL');
Define a dimension.
dimid = netcdf.defDim(ncid,'lat',50);
Leave define mode.