Creating NetCDF CF Files

From Federation of Earth Science Information Partners


Back to WCS Access to netCDF Files

Back to WCS NetCDF Development

NetCDF-CF conventions

The reason to use CF convention: Enable plug and play connectivity.

Well done NetCDF files are human readable. After all: what could dimension longitude mean besides longitude. If you get data in NetCDF format, it's usually fairly easy to see what really is there.

It's also easy to write a generic browser, that can display every variable for you.

But since a lot of data in NetCDF files have geographical meaning, a graphical viewer should be able to draw the data ion the map, on it's own. This involves, at minimum:

  • finding the three grographical dimensions
  • Finding time dimension, if any
  • Understanding the geographical projection

From any generic NetCDF, this requires human intelligence. After all, the n-dimensional data variables, dimensional variables and other metadata variables look precisely the same for the program code. There are legion of ways to code projection information, and decoding it reliably is very difficult.

Conventions come to rescue. For example, if a variable has attribute axis='X', there's only one interpretation for the values of this variable: it must have just one dimension, and the values are points on X-axis along that dimension. No more guesswork, and wrong guesses, for the programmers.

Verifying NetCDF-CF Files

Since CF-1.0 conventions contain a lot of definitions, verifying them by machine is necessary. There is a fairly complete compliancechecker online

Creating NetCDF-CF files using NetCDF Markup Language

NCML utlilities here.