Merge Multidimensional Rasters (Multidimensional)

Summary

Combines multiple multidimensional raster datasets spatially or across variables and dimensions.

Usage

  • This tool creates a merged multidimensional raster dataset from a list of multidimensional rasters. For example, if you have a mosaic dataset that contains 30 years of monthly precipitation data and another dataset with 10 years of monthly temperature data, you can combine them into a multidimensional raster with both variables.

  • The tool supports input data in NetCDF format (.nc file).

  • If the input multidimensional rasters contain different variables, the output multidimensional raster will contain all the variables.

  • If the input multidimensional rasters contain different dimensions or dimension values, the output multidimensional raster will include all the dimensions and dimension values.

  • If the input multidimensional rasters contain the same dimensions and variables but different spatial extents, the output multidimensional raster will include the variables and dimensions across the merged spatial extents.

  • This tool produces a multidimensional raster dataset in Cloud Raster Format (CRF) or NetCDF format (.nc file).

Parameters

LabelExplanationData Type
Input Multidimensional Rasters

The input multidimensional rasters to be combined.

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

The merged multidimensional raster dataset in Cloud Raster Format (a .crf file) or NetCDF format (an .nc file).

Raster Dataset
Resolve Overlap Method
(Optional)

Specifies the method that will be used to resolve overlapping pixels in the combined datasets.

  • FirstThe pixel value in the overlapping areas will be the value from the first raster in the list of input rasters. This is the default.
  • LastThe pixel value in the overlapping areas will be the value from the last raster in the list of input rasters.
  • MinimumThe pixel value in the overlapping areas will be the minimum value of the overlapping pixels.
  • MaximumThe pixel value in the overlapping areas will be the maximum value of the overlapping pixels.
  • MeanThe pixel value in the overlapping areas will be the average of the overlapping pixels.
  • SumThe pixel value in the overlapping areas will be the total sum of the overlapping pixels.
String

arcpy.management.MergeMultidimensionalRasters(in_multidimensional_rasters, out_raster, {resolve_overlap_method})
NameExplanationData Type
in_multidimensional_rasters
[in_multidimensional_rasters,...]

The input multidimensional rasters to be combined.

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

The merged multidimensional raster dataset in Cloud Raster Format (a .crf file) or NetCDF format (an .nc file).

Raster Dataset
resolve_overlap_method
(Optional)

Specifies the method that will be used to resolve overlapping pixels in the combined datasets.

  • FIRSTThe pixel value in the overlapping areas will be the value from the first raster in the list of input rasters. This is the default.
  • LASTThe pixel value in the overlapping areas will be the value from the last raster in the list of input rasters.
  • MINThe pixel value in the overlapping areas will be the minimum value of the overlapping pixels.
  • MAXThe pixel value in the overlapping areas will be the maximum value of the overlapping pixels.
  • MEANThe pixel value in the overlapping areas will be the average of the overlapping pixels.
  • SUMThe pixel value in the overlapping areas will be the total sum of the overlapping pixels.
String

Code sample

MergeMultidimensionalRasters example 1 (Python window)

Merge two multidimensional rasters with different variables.

# Import system modules
import arcpy

# Append slices from two multidimensional rasters with temperature data
arcpy.md.MergeMultidimensionalRaster(
	["C:/data/temp1980_1990.crf", "C:/data/precip1980_1990.crf"], 
	"C:/data/temp_precip_1980_1990.crf")
MergeMultidimensionalRasters example 2 (stand-alone script)

Merge two multidimensional rasters with different dimension values.

# Import system modules
import arcpy

# Define input parameters
input_multidimensional_rasters = ["C:/data/hycom_2000_2019.crf", "C:/data/hycom_2020.crf"]
output_multidimensional_raster = "C:/new_data/hycom2000_2020.crf"


# Merge the dimension values for the variables
arcpy.md.MergeMutidimensionalRaster(
	input_multidimensional_rasters, output_multidimensional_raster)
MergeMultidimensionalRasters example 3 (stand-alone script)

Merge two multidimensional rasters with different spatial extents.

# Import system modules
import arcpy

# Define input parameters
input_multidimensional_rasters = ["C:/data/hycom_East.crf", "C:/data/hycom_WEST.crf"]
output_multidimensional_raster = "C:/new_data/hycom_ALL.crf"


# Merge the spatial regions of the input data
arcpy.md.MergeMutidimensionalRaster(
	input_multidimensional_rasters, output_multidimensional_raster, "FIRST")