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:

Interface

URL prefix

Description

JSON

/json

returns JSON formatted data structures, used for raw data transfer

CDL

/cdl

returns a CDL template with markers replaced

netCDF

/netcdf

returns an empty netCDF file based on a CDL template

Python

/python

returns a Python script generating an empty netCDF file based on a CDL template

Matlab

/matlab

returns a Matlab script generating an empty netCDF file based on a CDL template

ncML

/ncml

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.

JSON interface

The JSON interface has the following URL syntax:

Syntax

Result

Example

/json/templates

Returns list with available templates

http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/templates

/json/templates/<template>?category=<category>

Returns list with markers in given template

http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/templates/grid.cdl
http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/templates/grid.cdl?category=dim

/json/categories

Returns list with available marker categories

http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/categories

/json/standardnames?search=<regexp>

Returns list with available CF standard names and descriptions

http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/standardnames
http://zandmotor.citg.tudelft.nl/netcdfkickstarter/json/standardnames?search=air.*temperature

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:

/cdl/<template>?m[<marker>]=<value>&m[<marker>]=<value>& ... &m[<marker>]=<value>
/netcdf/<template>?m[<marker>]=<value>&m[<marker>]=<value>& ... &m[<marker>]=<value>

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:

/netcdf/grid.cdl?m[var.name]=altitude
/netcdf/grid.cdl?m[var.name]=altitude&m[var.name]=grainsize

Python, Matlab and ncML interface

Also the Python, Matlab 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:

/python/<template>?m[<marker>]=<value>&m[<marker>]=<value>& ... &m[<marker>]=<value>
/matlab/<template>?m[<marker>]=<value>&m[<marker>]=<value>& ... &m[<marker>]=<value>
/ncml/<template>?m[<marker>]=<value>&m[<marker>]=<value>& ... &m[<marker>]=<value>

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.

Units

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:

Variable

Units

x

m

y

m

lat

degrees north

lon

degrees east

time

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?

Anyone!