Make NetCDF Table View (Multidimension)

Summary

Makes a table view from a netCDF file.

Usage

  • Table views are tables stored in memory and are the same as Standalone Tables in the ArcGIS Pro Contents pane.

  • Table views can be used as inputs to other geoprocessing tools in the current Windows session. Once Windows exits, the tables in memory are removed. To save the table view to a permanent table that can be used in later Windows sessions, use the Copy Rows tool.

  • This tool supports netCDF files with .nc and .nc4 extensions. The group variables and dimensions within a group in a .nc4 file are not supported. Only the variables and dimensions outside of the group are supported.

  • An existing table view will be overwritten if the same table view name is entered.

  • The number of records in the table view is the same as the number of unique values in the row dimension. If multiple dimensions are selected, the number of records is the product of the number of unique values in those dimensions.

  • The output table contains only one record if no row dimension is specified. The values in the fields represent the slice specified by the dimension-value pairs.

  • The type of field is determined by the netCDF variable and dimension type.

  • The first value of a non-row dimension is used to create a default table view of a multidimensional variable.

  • The calendar attribute values noleap and 365_day that are assigned to the time coordinate variable of the netCDF file are not honored in ArcGIS.

  • The values represented by missing_value or _FillValue attributes of a variable in a netCDF file will be null in the output table view.

Parameters

LabelExplanationData Type
Input netCDF File

The input netCDF file.

File
Variables

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

String
Output Table View

The name of the output table view.

Table View
Row Dimensions
(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
(Optional)

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

  • Dimension—A netCDF dimension.
  • Value—The dimension value to use.
Value Table
Value Selection Method
(Optional)

Specifies the dimension value selection method that will be used.

  • By valueThe input value will be matched with the actual dimension value.
  • By indexThe input value will be matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.
String

arcpy.md.MakeNetCDFTableView(in_netCDF_file, variable, out_table_view, {row_dimension}, {dimension_values}, {value_selection_method})
NameExplanationData 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.

  • dimension—A netCDF dimension.
  • {value}—The dimension value to use.
Value Table
value_selection_method
(Optional)

Specifies the dimension value selection method that will be used.

  • BY_VALUEThe input value will be matched with the actual dimension value.
  • BY_INDEXThe input value will be 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

Licensing information

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

Related topics