hydromt_wflow.components.WflowStaticmapsComponent#

class hydromt_wflow.components.WflowStaticmapsComponent(model: Model, *, filename: str = 'staticmaps.nc', region_filename: str = 'staticgeoms/staticmaps_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/staticmaps_region.geojson”.

__init__(model: Model, *, filename: str = 'staticmaps.nc', region_filename: str = 'staticgeoms/staticmaps_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/staticmaps_region.geojson”.

Methods

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

Initialize a WflowStaticmapsComponent.

drop_vars(names[, errors])

Drop variables from the grid.

get_mask_layer(mask, *args)

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

read([filename])

Read staticmaps model data.

set(data[, name])

Add data to the staticmaps.

test_equal(other)

Test if two 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.

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.