Netcdf
   HOME

TheInfoList



OR:

NetCDF (Network Common Data Form) is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. The project homepage is hosted by the Unidata program at the University Corporation for Atmospheric Research (UCAR). They are also the chief source of netCDF software, standards development, updates, etc. The format is an
open standard An open standard is a standard that is openly accessible and usable by anyone. It is also a common prerequisite that open standards use an open license that provides for extensibility. Typically, anybody can participate in their development due to ...
. NetCDF Classic and 64-bit Offset Format are an international standard of the
Open Geospatial Consortium The Open Geospatial Consortium (OGC) is an international voluntary consensus standards organization that develops and maintains international standards for geospatial content and location-based services, sensor web, Internet of Things, Geographi ...
.


History

The project started in 1988 and is still actively supported by UCAR. The original netCDF binary format (released in 1990, now known as "netCDF classic format") is still widely used across the world and continues to be fully supported in all netCDF releases. Version 4.0 (released in 2008) allowed the use of the HDF5 data file format. Version 4.1 (2010) added support for C and Fortran client access to specified subsets of remote data via OPeNDAP. Version 4.3.0 (2012) added a CMake build system for
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
builds. Version 4.7.0 (2019) added support for reading Amazon S3 objects. Version 4.8.0 (2021) added further support for Zarr. Version 4.9.0 (2022) added support for Zstandard compression. Further releases are planned to improve performance, add features, and fix bugs. The format was originally based on the conceptual model of the Common Data Format developed by
NASA The National Aeronautics and Space Administration (NASA ) is an independent agencies of the United States government, independent agency of the federal government of the United States, US federal government responsible for the United States ...
, but has since diverged and is not compatible with it.


Format description

The netCDF libraries support multiple different binary formats for netCDF files: * The classic format was used in the first netCDF release, and is still the default format for file creation. * The 64-bit offset format was introduced in version 3.6.0, and it supports larger variable and file sizes. * The netCDF-4/HDF5 format was introduced in version 4.0; it is the HDF5 data format, with some restrictions. * The HDF4 SD format is supported for read-only access. * The CDF5 format is supported, in coordination with the parallel-netcdf project. All formats are " self-describing". This means that there is a header which describes the layout of the rest of the file, in particular the data
arrays An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
, as well as arbitrary file metadata in the form of name/value attributes. The format is platform independent, with issues such as
endianness file:Gullivers_travels.jpg, ''Gulliver's Travels'' by Jonathan Swift, the novel from which the term was coined In computing, endianness is the order in which bytes within a word (data type), word of digital data are transmitted over a data comm ...
being addressed in the software libraries. The data are stored in a fashion that allows efficient subsetting. Starting with version 4.0, the netCDF API allows the use of the HDF5 data format. NetCDF users can create HDF5 files with benefits not available with the netCDF format, such as much larger files and multiple unlimited dimensions. Full backward compatibility in accessing old netCDF files and using previous versions of the C and Fortran APIs is supported.


Software


Access libraries

