2007 Unidata NetCDF Workshop for Developers and Data Providers > Best Practices
8.8 Miscellaneous Recommendations
A few miscellaneous tips for developers
- Remember to explicitly flush or close a netCDF dataset you are writing to
make sure all the data gets written to disk.
- To define a file whose structure is known in advance, you can
write a CDL file and
create the netCDF file using ncgen.
Then write the data into the netCDF file using that generated
code. For files with lots of metadata, this is typically
easier than programming all the "boiler-plate" code to create the
needed dimensions, attributes, and variables yourself.
- New tip: for transition to netCDF-4, use the "classic model"
flag on file creation to get netCDF-4 performance benefits and also
compatibility with the classic data model and existing netCDF-3
applications and conventions.
2007 Unidata NetCDF Workshop for Developers and Data Providers > Best Practices