Describe NetCDF File (Multidimensional)

Summary

Describes the nature and content of an input netCDF dataset. List all the variables along with their dimensions and their attributes.

Usage

  • This tool supports netCDF-3 and netCDF-4 formats with .nc or .nc4 extensions.

  • This tool generates a geoprocessing message and an optional markdown file for output.

    The tool's geoprocessing messages describe the characteristics and contents of the input netCDF file. The messages include the following information about the netCDF file:

    • The input netCDF file path.
    • The Dimensions table describes the shape of the variables. There are three columns in the table: Dimension, Size, and Variables. The rows specify the dimension name, the size of the dimension, and the variables associated with the dimension.
    • The Variables table describes the variables. There are four columns in the table: Variable, Data Type, Dimensions, and Attributes. Each variable is associated with one or more dimensions and can store different types of data (such as integer, float, or char). The attributes provide context and details about the data stored in each variable such as units of measurement, descriptions, and missing values.
    • The Global Attributes table describes the metadata. There are two columns in the table: Attribute Name and Attribute Value. The table can be used to store general information such as the dataset’s origin, convention, history, and additional details.

  • If a value is provided for the Output Description File (out_file in Python) parameter, the tool creates a table that includes the content from the geoprocessing message. The output description file can be saved as .txt, .cdl, and .md files. If no file extension is provided, the output file will be saved as a .txt file.

  • This tool does not read a netCDF file generated by the Space Time Pattern Mining toolbox. Use the Describe Space Time Cube tool, which provides enhanced functionality, to describe the contents of this type of file.

Parameters

LabelExplanationData Type
Input NetCDF File

The input netCDF file that will be described.

File
Output Description File
(Optional)

The name of the output description markdown file that will contain summary information about the input netCDF file. Specify the file name with the .md extension.

File

arcpy.management.DescribeNetCDFFile(in_netCDF_file, {out_file})
NameExplanationData Type
in_netCDF_file

The input netCDF file that will be described.

File
out_file
(Optional)

The name of the output description markdown file that will contain summary information about the input netCDF file. Specify the file name with the .md extension.

File

Code sample

DescribeNetCDFFile example 1 (Python window)

Describes a netCDF file.

import arcpy    
arcpy.md.DescribeNetCDFFile(in_netCDF_file=r"C:\example\airtemp.nc")
DescribeNetCDFFile example 2 (stand-alone script)

Describes a netCDF file.

# Name: DescribeNetCDFFile.py  
# Description: Describe a NetCDF dataset.  

# Import system modules 
import arcpy 
 
# Set environment settings  
arcpy.env.workspace = "C:/data" 

# Set a variable 
in_netCDF_file = r"C:\example\airtemp.nc" 
out_file = r"C:\example\summary.md" 

# Run DescribeNetCDFFile 
arcpy.md.DescribeNetCDFFile(in_netCDF_file, out_file)