The netCDF kickstarter tool is still being developed. Feel free to try it out and provide feedback!
Why a netCDF kickstarter?
Reading data from netCDF datasets is quite trivial, especially in combination with an OpenDAP server. See for example this Matlab tutorial. Creating netCDF files that are fully self-descriptive and comply with the CF convention, for example, is not as trivial and can be troublesome if you are regularly creating netCDF datasets to be published on an OpenDAP server.
The netCDF kickstarter helps to set up an empty netCDF file with all meta data in place. The only thing you have to do is add the data. This WIKI page explains how the netCDF kickstarter works and how you can use it.
What is a netCDF kickstarter?
The netCDF kickstarter is based on templates written in the network Common data form Description Language (CDL). CDL templates describe the structure and meta data of a netCDF file. The netCDF kickstarter hosts various CDL templates for different purposes, for example: grid, timeSeries, trajectories. These templates are (slightly) adapted versions of the templates used by NOAA for this very same purpose.
The CDL templates hosted by the netCDF kickstarter contain markers that need to be replaced by information on the data that the final netCDF file will contain. Different types of markers exists: automatically replaced system markers that contain, for example, the creation date of the netCDF file, markers that need to be replaced with user input, like the name of the creator, etc. The netCDF kickstarter is a tool to easily replace these markers with the right input and subsequently transform the resulting CDL template into a netCDF file.
How does the netCDF kickstarter work?
The netCDF kickstarter is a webservice. This means it can be approached by a URL. The webservice has different interfaces:
returns JSON formatted data structures, used for raw data transfer
returns a CDL template with markers replaced
returns an empty netCDF file based on a CDL template
returns a Python script generating an empty netCDF file based on a CDL template
returns a Matlab script generating an empty netCDF file based on a CDL template
|R||/rncdf4||returns a R script generating an empty netCDF file based on a CDL template|
returns a netCDF file description in netCDF Markup Language (ncML) which can be used to non-intrusively append netCDF meta data to an already existing netCDF file. The resulting XML formatted file should be kept with the netCDF file that it describes.
The JSON interface has the following URL syntax:
Returns list with available templates
Returns list with markers in given template
Returns list with available marker categories
Returns list with available CF standard names and descriptions
CDL and netCDF interface
The CDL and netCDF interface are virtually the same. The only difference is that the netCDF interface transforms the resulting CDL file into a netCDF file using the ncgen tool. The interfaces use the following syntax:
Some categories of markers are available as blocks in the CDL template. For example the var category defines a geophysical variable to be stored in the netCDF file (e.g. altitude) and is available as block in most CDL templates. If the markers for this category (or block) are used multiple times, the block is used multiple times which results in multiple geophysical variables stored in that netCDF file. For example:
Python, Matlab and ncML interface
Also the Python, Matlab, R and ncML interface are virtually the same. They all generate scripts that in turn generate an empty netCDF file according to a given CDL template (with markers replaced). The only difference between the interfaces is the language the generated script uses. The interfaces use the same syntax as the CDL and netCDF interface:
How to use the netCDF kickstarter?
Using the JSON, CDL and netCDF interfaces of the netCDF kickstarter clients or graphical user interfaces (GUI) can be built that interact with the netCDF kickstarter. The netCDF kickstarter hosts it's own very simple webinterface. But the OpenEarthTools repository also contains a kickstarter toolbox that, for example, extracts the dimensions from your data itself.
The netCDF kickstarter intends to limit the amount of user input and keep as much attribute values default. This is also true for the units used in a netCDF file. You will not often be bothered by setting the units of a variable. It assumes the following units for variables:
seconds since January 1, 1970 00:00:00
Feel free to use other units if appropriate as long as you stick to the UDUNITS notation. You have to change it manually, though.
Where can I find the netCDF kickstarter?
The netCDF kickstarter is currently hosted at http://zandmotor.citg.tudelft.nl/netcdfkickstarter/. This might not be its final location, since the tool is still under development. But any movements will be announced here.
Who can use the netCDF kickstarter?