hydromt_fiat.components.ExposureGridComponent#

class hydromt_fiat.components.ExposureGridComponent(model: Model, *, filename: str = 'exposure/spatial.nc', region_component: str | None = None)[source]#

Exposure grid component.

Inherits from the HydroMT-core GridComponent model-component.

Parameters:
  • model (Model) – HydroMT model instance (FIATModel).

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

  • region_component (str, optional) – The name of the region component to use as reference for this component’s region. If None, the region will be set to the grid extent. Note that the create method only works if the region_component is None. For add_data_from_* methods, the other region_component should be a reference to another grid component for correct reprojection, by default None.

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.

Methods

clear()

Clear the gridded data.

clip(geom[, buffer, inplace])

Clip the gridded data.

close()

Clean up all open datasets.

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([filename])

Read the exposure grid data.

reproject(crs[, inplace])

Reproject the gridded data.

set(data[, name])

Set gridded data in the component.

setup(exposure_fnames[, exposure_link_fname])

Set up an exposure grid.

test_equal(other)

Test if two components are equal.

write([filename, gdal_compliant])

Write the exposure grid data.

write_region([filename, to_wgs84, ...])

Write the model region to file.