Make NetCDF Table View (Multidimension)

Summary

Makes a table view from a netCDF file.

Usage

Syntax

MakeNetCDFTableView_md (in_netCDF_file, variable, out_table_view, {row_dimension}, {dimension_values}, {value_selection_method})
ParameterExplanationData Type
in_netCDF_file

The input netCDF file.

File
variable
[variable,...]

The netCDF variable, or variables, used to create fields in the table view.

String
out_table_view

The name of the output table view.

Table View
row_dimension
[row_dimension,...]
(Optional)

The netCDF dimension, or dimensions, used to create fields populated with unique values in the table view. The dimension, or dimensions, set here determine the number of rows in the table view and the fields that will be present.

For instance, if stationID is a dimension in the netCDF file and has 10 values, by setting stationID as the dimension to use, 10 rows will be created in the table view. If stationID and time are used and there are 3 time slices, 30 rows will be created in the table view.

String
dimension_values
[[dimension {value}],...]
(Optional)

A set of dimension-value pairs used to specify a slice of a multidimensional variable.

Value Table
value_selection_method
(Optional)

Specifies the dimension value selection method.

  • BY_VALUE The input value is matched with the actual dimension value.
  • BY_INDEX The input value is matched with the position or index of a dimension value. The index is 0 based, that is, the position starts at 0.
String

Code Sample

MakeNetCDFTableView example 1 (Python window)

Creates a table view from a netCDF file.

import arcpy
arcpy.MakeNetCDFTableView_md("C:/data/netcdf/precipmonmean.nc","precip",
                             "precipmonmeantable","time")
MakeNetCDFTableView example 2 (stand-alone script)

Creates a table view from a netCDF file.

# MakeNetCDFTableView_Ex_02.py
# Description: Create a table view from a netCDF file.
# Requirements: None

#Import system modules
import arcpy

# Set local variables
inNetCDFFile = "c:/data/netcdf/precipmonmean.nc"
variable = "precip;humidity"
outTableView = "precipmonmeantable"
rowDimension = "time"
dimensionValue = ""
valueSelectionMethod = ""

# Execute MakeNetCDFTableView
arcpy.MakeNetCDFTableView_md(inNetCDFFile, variable, outTableView, rowDimension, 
                             dimensionValue,valueSelectionMethod)

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

6/6/2013