Subset Multidimensional Raster (Multidimension)

Summary

Creates a subset of a multidimensional raster by slicing data along defined variables and dimensions.

Usage

  • This tool creates a multidimensional raster layer from a multidimensional raster or mosaic dataset by extracting a subset of variables. For example, you have a mosaic dataset that contains 30 years of monthly precipitation data, and you only want to extract data for each January to see how precipitation has changed for that month.

  • Supported multidimensional raster datasets include Cloud Raster Format (CRF), multidimensional mosaic datasets, or multidimensional raster layers generated by netCDF, GRIB, or HDF files.

  • This tool produces a multidimensional raster dataset in Cloud Raster Format (CRF). Currently, no other output formats are supported.

  • Use the Dimension Definition parameter to slice dimensions using an interval, a value, or a range of values. For example, if you have 10 years of ocean salinity data, collected monthly and at every 2 meters depth up to 500 meters, you can use the different dimension definition options for the following scenarios:

    • Extract salinity data for the month of January over the 10-year period. Choose By Values, set Dimension to StdTime, and set Values to January.
    • Slice salinity data over a depth range from 0 to 150 meters. Choose By Ranges, set Dimension to StdZ, and set Minimum Value to -150 and Maximum Value to 0.
    • Extract salinity data for the first 10 days of January over a 10-year period. Choose By Iteration, set Dimension to StdTime, set Start of first iteration and End of first iteration to the corresponding start and end of the iteration period, set Step to 1, and set Unit to Years.

  • By default, the multidimensional raster output will be compressed using the LZ77 compression type. It is recommended, however, that you change the compression type to LERC and adjust the maximum error value based on your data. For example, if you expect the results of the analysis to be accurate to three decimal places, use 0.001 for the maximum error value. It's best to avoid unnecessary accuracy requirements, as they will increase the processing time and storage size.

    To change the compression type, modify the Environment setting.

Parameters

LabelExplanationData Type
Input Multidimensional Raster

The input multidimensional raster dataset.

Supported inputs include netCDF, GRIB, HDF or CRF files, a multidimensional mosaic dataset, or a multidimensional raster layer.

Raster Dataset; Raster Layer; Mosaic Dataset; Mosaic Layer; Image Service; File
Output Multidimensional Raster

The output multidimensional raster dataset.

Raster Dataset
Variables
(Optional)

The variables that will be included in the output multidimensional raster. If no variable is specified, all of the variables will be used.

String
Dimension Definition
(Optional)

Specifies the method that will be used to slice the dimension.

  • AllThe full range for each dimension will be used. This is the default.
  • By RangesThe dimension will be sliced using a range or a list of ranges.
  • By IterationThe dimension will be sliced over a specified interval size.
  • By ValuesThe dimension will be sliced using a list of dimension values.
String
Range
(Optional)

The range or list of ranges for the specified dimension.

The data will be sliced based on the dimension name and the minimum and maximum values for the range. This parameter is required when the Dimension Definition parameter is set to By Ranges.

Value Table
Values
(Optional)

A list of values for the specified dimension. This parameter is required when the Dimension Definition parameter is set to By Values.

Value Table
Dimension
(Optional)

The dimension along which the variables will be sliced. This parameter is required when the Dimension Definition parameter is set to By Iteration.

String
Start of first iteration
(Optional)

The beginning of the first interval. This interval will be used to iterate through the dataset. This parameter is required when the Dimension Definition parameter is set to By Iteration.

String
End of first iteration
(Optional)

The end of the first interval. This interval will be used to iterate through the dataset. This parameter is required when the Dimension Definition parameter is set to By Iteration.

String
Step
(Optional)

The frequency with which the data will be sliced. This parameter is required when the Dimension Definition parameter is set to By Iteration.

Double
Unit
(Optional)

Specifies the iteration unit that will be used. This parameter is required when the Dimension Definition parameter is set to By Iteration and the Dimension parameter is set to StdTime.

  • HoursThe specified unit of time will be hours.
  • DaysThe specified unit of time will be days.
  • WeeksThe specified unit of time will be weeks.
  • MonthsThe specified unit of time will be months.
  • YearsThe specified unit of time will be years.
String

arcpy.md.SubsetMultidimensionalRaster(in_multidimensional_raster, out_multidimensional_raster, {variables}, {dimension_def}, {dimension_ranges}, {dimension_values}, {dimension}, {start_of_first_iteration}, {end_of_first_iteration}, {iteration_step}, {iteration_unit})
NameExplanationData Type
in_multidimensional_raster

