Select by Dimension (Multidimension)

Summary

Updates the netCDF layer display or netCDF table view based on the dimension value.

Usage

  • The input to this tool can be a netCDF raster layer, a netCDF feature layer, a netCDF table view, a mosaic layer, or an image service. If the input is a mosaic layer or an image service layer, it must have a multidimensional information attached to it.

    Inputs for this tool can be created using the Make NetCDF Feature Layer, Make NetCDF Raster Layer, Make Mosaic Layer, Make Image Server Layer or Make NetCDF Table View tools.

  • If a dimension is not specified, its value is set to the first value. The first value is considered the default.

  • For netCDF layers, auxiliary coordinate variables are not listed in the Dimension Values parameter drop-down list and cannot be set as the value of this parameter in a script.

  • The By index option matches the input value with the position or index of a dimension value. The index is 0 based, that is, the position starts at 0.

  • This tool updates the input. In ModelBuilder, an output variable appears that can chain the updated input as input to another tool in the model, but the tool does not produce a new output.

Syntax

SelectByDimension(in_layer_or_table, {dimension_values}, {value_selection_method})
ParameterExplanationData Type
in_layer_or_table

The input netCDF raster layer, netCDF feature layer, netCDF table view, or mosaic layer. If the input is a mosaic layer, it must be multidimensional.

Raster Layer; Feature Layer; Table View; Mosaic Layer
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}—A dimension value that specifies a slice of a multidimensional variable.
Value Table
value_selection_method
(Optional)

Specifies the dimension value selection method.

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

Derived Output

NameExplanationData Type
output_layer_or_table

The updated input.

Raster Layer; Feature Layer; Table View

Code sample

SelectByDimension example 1 (Python window)

Updates the layer based on the dimension value.

import arcpy
arcpy.SelectByDimension_md("rainfall",[["lat", 20]],"BY_VALUE")
SelectByDimension example 2 (stand-alone script)

Updates the layer based on the dimension value.

# Name: SelectBydimension_Ex_02.py
# Description: Updates the netCDF layer display based on the dimension value.
# Requirements: none

# Import system modules
import arcpy

# Set local variables
inNetCDFLayer = "rainfall" 
valueSelect01 = ["lat", 20]
valueSelect02 = ["lon", 45]  
dimensionValues = [valueSelect01, valueSelect02]
valueSelectionMethod = ""

# Execute SelectByDimension
arcpy.SelectByDimension_md(inNetCDFLayer, dimensionValues, valueSelectionMethod)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics