plot.diff

plot.diff(grid1, grid2, spacing=0.05)

Calculates the difference between two grid objects.

Arguments:

  • grid1 (xarray.DataArray or str): first grid object or path to grid file

  • grid2 (xarray.DataArray or str): second grid object or path to grid file

  • spacing (float, optional): spacing between grid nodes. Defaults to 0.05

Returns:

(xarray.DataArray) grid object containing difference values

Example

import plot
# Load in models as slab_model instances
model1 = plot.slab_model("../output/exp_slab2_04-18","surface") # synthetic test slab made with the 04-18 database
model2 = plot.slab_model("../output/exp_slab2_07-24","surface") # synthetic test slab made with the 07-24 database
# calculate the difference between the slab depth grids and save to variable
diff = plot.diff(model1.dep_grid, model2.dep_grid)