The input multidimensional raster dataset.

Supported inputs include netCDF, GRIB, HDF or CRF files, a multidimensional mosaic dataset, or a multidimensional raster layer.

Raster Dataset; Raster Layer; Mosaic Dataset; Mosaic Layer; Image Service; File
out_multidimensional_raster

The output multidimensional raster dataset.

Raster Dataset
variables
[variables,...]
(Optional)

The variables that will be included in the output multidimensional raster. If no variable is specified, all of the variables will be used.

String
dimension_def
(Optional)

Specifies the method that will be used to slice the dimension.

  • ALLThe full range for each dimension will be used. This is the default.
  • BY_RANGESThe dimension will be sliced using a range or a list of ranges.
  • BY_ITERATIONThe dimension will be sliced over a specified interval size.
  • BY_VALUEThe dimension will be sliced using a list of dimension values.
String
dimension_ranges
[dimension_ranges,...]
(Optional)

The range or list of ranges for the specified dimension.

The data will be sliced based on the dimension name and the minimum and maximum values for the range. This parameter is required when the dimension_def parameter is set to BY_RANGES.

Value Table
dimension_values
[dimension_values,...]
(Optional)

A list of values for the specified dimension. This parameter is required when the dimension_def parameter is set to BY_VALUE.

Value Table
dimension
(Optional)

The dimension along which the variables will be sliced. This parameter is required when the dimension_def parameter is set to BY_ITERATION.

String
start_of_first_iteration
(Optional)

The beginning of the first interval. This interval will be used to iterate through the dataset. This parameter is required when the dimension_def parameter is set to BY_ITERATION.

String
end_of_first_iteration
(Optional)

The end of the first interval. This interval will be used to iterate through the dataset. This parameter is required when the dimension_def parameter is set to BY_ITERATION.

String
iteration_step
(Optional)

The frequency with which the data will be sliced. This parameter is required when the dimension_def parameter is set to BY_ITERATION.

Double
iteration_unit
(Optional)

Specifies the iteration unit that will be used. This parameter is required when the dimension_def parameter is set to BY_ITERATION and the dimension parameter is set to StdTime.

  • HOURSThe specified unit of time will be hours.
  • DAYSThe specified unit of time will be days.
  • WEEKSThe specified unit of time will be weeks.
  • MONTHSThe specified unit of time will be months.
  • YEARSThe specified unit of time will be years.
String

Code sample

SubsetMultidimensionalRaster example 1 (Python window)

Extract a subset of variables from a multidimensional raster using the BY_RANGES method.

# Import system modules
import arcpy

# Execute
arcpy.md.SubsetMultidimensionalRaster(
	"C:\data\Ocean_Data.crf", "C:\data\Ocean_Data_Subset.crf", 
	"salinity", "BY_RANGES", "StdZ -500 -100")
SubsetMultidimensionalRaster example 2 (stand-alone script)

Extract the water temperature variable from a multidimensional raster using the BY_VALUE method

# Import system modules
import arcpy

# Define input parameters
in_multidimensional_raster = r"C:\data\MD_Ocean_data.crf"
out_multidimensional_raster = r"C:\data\Temp_slice.crf"
variables = "water_temp"
dimension_def = "BY_VALUE"
dimension_values = "StdZ -50;StdZ -100"

#Execute

arcpy.md.SubsetMultidimensionalRaster(
	in_multidimensional_raster, out_multidimensional_raster, 
	variables, dimension_def, dimension_values)
SubsetMultidimensionalRaster example 3 (stand-alone script)

Extract the salinity variable from a multidimensional raster using the BY_ITERATION method.

# Import system modules
import arcpy
 
# Set local variables
in_multidimensional_raster = r"C:\data\MD_Ocean_data.crf"
out_multidimensional_raster =  r"C:\data\salinity_slice.crf"
variables = "salinity"
dimension_def = "BY_ITERATION"
dimension = "StdTime"
start_of_first_iteration = "2009-01-01"
end_of_first_iteration = "2009-01-10"
iteration_step = "1"
iteration_unit = "YEARS"
 
#Execute
 
arcpy.md.SubsetMultidimensionalRaster(in_multidimensional_raster, out_multidimensional_raster, variables, dimension_def, dimension, start_of_first_iteration, end_of_first_iteration, iteration_step, iteration_unit)

Licensing information

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

Related topics