CEDA Help Page for NetCDF format
Source: environment.data.gov.uk (2018-06-19)

NAMBLEX - North Atlantic Marine Boundary Layer EXperiment  dataset collection: chemical and meteorological atmospheric measurements. The North Atlantic Marine Boundary Layer EXperiment (NAMBLEX) campaign was an atmospheric composition campaign conducted at Mace Head in Ireland from 24 July 2002 to 3 September 2002. The data consist of chemical and meteorological atmospheric measurements, model data and trajectories from a number of instruments, including several from the Universities Facility for Atmospheric Measurements (UFAM). The chemical species measured includes: O3, CO, H2, DMS, CH4, NMHC, NOx, NOy, PAN, VOCs, HCHO, peroxides, organo-halogenated species, a range of shorter lived halogen species (I2, OIO, IO, BrO), NO3 radicals, photolysis frequencies, and the free radicals OH, HO2 and (HO2 + Σ RO2). The BADC is the primary archiving and distribution data centre for NAMBLEX.

- Help Doc Home (/)
- CEDA Archive and Services (/collection/1-ceda-archive-and-services)
- CEDA Data Archiving Procedures (/collection/4514-ceda-data-archiving-procedures)
- Contact (#)
- Contact (#)
NetCDF format

This is intended as a short introduction to netCDF data. The complete netCDF documentation can be found on the UNIDATA (https://www.unidata.ucar.edu/software/netcdf/) web site.

Quick links to
- Climate and Forecast (CF) Metadata Convention Page from CEDA (//help.ceda.ac.uk/article/4507-the-cf-metadata-convention)
- List of downloadable software to write, read and handle NetCDF files (#reading)
Contents
- What is NetCDF? (#what)
- Why use NetCDF? (#why)
- NetCDF and the Climate and Forecast (CF) Metadata Convention (#cf)
- What's in a NetCDF file? (#cf_huh) – Example.
- Reading and writing NetCDF files (#reading) – Including links to downloadable software packages.
- Further information (#more) – On NetCDF and the Climate Forecast (CF) Metadata Convention.
What is netCDF?

NetCDF (network Common Data Form) is an interface for array-orientated data access and a library that provides an implementation of that interface. Many groups have adopted netCDF as a standard way to represent their scientific data. The netCDF software was developed at the Unidata Program Center in Boulder Colorado USA.

Why use netCDF?

The NetCDF format has a wide range of reasons why it is one of CEDA's recommended formats, including:
- being extensively used within the atmospheric and oceanic science communities.
- being a portable self-describing binary data format.
- it is network-transparent, meaning that it can be accessed by computers that store integers, characters and floating-point numbers in different ways.
- it provides direct-access: a small subset of a large dataset may be accessed efficiently, without first reading through all the preceding data.
- it is appendable: data can be appended to a netCDF dataset along one dimension without copying the dataset or redefining its structure.
- datasets can be read and written in a number of languages, these include C, C++, FORTRAN, IDL, Python, Perl, and Java.
- the different language implementations are freely (https://www.unidata.ucar.edu/software/netcdf/software.html) available from the UNIDATA ftp area (ftp://ftp.unidata.ucar.edu/pub/netcdf/)
- several graphics packages support netCDF input, making it very easy to display and analyse netCDF datasets. For instance FERRET (https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/data-set-basics/NETCDF-DATA) and UVCDAT (https://uvcdat.llnl.gov/index.html) provide both command line and graphical user interfaces for displaying and analysing gridded data.
- netCDF is completely and methodically documented in UNIDATA's NetCDF User's Guide (https://www.unidata.ucar.edu/software/netcdf/docs/).
- several groups have defined conventions (https://www.unidata.ucar.edu/software/netcdf/conventions.html) for netCDF files, to enable the exchange of data. CEDA has adopted the Climate and Forecasting (CF) conventions (//help.ceda.ac.uk/article/4507-the-cf-metadata-convention) for netCDF data.
NetCDF and CF conventions

CEDA supports and strongly recommends the compliance with the Climate and Forecast (CF) Metadata Convention (http://cfconventions.org/).

The CF conventions are guidelines and recommendations as to where to put information within a netCDF file, and they provide advice as to what type of information you might want to include. CF conventions allow the creator of the dataset to include information about the data and the dataset itself (metadata) in a structured way, which makes it easier for other users to retrieve the information. Global attributes describe the general properties and origins of the dataset while local attributes are used to characterise the recorded variables.

CEDA provides an Introduction to the CF Convention (//help.ceda.ac.uk/article/4507-the-cf-metadata-convention), illustrated by some examples.

What's in a netCDF file?

This is best described with the following very simple example (http://zonda1.badc.rl.ac.uk/help/formats/netcdf/nc_example.html) of a netCDF file with CF conventions applied. In this you will see that a netCDF dataset (the filename ends in .nc) is made up of three basic components:
- variables
- dimensions
- attributes
The variables store the actual data, the dimensions give the relevant dimension information for the variables, and the attributes provide auxiliary information about the variables or the dataset itself. You can study an example of a netCDF file (//help.ceda.ac.uk/) and see more details of the components in a netCDF dataset. The global attributes can also be added to the netCDF file, following CF conventions (//help.ceda.ac.uk/article/4432-ceda-cf-examples).

Reading and writing netCDF

The popularity of netCDF stems from its portability and relative ease of use. Although it is a binary data format the netCDF distribution comes complete with the ncdump utility which produces an ASCII dump of the dataset and thereby provides a quick-look facility. You can also generate netCDF files from ASCII data files using the ncgen utility.

The datasets are commonly written and read using library routines. The library routines are sensibly named and relatively consistently named across the different language implementations.

Help and tools

1. Guidance and tools provided by CEDA:
- Installing the netCDF package provided by Unidata and trying out ncgen and ncdump. – Converting NetCDF to ASCII.
- XCONV/CONVSH (http://cms.ncas.ac.uk/documents/xconv/) – Allows visualisation, conversion and subsetting of NetCDF data on Unix/Linux systems.
- NetCDF format checker (https://ceda-wps-ui.ceda.ac.uk/processes/list?wps=compliance_checker) – If you wish to check that files are correctly formatted before uploading them to CEDA, please use this online tool.
2. Selected links to available online software packages to write, read and handle NetCDF files:

Software for Manipulating or Displaying NetCDF Data (https://www.unidata.ucar.edu/software/netcdf/software.html) – A list of links to a variety of freely available and commercial or licensed software packages to create or handle NetCDF files, provided by Unidata (https://www.unidata.ucar.edu/) at UCAR (USA).
- cf-python (https://ncas-cms.github.io/cf-python/): a Python Earth Science data analysis library that is built on a complete implementation of the CF data model.
- iris (https://scitools-iris.readthedocs.io/): a powerful, format-agnostic, community-driven Python package for analysing and visualising Earth science data.
- NCL (http://www.ncl.ucar.edu/): NCAR Command Language (NCL), an interpreted language designed for scientific data analysis and visualisation. It supports netCDF-3/4, GRIB-1/2, HDF4-SDS, HDF4-EOS, HDF5-EOS and shapefiles.
- xarray (http://xarray.pydata.org/en/stable/): (formerly xray) is an open-source project and Python package that makes working with labelled multi-dimensional arrays simple, efficient, and fun!
Further information

For a more extensive description you are urged to read the UNIDATA documentation on netCDF (https://www.unidata.ucar.edu/software/netcdf/docs/).

The UNIDATA documentation also provides the File Format Specification (https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications.html) for netCDF and Best Practice recommendations on writing netCDF files (https://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html).

The NetCDF Climate and Forecast (CF) Metadata Convention (http://cfconventions.org/) defines metadata that provide a definitive description of what the data in each variable represents, and of the spatial and temporal properties of the data. The CF conventions generalize and extend the COARDS conventions developed under the sponsoring of NOAA.

Yes No

Still need help? Contact Us (#) Contact Us (#)

Categories
- Using CEDA Data Archive (/category/12-using-ceda-data-archive)
- Archiving Data with CEDA (/category/13-archiving-data-with-ceda)
- CEDA Accounts (/category/14-ceda-accounts)
- CEDA Services (/category/15-ceda-services)
- Formats (/category/4423-formats)
- Dataset Docs (/category/95-dataset-docs)
- Policy Documents (/category/4858-policy-documents)
No Results Found. Try searching across all CEDA sites?

© Centre for Environmental Analysis (CEDA) (http://archive.ceda.ac.uk) 2026. Powered by Help Scout (https://www.helpscout.com/docs-refer/?co=Centre+for+Environmental+Analysis+%28CEDA%29&utm_source=docs&utm_medium=footerlink&utm_campaign=Docs+Branding)