The NCDF_CREATE function creates a new netCDF file. If successful, the netCDF ID for the file is returned. The newly-created netCDF file is automatically placed into define mode. If you do not have write permission to create the specified Filename , NCDF_CREATE returns an error message instead of a netCDF file ID.
id = NCDF_CREATE('test.nc',/CLOBBER) ; Open a new NetCDF File and destroy test.nc if it already exists.
id2 = NCDF_CREATE('test.nc', /NOCLOBBER)
;
This attempt to create a new version of the file test.nc produces the following error because the NOCLOBBER keyword was set.
nccreate: filename "test.nc": File exists