improver.cli.gradient_between_adjacent_grid_squares module

Contents

improver.cli.gradient_between_adjacent_grid_squares module#

CLI to calculate the gradient between adjacent grid squares.

process(cube, *, regrid=False)[source]#

Calculate the gradient between adjacent grid squares within a cube. The gradient is calculated along the x and y axis individually.

Parameters:
  • cube (iris.cube.Cube) – Cube from which the gradients will be calculated.

  • regrid (bool) – If True, the gradient cube is regridded to match the spatial dimensions of the input cube. If False, the two output gradient cubes will have different spatial coords such that the coord matching the gradient axis will represent the midpoint of the input cube and will have one fewer points. If the x-axis is marked as circular, the gradient between the last and first points is also included.

Returns:

iris.cube.Cube:

Gradients calculated along the x-axis

iris.cube.Cube:

Gradients calculated along the y-axis

Return type:

tuple