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:
ApplicationGenerate a land mask or sea mask from a land area fraction input.
- run()[source]#
Run the generate mask app.
Extract the
land_area_fractiondata from the providedCubeListApply 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
Cubecontainingland_area_fractiondata from which to derive the binary mask.mask_type (str) – The type of binary mask to produce:
"land"or"sea".
- Returns:
A new
Cubewith the derived binary mask.- Return type: