compass.landice.tests.ismip7_calibration.quadratic.draft_slope

compass.landice.tests.ismip7_calibration.quadratic.draft_slope(draft, dx, dy, x_dim='x', y_dim='y')[source]

Ice-draft slope angle on a structured grid, in radians.

Reproduces the centred-difference scheme of multimelt.plume_functions.check_slope_one_dimension, including its one-sided fallbacks at NaN neighbours and its substitution of zero where the slope cannot be computed at all.

Parameters:
  • draft (xarray.DataArray) – Ice draft (negative below sea level), on a regular grid.

  • dx (float) – Grid spacing in m.

  • dy (float) – Grid spacing in m.

  • x_dim (str, optional) – Names of the horizontal dimensions.

  • y_dim (str, optional) – Names of the horizontal dimensions.

Returns:

xarray.DataArray – Slope angle in radians.