hydromt_sfincs.SfincsModel#

class hydromt_sfincs.SfincsModel(root: str = None, mode: str = 'w', write_gis: bool = True, data_libs: List[str] | str = None, **catalog_keys)[source]#

SFINCS model class.

The SFINCS model class (SfincsModel) contains methods to read, write, setup and edit SFINCS models.

Parameters:
  • root (str, Path, optional) – Path to model folder

  • mode ({'w', 'r+', 'r'}) – Open model in write, append or reading mode, by default ‘w’

  • write_gis (bool) – Write model files additionally to geotiff and geojson, by default True

  • data_libs (List, str) – List of data catalog yaml files, by default None

  • **catalog_keys – Additional keyword arguments to be passed down to the DataCatalog.

__init__(root: str = None, mode: str = 'w', write_gis: bool = True, data_libs: List[str] | str = None, **catalog_keys)[source]#

The SFINCS model class (SfincsModel) contains methods to read, write, setup and edit SFINCS models.

Parameters:
  • root (str, Path, optional) – Path to model folder

  • mode ({'w', 'r+', 'r'}) – Open model in write, append or reading mode, by default ‘w’

  • write_gis (bool) – Write model files additionally to geotiff and geojson, by default True

  • data_libs (List, str) – List of data catalog yaml files, by default None

  • **catalog_keys – Additional keyword arguments to be passed down to the DataCatalog.

Methods

__init__([root, mode, write_gis, data_libs])

add_component(name, component)

Add a component to the model.

build(*[, write])

Single method to build a model from scratch based on settings in steps.

clear_spatial_components()

Clear all spatial components.

close()

Close all components by closing their open files.

from_dict(model_dict)

Construct a model with the components and other init arguments in the yaml file located at path.

from_yml(path)

Construct a model with the components and other init arguments in the yaml file located at path.

get_component(name)

Get a component from the model.

get_model_time()

Return (tstart, tstop) tuple with parsed model start and end time

plot_basemap([fn_out, variable, shaded, ...])

Create basemap plot.

plot_forcing([fn_out, forcings])

Plot model timeseries forcing.

read()

Read SfincsModel from disk.

test_equal(other)

Test if two models are equal, based on their components.

update(*[, model_out, write, steps, ...])

Single method to update a model based the settings in steps.

write()

Write SfincsModel to disk.

write_data_catalog([root, data_lib_path, ...])

Write the data catalog to data_lib_path.

Attributes

bbox

Returns the bounding box in WGS 84 of the model grid.

bounds

Returns the bounding box of the model grid.

config

Instance of SfincsConfig.

cross_sections

Instance of SfincsCrossSections.

crs

Returns the model crs

discharge_points

Instance of SfincsDischargePoints.

drainage_structures

Instance of SfincsDrainageStructures.

elevation

Instance of SfincsElevation.

grid

Instance of SfincsGrid.

infiltration

Instance of SfincsInfiltration.

initial_conditions

Instance of SfincsInitialConditions.

mask

Instance of SfincsMask.

name

observation_points

Instance of SfincsObservationPoints.

output

Instance of SfincsOutput.

precipitation

Instance of SfincsPrecipitation.

pressure

Instance of SfincsPressure.

quadtree_elevation

Instance of SfincsQuadtreeElevation.

quadtree_grid

Instance of SfincsQuadtreeGrid.

quadtree_infiltration

Instance of SfincsQuadtreeInfiltration.

quadtree_initial_conditions

Instance of SfincsQuadtreeInitialConditions.

quadtree_mask

Instance of SfincsQuadtreeMask.

quadtree_snapwave_mask

Instance of SnapWaveQuadtreeMask.

quadtree_storage_volume

Instance of SfincsQuadtreeStorageVolume.

quadtree_subgrid

Instance of SfincsQuadtreeSubgridTable.

region

Returns the geometry of the active model cells.

rivers

Instance of SfincsRivers.

roughness

Instance of SfincsRoughness.

snapwave_boundary_conditions

Instance of SnapWaveBoundaryConditions.

storage_volume

Instance of SfincsStorageVolume.

subgrid

Instance of SfincsSubgridTable.

thin_dams

Instance of SfincsThinDams.

water_level

Instance of SfincsWaterLevel.

wave_makers

Instance of SfincsWaveMakers.

weirs

Instance of SfincsWeirs.

wind

Instance of SfincsWind.

data_catalog

DataCatalog for data access

root

Model root