Skip to main content
U.S. flag

An official website of the United States government

NetCDF Templates


NCEI NetCDF Templates allow data producers to create netCDF datasets that conform to Unidata’s Attribute Convention for Dataset Discovery (ACDD) and Climate and Forecast (CF) Conventions. There are multiple netCDF templates available for the "feature types" defined by the Unidata and CF Conventions. Adding to these established conventions, NCEI also recommends several best practices to optimize netCDF variables and attributes for long term preservation, scientific quality control, product development, and data re-use. 

These templates are provided as guidance to our data producers, and are also used for internal  data development efforts. They are also starting points for making more preservable, discoverable, accessible, and interoperable data. It is important to note that these templates do not represent an attempt to create a new standard or convention, and they are not required for archiving data at NCEI. NCEI highly encourages data producers to use these templates for their netCDF datasets and has representatives available to assist in their implementation.

Key Principles

  1. Provide accurate attribute values, and explicitly identify unknown variables.  Avoid "NA" or "N/A", as they can have multiple meanings.
  2. Keep attributes focused on the content of the file, not the overall collection. Consider providing an FGDC or an ISO 19115-2 (preferred by NCEI) metadata record to document broader information about the collection.,
  3. Remember that ACDD and CF should include "discovery" and "use" metadata designed to help users locate files and deploy them in applications. These attributes aren’t intended to capture every possible detail of data provenance or processing information.

Note: These templates aren’t designed to cover every possibility: they address most of the higher level situations involving environmental observations. Use them when possible, and consider more detailed representations detailed in the full CF documentation for more complex situations.


The netCDF Templates are maintained to stay current with evolving ACDD and CF Conventions. Please choose the current netCDF Template version when starting a new dataset.

Version Release Date Description
v2.0 2015-12-07
  • New template for swath data
  • Updated attributes to conform to ACDD 1.3
  • Updated guidance table
  • Minor corrections and improvements
v1.1 2014-05-12 Minor corrections
v1.0 2012-04-26 Initial version

We welcome comments, questions, and suggestions for recommended attributes. Please submit concerns to We will evaluate feedback and update the templates as needed, likely on an annual basis.

Frequently Asked Questions

Should the content in each netCDF file be explicit to the file or the overall collection?
The intent of attributes is to describe the data contained within the netCDF file, not the entire dataset spanning multiple files.

Platforms which do not have call signs, IMO numbers, or WMO numbers; how should the Platform ID attribute be used?
If you are certain the WMO code does not exist, simply omit the wmo_code attribute or use the attribute wmo_code="Not applicable". If you are unsure if a code exists, use the following example format:

int platform_variable;
platform_variable:long_name = "Sea Spray" ;
platform_variable:comment = "Example platform container variable" ;
platform_variable:call_sign = "Unknown" ;
platform_variable:ices_code = "320D"; // ICES codes at:
platform_variable:wmo_code = "Unknown";//Information on getting WMO codes is available at
platform_variable:imo_code = "Unknown";

Are Boolean flags required? or can you just have an enumerated flag?
The CF Conventions permit the use of boolean flag variables, enumerated flag variables, and a hybrid flag variable type that is a combination of the two. However, using the later case is incredibly difficult to explain and properly use. We recommend keeping them strictly enumerated or strictly boolean.

What if we have multiple instruments that recorded data on different sampling grids?
It is recommended that you separate the data from the instruments measuring at different frequencies into different netCDF files.

How do we determine what to input for the sea_name attribute?
We recommend that people use the actual sea name (example, "Labrador Sea" ) in the sea_name attribute. We are considering providing a web service for people to submit a coordinate and get all of the authoritative sea names that are affiliated with that area. However this will take some effort and we do not have a firm deadline in place yet.

What are 'accepted' fill values to use in the __FillValue attribute?
There is no single universally accepted fill value in use. However, if you are using the netCDF library to create your data, it will provide a default fill value for each data type (e.g. NC_FILL_CHAR, NC_FILL_BYTE, NC_FILL_SHORT, NC_FILL_INT, NC_FILL_FLOAT, and NC_FILL_DOUBLE in C). NCEI recommends the use of these defaults over the use of "nan" or "inf."

How do you define the geospatial_*_resolution attribute?
These attributes are an attempt to convey sample density not accuracy.

What is the significance of the global attribute uuid?
We are suggesting the inclusion of UUIDs to facilitate many possible future activities such as duplicate checking, version management, and rich inventories.

When defining the attribute 'coordinates' for geophysical_variable_n, does the order of the coordinate variables listed matter?
The order does not matter.