Table to NetCDF (Multidimension)

License Level:BasicStandardAdvanced

Summary

Converts a table to a netCDF file.

Usage

Syntax

TableToNetCDF_md (in_table, fields_to_variables, out_netCDF_file, {fields_to_dimensions})
ParameterExplanationData Type
in_table

The input table.

Table View
fields_to_variables
[[field, {variable}, {units}],...]

The field or fields used to create variables in the netCDF file.

  • field—A field in the input table.
  • {variable}—The netCDF variable name.
  • {units}—The units of the data represented by the field.
Value Table
out_netCDF_file

The output netCDF file. The filename must have a .nc extension.

File
fields_to_dimensions
[[field, {dimension}, {units}],...]
(Optional)

The field or fields used to create dimensions in the netCDF file.

  • Field—A field in the input table.
  • {dimension}—The netCDF dimension name.
  • {units}—The units of the data represented by the field.
Value Table

Code Sample

TableToNetCDF example 1 (Python window)

Converts a table to a netCDF file.

import arcpy
arcpy.TableToNetCDF_md("c:/data/netcdfgisdata/rainfall.dbf",
                       "longitude longitude degree_east;latitude latitude degree_north",
                       "c:/output/rain.nc","station station")
TableToNetCDF example 2 (stand-alone script)

Converts a table to a netCDF file.

# Name: TableToNetCDF_Ex_02.py
# Description: 
# Requirements: none

# Import system modules
import arcpy

# Set local variables
inTable = "c:/data/netcdfgisdata/rainfall.dbf"
fieldVariableUnits = "longitude longitude degree_east;latitude latitude degree_north"
outNetCDFFile = "c:/output/rain.nc"
fieldDimensionUnits = "station station"

# Execute SelectByDimension
import arcpy
arcpy.TableToNetCDF_md(inTable, fieldVariableUnits, outNetCDFFile, fieldDimensionUnits)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/1/2012