The software libraries supplied by UCAR provide read-write access to netCDF files, encoding and decoding the necessary arrays and metadata. The core library is written in C, and provides an
application programming interface An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API) for C, C++ and two APIs for Fortran applications, one for Fortran 77, and one for Fortran 90. An independent implementation, also developed and maintained by Unidata, is written in 100%
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, which extends the core data model and adds additional functionality. Interfaces to netCDF based on the C library are also available in other languages including R (''ncdf'', ''ncvar'' and ''RNetCDF'' packages), Perl Data Language, Python,
Ruby Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
,
Mathematica Wolfram (previously known as Mathematica and Wolfram Mathematica) is a software system with built-in libraries for several areas of technical computing that allows machine learning, statistics, symbolic computation, data manipulation, network ...
,
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
,
Interactive Data Language IDL, short for Interactive Data Language, is a programming language used for data analysis. It is popular in particular areas of science, such as astronomy, atmospheric physics and medical imaging. IDL shares a common Syntax (programming langua ...
(IDL), Julia and
Octave In music, an octave (: eighth) or perfect octave (sometimes called the diapason) is an interval between two notes, one having twice the frequency of vibration of the other. The octave relationship is a natural phenomenon that has been referr ...
. The specification of the API calls is very similar across the different languages, apart from inevitable differences of syntax. The API calls for version 2 were rather different from those in version 3, but are also supported by versions 3 and 4 for backward compatibility. Application programmers using supported languages need not normally be concerned with the file structure itself, even though it is available as open formats.


Applications

A wide range of application software has been written which makes use of netCDF files. These range from command line utilities to graphical visualization packages. A number are listed below, and a longer list is on the UCAR website. * A commonly used set of
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
command line utilities for netCDF files is the NetCDF Operators (NCO) suite, which provide a range of commands for manipulation and analysis of netCDF files including basic record concatenating,
array slicing In computer programming, array slicing is an operation that extracts a subset of elements from an array and packages them as another array, possibly in a different dimension from the original. Common examples of array slicing are extracting a ...
and averaging. * ncBrowse is a generic netCDF file viewer that includes Java graphics, animations and 3D visualizations for a wide range of netCDF file conventions. * ncview is a visual browser for netCDF format files. This program is a simple, fast, GUI-based tool for visualising fields in a netCDF file. One can browse through the various dimensions of a data array, taking a look at the raw data values. It is also possible to change color maps, invert the data, etc. * Panoply is a netCDF file viewer developed at the NASA Goddard Institute for Space Studies which focuses on presentation of geo-gridded data. It is written in
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and thus platform independent. Although its feature set overlaps with ncBrowse and ncview, Panoply is distinguished by offering a wide variety of map projections and ability to work with different scale color tables. * The
NCAR Command Language The US National Center for Atmospheric Research (NCAR ) is a US federally funded research and development center (FFRDC) managed by the nonprofit University Corporation for Atmospheric Research (UCAR) and funded by the National Science Foundatio ...
(NCL) is used to analyze and visualize data in netCDF files (among other formats). * The Python programming language can access netCDF files with the PyNIO module (which also facilitates access to a variety of other data formats). netCDF files can also be read with the Python module netCDF4-python, and into a pandas-like DataFrame with the xarray module. * Ferret is an interactive computer visualization and analysis environment designed to meet the needs of oceanographers and meteorologists analyzing large and complex gridded data sets. Ferret offers a Mathematica-like approach to analysis; new variables may be defined interactively as mathematical expressions involving data set variables. Calculations may be applied over arbitrarily shaped regions. Fully documented graphics are produced with a single command. *
GrADS The Grid Analysis and Display System (GrADS) is an interactive desktop tool that is used for easy access, manipulation, and visualization of earth science data. The format of the data may be either binary, GRIB, NetCDF, or HDF-SDS (Scientific ...
(Grid Analysis and Display System) is an interactive desktop tool that is used for easy access, manipulation, and visualization of earth science data. GrADS has been implemented worldwide on a variety of commonly used operating systems and is freely distributed over the Internet. * nCDF_Browser is a visual nCDF browser, written in the IDL programming language. Variables, attributes, and dimensions can be immediately downloaded to the IDL command line for further processing. All the Coyote Library files necessary to run nCDF_Browser are available in the zip file. * ArcGIS versions after 9.2 support netCDF files that follow the
Climate and Forecast Metadata Conventions The Climate and Forecast (CF) metadata conventions are conventions for the description of Earth sciences data, intended to promote the processing and sharing of data files. The metadata defined by the CF conventions are generally included in the ...
and contain rectilinear grids with equally-spaced coordinates. The Multidimensional Tools toolbox can be used to create raster layers, feature layers, and table views from netCDF data in ArcMap, or convert feature, raster, and table data to netCDF. * OriginPro version 2021b supports netCDF CF Convention. Averaging can be performed during import to allow handling of large datasets in a GUI software. * The
GDAL The Geospatial Data Abstraction Library (GDAL) is a computer software library for reading and writing raster and vector geospatial data formats (e.g. shapefile), and is released under the permissive X/MIT style free software license by the ...
(Geospatial Data Abstraction Library) provides support for read and write access to netCDF data. * netCDF Explorer is a multi-platform graphical browser for netCDF files. netCDF Explorer can browse files locally or remotely, by means of OPeNDAP * R supports netCDF through packages such as ''ncdf4'' (including HDF5 support) or ''RNetCDF'' (no HDF5 support). * HDFql enables users to manage netCDF-4/HDF5 files through a high-level language (similar to SQL) in C, C++, Java, Python, C#, Fortran and R. * Metview workstation and batch system from the European Centre for Medium-Range Weather Forecasts (ECMWF) can handle NetCDF together with GRIB and BUFR. * OpenChrom ships a converter under the terms of the Eclipse Public License


Common uses

It is commonly used in
climatology Climatology (from Greek , ''klima'', "slope"; and , '' -logia'') or climate science is the scientific study of Earth's climate, typically defined as weather conditions averaged over a period of at least 30 years. Climate concerns the atmospher ...
,
meteorology Meteorology is the scientific study of the Earth's atmosphere and short-term atmospheric phenomena (i.e. weather), with a focus on weather forecasting. It has applications in the military, aviation, energy production, transport, agricultur ...
and
oceanography Oceanography (), also known as oceanology, sea science, ocean science, and marine science, is the scientific study of the ocean, including its physics, chemistry, biology, and geology. It is an Earth science, which covers a wide range of to ...
applications (e.g.,
weather forecasting Weather forecasting or weather prediction is the application of science and technology forecasting, to predict the conditions of the Earth's atmosphere, atmosphere for a given location and time. People have attempted to predict the weather info ...
,
climate change Present-day climate change includes both global warming—the ongoing increase in Global surface temperature, global average temperature—and its wider effects on Earth's climate system. Climate variability and change, Climate change in ...
) and GIS applications. It is an input/output format for many GIS applications, and for general scientific data exchange. To quote from their site: : "NetCDF (network Common Data Form) is a set of interfaces for array-oriented data access and a freely-distributed collection of data access libraries for C, Fortran, C++, Java, and other languages. The netCDF libraries support a machine-independent format for representing scientific data. Together, the interfaces, libraries, and format support the creation, access, and sharing of scientific data."


Conventions

The Climate and Forecast (CF) conventions are metadata conventions for earth science data, intended to promote the processing and sharing of files created with the NetCDF Application Programmer Interface (API). The conventions define metadata that are included in the same file as the data (thus making the file "self-describing"), that provide a definitive description of what the data in each variable represents, and of the spatial and temporal properties of the data (including information about grids, such as grid cell bounds and cell averaging methods). This enables users of data from different sources to decide which data are comparable, and allows building applications with powerful extraction, regridding, and display capabilities.


Parallel-NetCDF

An extension of netCDF for
parallel computing Parallel computing is a type of computing, computation in which many calculations or Process (computing), processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. ...
called Parallel-NetCDF (or PnetCDF) has been developed by
Argonne National Laboratory Argonne National Laboratory is a Federally funded research and development centers, federally funded research and development center in Lemont, Illinois, Lemont, Illinois, United States. Founded in 1946, the laboratory is owned by the United Sta ...
and
Northwestern University Northwestern University (NU) is a Private university, private research university in Evanston, Illinois, United States. Established in 1851 to serve the historic Northwest Territory, it is the oldest University charter, chartered university in ...
. This is built upon MPI-IO, the I/O extension to
MPI MPI or Mpi may refer to: Science and technology Biology and medicine * Magnetic particle imaging, a tomographic technique * Myocardial perfusion imaging, a medical procedure that illustrates heart function * Mannose phosphate isomerase, an enzyme ...
communications. Using the high-level netCDF data structures, the Parallel-NetCDF libraries can make use of optimizations to efficiently distribute the file read and write applications between multiple processors. The Parallel-NetCDF package can read/write only classic and 64-bit offset formats. Parallel-NetCDF cannot read or write the HDF5-based format available with netCDF-4.0. The Parallel-NetCDF package uses different, but similar APIs in Fortran and C. Parallel I/O in the Unidata netCDF library has been supported since release 4.0, for HDF5 data files. Since version 4.1.1 the Unidata NetCDF C library supports parallel I/O to classic and 64-bit offset files using the Parallel-NetCDF library, but with the NetCDF API.


Interoperability of C/Fortran/C++ libraries with other formats

The netCDF C library, and the libraries based on it (Fortran 77 and Fortran 90, C++, and all third-party libraries) can, starting with version 4.1.1, read some data in other data formats. Data in the HDF5 format can be read, with some restrictions. Data in the HDF4 format can be read by the netCDF C library if created using the HDF4 Scientific Data (SD) API.


NetCDF-Java common data model

The NetCDF-Java library currently reads the following file formats and remote access protocols: * BUFR Format Documentation (ongoing development) * CINRAD level II (Chinese Radar format) * DMSP ( Defense Meteorological Satellite Program) * DORADE radar file format * GINI (
GOES The Geostationary Operational Environmental Satellite (GOES), operated by the United States' National Oceanic and Atmospheric Administration (NOAA)'s National Environmental Satellite, Data, and Information Service division, supports weather fo ...
Ingest and
NOAA The National Oceanic and Atmospheric Administration (NOAA ) is an American scientific and regulatory agency charged with forecasting weather, monitoring oceanic and atmospheric conditions, charting the seas, conducting deep-sea exploratio ...
PORT Interface) image format * GEMPAK gridded data * GRIB version 1 and version 2 (ongoing work on tables) * GTOPO 30-sec elevation dataset (
USGS The United States Geological Survey (USGS), founded as the Geological Survey, is an government agency, agency of the United States Department of the Interior, U.S. Department of the Interior whose work spans the disciplines of biology, geograp ...
) * Hierarchical Data Format (HDF4, HDF-EOS2, HDF5, HDF-EOS5) * NetCDF (classic and large format) * NetCDF-4 (built on HDF5) * NEXRAD Radar level 2 and level 3. There are a number of other formats in development. Since each of these is accessed transparently through the NetCDF API, the NetCDF-Java library is said to implement a common data model for scientific datasets. The Java common data model has three layers, which build on top of each other to add successively richer semantics: # The ''data access'' layer, also known as the syntactic layer, handles data reading. # The ''coordinate system'' layer identifies the coordinates of the data arrays. Coordinates are a completely general concept for scientific data; specialized georeferencing coordinate systems, important to the Earth Science community, are specially annotated. # The ''scientific data type'' layer identifies specific types of data, such as grids, images, and point data, and adds specialized methods for each kind of data. The
data model A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. For instance, a data model may specify that the data element representing a car be ...
of the data access layer is a generalization of the NetCDF-3 data model, and substantially the same as the NetCDF-4 data model. The coordinate system layer implements and extends the concepts in the
Climate and Forecast Metadata Conventions The Climate and Forecast (CF) metadata conventions are conventions for the description of Earth sciences data, intended to promote the processing and sharing of data files. The metadata defined by the CF conventions are generally included in the ...
. The scientific data type layer allows data to be manipulated in coordinate space, analogous to the
Open Geospatial Consortium The Open Geospatial Consortium (OGC) is an international voluntary consensus standards organization that develops and maintains international standards for geospatial content and location-based services, sensor web, Internet of Things, Geographi ...
specifications. The identification of coordinate systems and data typing is ongoing, but users can plug in their own classes at runtime for specialized processing.


See also

* CGNS (Computational fluid dynamics General Notation System) * EAS3 (Ein-Ausgabe-System) *
FITS Flexible Image Transport System (FITS) is an open standard defining a digital file format used for storage, transmission and processing of data: formatted as multi-dimensional arrays (for example a 2D image), or tables. FITS is the most commonl ...
(Flexible Image Transport System) * Tecplot binary files * XDMF (eXtensible Data Model Format) * XMDF (eXtensible Model Data Format)


References


External links

* *
NetCDF User's Guide
— describes the file format * tp://ftp.uni-duisburg.de/FlightGear/Devel/An_Introduction_to_Distributed_Visualization.pdf "An Introduction to Distributed Visualization"{cbignore, bot=medic; section 4.2 contains a comparison of CDF, HDF, and netCDF.
Animating NetCDF Data in ArcMap


Computer file formats Earth sciences data formats Earth sciences graphics software Meteorological data and networks