hydromt_sfincs.components.grid.SfincsMask#

class hydromt_sfincs.components.grid.SfincsMask(model: SfincsModel)[source]#

SFINCS Mask Component.

This component contains methods to create a mask for the SFINCS model on regular grid. The mask defines active and inactive cells in the model grid, as well as boundary cells for water level and outflow boundaries.

Note

The mask data is stored in the model grid’s data dataset under the key “mask”.

See also

SfincsGrid

__init__(model: SfincsModel)[source]#

Methods

__init__(model)

clear_datashader_dataframe()

Clear the datashader dataframe.

close()

Clean up all open datasets.

create([zmin, zmax, include_polygon, ...])

Setup active model mask and add boundaries.

create_active([zmin, zmax, include_polygon, ...])

Create an integer mask with inactive (mask=0) and active (mask=1) cells, optionally bounded by several criteria.

create_boundary([btype, zmin, zmax, ...])

Set boundary cells in the model mask.

finish_write()

Finish the write functionality after cleanup was called for all components in the model.

get_datashader_dataframe()

has_open_boundaries()

Returns True if mask contains open boundaries (mask = 2)

map_overlay()

read()

Not implemented, mask data is read when the grid is read.

test_equal(other)

Test if two components are equal.

to_gdf([option])

Convert a boolean mask to a GeoDataFrame of polygons.

write()

Not implemented, mask data is written when the grid is written.

Attributes

data

Get the data from the model grid.

data_catalog

Return the data catalog of the model this component is associated with.

empty_mask

Get an empty mask with the same shape as the model grid.

model

Return the model object this component is associated with.

name_in_model

Find the name of the component in the parent model components.

root

Return the root of the model this component is associated with.

transform

Get the affine transform of the model grid.