Chapter 6.  Creating NetCDF Files

Table of Contents

Classic NetCDF Files
64-bit offset NetCDF Files

Classic NetCDF Files

Before actually creating a netCDF file, let's figure out what we want to create in the first place. Suppose we have a rectangular time series grid of data. The spatial dimensions of the data are latitude and longitude.

Creating an empty netCDF file is as simple as using the rather aptly-named nc_create_empty.m m-file as so.

>> nc_create_empty ( 'test.nc' )
>> nc_dump ( 'test.nc' )
netcdf test.nc {



}
    

Now we're ready to add dimensions and variables.