polaris.tasks.e3sm.init.topo.remap.MaskTopoStep.define_masks
- MaskTopoStep.define_masks(ds)[source]
Override in subclasses to return an ocean and a land mask array with the same shape as
ds.base_elevation
and other topogrpahy fields. The masks are floating point arrays with values between 0 and 1, where 1 indicates the cell is fully covered by land or ocean, respectively.The default implementation sets the ocean mask to locations where the base elevation is less than 0 and the Antarctic ice sheet is not grounded, and the land mask to locations where the base elevation is greater than 0 or the Antarctic ice sheet is present. The two overlap for Antarctic ice shelves, which are included in both masks.
- Parameters:
ds (xarray.Dataset) – The dataset containing the topography fields
- Returns:
ocean_mask (xarray.DataArray) – The mask array with the same shape as the topography fields
land_mask (xarray.DataArray) – The mask array with the same shape as the topography fields