netCDF  4.3.0
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Related Pages
Here is a list of all related documentation pages:
oTutorialBackground and Further Reading:
oWhat is NetCDF?NetCDF is a set of data formats, programming interfaces, and software libraries that help read and write scientific data files
oThe NetCDF UtilitiesThe ncdump command reads a netCDF file and outputs text in a format called CDL
oTools for Manipulating NetCDF FilesMany existing software applications can read and manipulate netCDF files
oThe NetCDF Programming APIsUnidata supports netCDF APIs in C, C++, Fortran 77, Fortran 90, and Java
oNetCDF DocumentationLanguage specific programming guides are available for netCDF for the C, C++, Fortran 77, Fortran 90, and Java APIs:
onetcdf_data_modelThe netCDF data model is the way that we think about data
oThe Classic ModelThe classic netCDF data model consists of variables, dimensions, and attributes
oThe Enhanced Data ModelWith netCDF-4, the netCDF data model has been extended, in a backwards compatible way
oFill ValuesSometimes there are missing values in the data, and some value is needed to represent them
oError HandlingEach netCDF function in the C, Fortran 77, and Fortran 90 APIs returns 0 on success, in the tradition of C
oUnlimited DimensionsSometimes you don't know the size of all dimensions when you create a file, or you would like to arbitrarily extend the file along one of the dimensions
oNetCDF Example ProgramsThe netCDF example programs show how to use netCDF
oThe simple_xy ExampleThis example is an unrealistically simple netCDF file, to demonstrate the minimum operation of the netCDF APIs
oThe sfc_pres_temp ExampleThis example has been constructed for the meteorological mind
oThe pres_temp_4D ExampleThis example expands on the previous example by making our two-dimensional data into four-dimensional data, adding a vertical level axis and an unlimited time step axis
oThe simple_nc4 ExampleThis example, like the simple_xy netCDF-3 example above, is an overly simplified example which demonstrates how to use groups in a netCDF-4 file
oThe simple_xy_nc4 ExampleThis example, like the simple_xy netCDF-3 example above, is an overly simplified example
oInteroperability with HDF5NetCDF-4 allows some interoperability with HDF5
oGroupsNetCDF-4 files can store attributes, variables, and dimensions in hierarchical groups
oUser Defined TypesNetCDF supported six data types through version 3.6.0 (char, byte, short, int, float, and double)
oStringsUse the NC_STRING type to store arrays of strings
oParallel I/O with NetCDF-4NetCDF-4 provides access to HDF5 parallel I/O features for netCDF-4/HDF5 files
oNumbering of NetCDF IDsIn C, Fortran 77, and Fortran 90, netCDF objects are identified by an integer: the ID
oCreating New Files and Metadata, an OverviewTo construct a netCDF file you need to:
oReading NetCDF Files of Known StructureTo read a netCDF file of known structure, you need to:
oReading NetCDF Files of Unknown StructurePerhaps you would like to write your software to handle more general cases, so that you don't have to adjust your source every time the grid size changes, or a variable is added to the file
oReading and Writing Subsets of DataUsually users are interested in reading or writing subsets of variables in a netCDF data file
oGetting NetCDFThe easiest way to get netCDF is through a package management program, such as rpm, yum, adept, and others
oBuilding NetCDFThe netCDF-C library and utilities require third-party libraries for full functionality
oBuilding with NetCDF-4 and the Remote Data ClientThe usual way of building netCDF requires the HDF5, zlib, and curl libraries
oBuilding NetCDF with Classic Library OnlyIt is possible to build the netCDF C libraries and utilities so that only the netCDF classic and 64-bit offset formats are supported, or the remote data access client is not built
oBuilding with HDF4 SupportThe netCDF-4 library can (since version 4.1) read HDF4 data files, if they were created with the SD (Scientific Data) API
oBuilding with Parallel I/O SupportFor parallel I/O to work, HDF5 must be installed with –enable-parallel, and an MPI library (and related libraries) must be made available to the HDF5 configure
oLinking to NetCDFFor static build, to use netCDF-4 you must link to all the libraries, netCDF, HDF5, zlib, szip (if used with HDF5 build), and curl (if the remote access client has not been disabled)
o./configure optionsNote: –disable prefix indicates that the option is normally enabled
oBuilding-with-CMake
oBuild Instructions for netCDF-C using CMake
owindows-binaries
oInstalling and Using netCDF-C Libraries in a Windows Environment
oThe NetCDF Users GuideSummary
oSummaryThe purpose of the Network Common Data Form (netCDF) interface is to allow you to create, access, and share array-oriented data in a form that is self-describing and portable
oThe NetCDF InterfaceThe Network Common Data Form, or netCDF, is an interface to a library of data access functions for storing and retrieving data in the form of arrays
oThe netCDF File FormatUntil version 3.6.0, all versions of netCDF employed only one binary data format, now referred to as netCDF classic format
oWhat about Performance?One of the goals of netCDF is to support efficient access to small subsets of large datasets
oCreating Self-Describing Data conforming to ConventionsThe mere use of netCDF is not sufficient to make data "self-describing" and meaningful to both humans and machines
oLimitations of NetCDFThe netCDF classic data model is widely applicable to data that can be organized into a collection of named array variables with named attributes, but there are some important limitations to the model and its implementation in software
oThe Data ModelA netCDF dataset contains dimensions, variables, and attributes, which all have both a name and an ID number by which they are identified
oName
oIs NetCDF a Good Archive Format?NetCDF classic or 64-bit offset formats can be used as a general-purpose archive format for storing arrays
oAttribute ConventionsAttribute conventions are assumed by some netCDF generic applications, e.g., ‘units’ as the name for a string attribute that gives the units for a netCDF variable
oBackground and Evolution of the NetCDF InterfaceThe development of the netCDF interface began with a modest goal related to Unidata's needs: to provide a common interface between Unidata applications and real-time meteorological data
oThe Remote Data Access Client
oData AccessTo access (read or write) netCDF data you specify an open netCDF dataset, a netCDF variable, and information (e.g., indices) identifying elements of the variable
oDimensionsA dimension may be used to represent a real physical dimension, for example, time, latitude, longitude, or height
oVariablesVariables are used to store the bulk of the data in a netCDF dataset
oCoordinate VariablesIt is legal for a variable to have the same name as a dimension
oAttributesNetCDF attributes are used to store data about the data (ancillary data or metadata), similar in many ways to the information stored in data dictionaries and schema in conventional database systems
oDifferences between Attributes and VariablesIn contrast to variables, which are intended for bulk data, attributes are intended for ancillary data, or information about the data
oParts of a NetCDF Classic FileA netCDF classic or 64-bit offset dataset is stored as a single file comprising two parts:
oParts of a NetCDF-4 HDF5 FileNetCDF-4 files are created with the HDF5 library, and are HDF5 files in every way, and can be read without the netCDF-4 interface
oThe Extended XDR LayerXDR is a standard for describing and encoding data and a library of functions for external data representation, allowing programmers to encode data structures in a machine-independent way
oLarge File SupportIt is possible to write netCDF files that exceed 2 GiByte on platforms that have "Large File Support" (LFS)
oNetCDF 64-bit Offset Format LimitationsAlthough the 64-bit offset format allows the creation of much larger netCDF files than was possible with the classic format, there are still some restrictions on the size of variables
oNetCDF Classic Format LimitationsThere are important constraints on the structure of large netCDF classic files that result from the 32-bit relative offsets that are part of the netCDF classic file format:
oThe NetCDF-3 I/O LayerThe following discussion applies only to netCDF classic and 64-bit offset files
oParallel Access with NetCDF-4Use the special parallel open (or create) calls to open (or create) a file, and then to use parallel I/O to read or write that file (see nc_open_par())
oInteroperability with HDF5To create HDF5 files that can be read by netCDF-4, use the latest in the HDF5 1.8.x series
oDAP SupportBeginning with netCDF version 4.1, optional support is provided for accessing data through OPeNDAP servers using the DAP protocol
oThe Chunk CacheWhen data are first read or written to a netCDF-4/HDF5 variable, the HDF5 library opens a cache for that variable
oThe Default Chunking Scheme in version 4.1(and 4.1.1)
oThe Default Chunking Scheme in version 4.0.1In the 4.0.1 release, the default chunk sizes were chosen with a different scheme, as demonstrated in the following C code:
oChunking and Parallel I/OWhen files are opened for read/write parallel I/O access, the chunk cache is not used
oA Utility to Help Benchmark Results: bm_fileThe bm_file utility may be used to copy files, from one netCDF format to another, changing chunking, filter, parallel I/O, and other parameters
oCDL SyntaxBelow is an example of CDL, describing a netCDF classic format file with several named dimensions (lat, lon, time), variables (z, t, p, rh, lat, lon, time), variable attributes (units, _FillValue, valid_range), and some data
oCDL Data TypesThe CDL primitive data types for the classic model are:
oCDL Notation for Data ConstantsThis section describes the CDL notation for constants
oncgenThe ncgen tool generates a netCDF file or a C or FORTRAN program that creates a netCDF dataset
oncdumpThe ncdump utility generates a text representation of a specified netCDF file on standard output, optionally excluding some or all of the variable data in the output
onccopyThe nccopy utility copies an input netCDF file in any supported format variant to an output netCDF file, optionally converting the output to any compatible netCDF format variant, compressing the data, or rechunking the data
oncgen3The ncgen3 tool is the new name for the older, original ncgen utility
oThe NetCDF Classic Format SpecificationTo present the format more formally, we use a BNF grammar notation
oNotes on Computing File OffsetsThe offset (position within the file) of a specified data value in a classic format or 64-bit offset data file is completely determined by the variable start location (the offset in the begin field), the external type of the variable (the nc_type field), and the dimension indices (one for each of the variable's dimensions) of the value desired
oExamplesBy using the grammar above, we can derive the smallest valid netCDF file, having no dimensions, no variables, no attributes, and hence, no data
oThe 64-bit Offset FormatThe netCDF 64-bit offset format differs from the classic format only in the VERSION byte, ‘\x02’ instead of ‘\x01’, and the OFFSET entity, a 64-bit instead of a 32-bit offset from the beginning of the file
oThe NetCDF-4 FormatThe netCDF-4 format implements and expands the netCDF-3 data model by using an enhanced version of HDF5 as the storage layer
oThe NetCDF-4 Classic Model FormatEvery classic and 64-bit offset file can be represented as a netCDF-4 file, with no loss of information
oHDF4 SD FormatStarting with version 4.1, the netCDF libraries can read HDF4 SD (Scientific Dataset) files
oData Type
oExternal Data TypesThe atomic external types supported by the netCDF interface are:
oData Structures in Classic and 64-bit Offset FilesThe only kind of data structure directly supported by the netCDF classic (and 64-bit offset) abstraction is a collection of named arrays with attached vector attributes
oType ConversionEach netCDF variable has an external type, specified when the variable is first defined
oNotes
oIgnored if NULLMany of the argurments of netCDF functions are pointers
oSpecify a HyperslabThe NetCDF allows specification of hyperslabs to be read or written with vectors which specify the start, count, stride, and mapping
oNetCDF IDMost netCDF function require the netCDF ID as a first parameter
oCDL
oNetCDF Library Architecture
oCopyrightCopyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 University Corporation for Atmospheric Research/Unidata
o\b ncdump tool - Convert netCDF file to text form (CDL)
o\b nccopy tool - Copy a netCDF file, optionally changing format, compression, or chunking in the output.
\Deprecated List

Generated on Tue Jul 9 2013 19:17:29 for netCDF. NetCDF is a Unidata library.