ILAMB.Variable.Variable.spatialDifference

Variable.spatialDifference(var)[source]

Computes the point-wise difference of two spatially defined variables.

If the variable is spatial or site data and is defined on the same grid, this routine will simply compute the difference in the data arrays. If the variables are spatial but defined on separate grids, the routine will interpolate both variables to a composed grid via nearest-neighbor interpolation and then return the difference.

Parameters

var (ILAMB.Variable.Variable) – The variable we wish to compare against this variable

Returns

diff – A new variable object representing the difference

Return type

ILAMB.Variable.Variable