Resources

Climate and Forecast (CF) netCDF format

A visualisation of significant wave height (m) at 19:00 hours on 01 June 2006. Imagery from the CoFEE project POLCOMS_WAM_HTD model run.
A visualisation of significant wave height (m) at 19:00 hours on 01 June 2006. Imagery from the CoFEE project POLCOMS_WAM_HTD model run. ©

This is a set of conventions, often referred to as "CF", developed as a community standard for encoding data in netCDF. They were initially developed for model-generated data, but have been extended in Version 1.6 to cover observational data.

The standard was initially developed by atmospheric modellers studying climate to ensure the data from different models were interoperable and intercomparable. CF was subsequently developed to cover oceanography and has been widely adopted by many oceanographic projects.

CF provides guidelines and recommendations on how to place usage metadata — information about data — within the netCDF file. This provides a definitive description of what the data in each variable represents, the spatial and temporal properties of the data and how a data value is representative of an interval or cell. As climate model data are often not simply representative of points in time and space, the standard can provide for the description of coordinate intervals, multidimensional cells and climatological time coordinates.

BODC has adopted SeaDataNet (SDN) CF as the binary delivery format for its holdings of model and observational data.

NetCDF data can be manipulated and displayed using a variety of freely available and commercial or licensed software packages. A list of these can be found on the UNIDATA web site.

Components of a SDN CF-compliant netCDF file

A brief summary follows but the full format specification is available from SeaDataNet.

Each file consists of two sections

1. The CF header

The CF metadata header is split into a number of components, namely; dimensions, variables and global attributes — an illustration of a CF header is also provided below.

  • Dimensions

    These state the dimensions of the structure that the data will reside in and must always have different names. Dimensions can be spatial, temporal or any other variable, but it should be noted that our current netCDF implementation only allows one dimension (the last dimension) to be defined as UNLIMITED. When appropriate the CF convention recommends that the dimensions be listed in the order TZYX, where T is time, Z is height or depth, Y is latitude and X is longitude.

  • Variables

    This contains information about the dimensions and the data variables. All names are unique within the netCDF file. They will be listed as dimension 1, dimension 2, ... dimension n, variable 1, variable 2 .... variable n.

    Each listed item describes the following information

    Data type — what the data are stored as. Examples include floating point ('float'), double precision ('double') or integer ('int') numbers.

    Units — If the listed item is a dimensional quantity, the units will be specified. CF convention requires that the 'units' attributes be representative of the physical quantity, although they do not necessarily have to be an exact match. Typically 'units' must be recognised by UNIDATA's UDUNITS package, although some exceptions are allowed.

    Content description — Although both are optional, CF convention strongly recommends the use of the 'standard_name' and/or the 'long_name' attribute to describe the listed item content.

    The 'standard_name' is a unique identifier that provides a precise description of the physical parameter being represented and has to be selected from the CF Standard Name table. Each 'standard_name' has associated units — these will be listed in the 'unit's attribute. It should be noted that not all variables can be defined by a 'standard_name' identifier.

    The 'long_name', as described by the netCDF Users Group (NUG), is a plaintext description of the variable. These are suitable for example, as a graph axis label and become particulary useful when no 'standard_name' identifier is available.

    In addition to having (where possible) a CF standard_name attribute for each variable, SDN require that the following SeaDataNet vocabulary terms be added as attributes. These terms are:

    Attribute 'sdn_parameter_urn': this is the SeaDataNet vocabulary code that best fits the variable in question

    Attribute 'sdn_parameter_name': this is the official SeaDataNet text string that is linked to the vocabulary code in 'sdn_parameter_urn'

    Attribute 'sdn_uom_urn': this is the SeaDataNet code for the units being used by the file originator to quantify the variable

    Attribute 'sdn_uom_name': this is the official SeaDataNet text string for the units described in 'sdn_uom_urn'

    Missing data values — The CF convention suggests that the '_FillValue' attribute be used to describe the dummy values for missing data within the file. These will be of the same data type as the data values themselves.

  • Global Attributes

    These provide useful discovery metadata. One attribute 'Conventions' is mandatory and describes the version of the CF metadata standard. If missing the CF netCDF file is not compliant. Other useful attributes include

    title — a succinct description of the data set
    insititute — the organisation where the data were produced
    source — how the data were produced, e.g. model type, run number and circumstances
    history — an audit trail of data set processing
    references — a list of references that describe the data or the methodology used
    comment — other useful information not covered elsewhere that adds value
    author — the person(s) who generated the data

An illustration of a CF metadata header for numerical model data
An illustration of a CF metadata header for numerical model data ©

2. The data section

This section of the file contains the actual values for each dimension and variable listed in the order specified in the CF header.