Describe NetCDF File (Multidimension)

Summary

Describes the nature and content of an input netCDF dataset. It lists all the variables along with their dimensions and 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 Output Description Table (out_table in Python) parameter generates a markdown file when you specify the file name or the full path to save. Specify the file name with the .md extension.

  • The output provides the following:

    • A summary of the dimensions in the netCDF file. It lists the names and sizes of each dimension in the corresponding variables.
    • A summary of the variables in the netCDF file. It lists the names, dimensions, and attributes of each variable.
    • The attributes associated with each variable. These attributes provide additional information about the variables, such as units, valid range, and history.

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.md.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)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics