hydromt_wflow.components.WflowStaticmapsComponent#

class hydromt_wflow.components.WflowStaticmapsComponent(model: Model, *, filename: str = 'staticmaps.nc', region_filename: str = 'staticgeoms/region.geojson')[source]#

Wflow staticmaps component.

Inherits from the HydroMT-core GridComponent model-component. It is used for setting, creating, writing, and reading static and cyclic data for a Wflow model on a regular grid. The component data, stored in the data property of this class, is of the hydromt.gis.raster.RasterDataset type which is an extension of xarray.Dataset for regular grid.

Initialize a WflowStaticmapsComponent.

Parameters:
  • model (Model) – HydroMT model instance

  • filename (str) – The path to use for reading and writing of component data by default. By default “staticmaps.nc”.

  • region_filename (str) – The path to use for reading and writing of the region data by default. By default “staticgeoms/region.geojson”.

__init__(model: Model, *, filename: str = 'staticmaps.nc', region_filename: str = 'staticgeoms/region.geojson')[source]#

Initialize a WflowStaticmapsComponent.

Parameters:
  • model (Model) – HydroMT model instance

  • filename (str) – The path to use for reading and writing of component data by default. By default “staticmaps.nc”.

  • region_filename (str) – The path to use for reading and writing of the region data by default. By default “staticgeoms/region.geojson”.

Methods

__init__(model, *[, filename, region_filename])

Initialize a WflowStaticmapsComponent.

clip(region[, inverse_clip, crs, ...])

Clip staticmaps to region.

close()

Clean up all open datasets.

drop_vars(names[, errors])

Drop variables from the grid.

finish_write()

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

get_mask_layer(mask, *args)

Get the proper mask layer based on itself or a layer in a Dataset.

read(**kwargs)

Read staticmaps model data.

set(data[, name])

Add data to the staticmaps.

test_equal(other)

Test if two staticmaps components are equal.

update_names(**rename)

Map the names of the data variables to new ones.

write([filename])

Write staticmaps model data.

write_region([filename, to_wgs84])

Write the model region to file.

Attributes

bounds

Returns the bounding box of the model grid.

crs

Returns coordinate reference system embedded in the model grid.

data

Model static gridded data as xarray.Dataset.

data_catalog

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

model

Return the model object this component is associated with.

name_in_model

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

region

Provide access to the underlying GeoDataFrame data of the model region.

res

Returns the resolution of the model grid.

root

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

transform

Returns spatial transform of the model grid.