ugants.mask package#

Submodules#

ugants.mask.command_line module#

Implementation for the mask generation application.

class ugants.mask.command_line.GenerateMask(land_fraction: CubeList, mask_type: Literal['land', 'sea'])[source]#

Bases: Application

Generate a land mask or sea mask from a land area fraction input.

land_fraction: CubeList#
mask_type: Literal['land', 'sea']#
run()[source]#

Run the generate mask app.

  • Extract the land_area_fraction data from the provided CubeList

  • Apply the derive_mask() function to the extracted data

ugants.mask.command_line.derive_mask(land_fraction, mask_type)[source]#

Create the specified binary mask.

Parameters:
  • land_fraction (iris.cube.Cube) – A Cube containing land_area_fraction data from which to derive the binary mask.

  • mask_type (str) – The type of binary mask to produce: "land" or "sea".

Returns:

A new Cube with the derived binary mask.

Return type:

iris.cube.Cube