This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

NetCDF (.nc)

MIME type: application/x-netcdf
NetCDF data file format.
Self-describing format for exchanging scientific data.
Used in atmospheric research, GIS, and related fields.
NetCDF is an acronym derived from network Common Data Form.
Binary file format.
Conceptually based on NASA's Common Data Format, but incompatible with this format.
Developed by the Unidata center at the University Corporation for Atmospheric Research (UCAR).
  • Import imports a netCDF file, returning the names of the datasets stored in the file.
  • Export exports a data array to a netCDF file.
  • Import returns a list of strings representing the names of all datasets contained in the file.
  • Export creates a netCDF file, storing the data arrays as separate datasets.
  • Import imports the specified element from a netCDF file.
  • Import imports multiple elements.
  • Export creates a netCDF file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation elements:
"Data"all datasets imported as a list of arrays
"Datasets"names of all datasets
  • Import by default uses the element for the netCDF format.
  • Specifying and selecting datasets:
"Datasets", nn^(th) dataset
"Datasets", datasetnamed dataset
  • Meta-information elements:
"Annotations"meta-information for each dataset
"DataFormat"type used to represent each dataset
"Dimensions"data dimensions of each dataset
"Metadata"general meta-information as a list of rules
  • The following values can be given for :
"Integer8"8-bit integers
"Integer16"16-bit integers
"Integer32"32-bit integers
"UnsignedInteger8"unsigned 8-bit integers (Export only)
"Real32"IEEE single-precision numbers
"Real64"IEEE double-precision numbers
"String"strings of ASCII characters
Get the names of datasets stored in a netCDF file:
Import a dataset:
Render the imported data as graphics:
Read meta-information from a netCDF file:
Export raster image data to the netCDF format:
This gives the names of the datasets stored in this file:
Get the names of datasets stored in a netCDF file:
In[1]:=
Click for copyable input
Out[1]=
 
Import a dataset:
In[1]:=
Click for copyable input
Render the imported data as graphics:
In[2]:=
Click for copyable input
Out[2]=
 
Read meta-information from a netCDF file:
In[1]:=
Click for copyable input
Out[1]=
 
Export raster image data to the netCDF format:
In[1]:=
Click for copyable input
Out[1]=
This gives the names of the datasets stored in this file:
In[2]:=
Click for copyable input
Out[2]=