Model components#
ModelComponent#
Note that the base ModelComponent attributes and methods are available to all model components.
|
Abstract base class for ModelComponent. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Read the file(s) into the component. |
|
Write the component to file(s). |
|
Return the root of the model this component is associated with. |
SpatialModelComponent#
|
Base spatial model component for GIS components. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Provide access to the CRS of the model region. |
|
Return the total bounds of the model region. |
|
Provide access to the underlying GeoDataFrame data of the model region. |
Plugin developer methods
Implement this property in order to provide the region. |
|
Write the model region to file. |
|
Test if two components are equal. |
ConfigComponent#
|
A component to manage configuration files for model simulations/settings. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model config values. |
|
|
Write model config at <root>/{path}. |
|
Read model config at <root>/{path}. |
|
Create a new config file based on a template file. |
Set the config dictionary at key(s) with values. |
|
|
Update the config dictionary at key(s) with values. |
|
Get a config value at key(s). |
Test if two components are equal. |
GeomsComponent#
|
A component to manage geo-spatial geometries. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model geometries. |
|
Provide access to the underlying GeoDataFrame data of the model region. |
|
|
Write model geometries to a vector file (by default GeoJSON) at <root>/<filename>. |
|
Read model geometries files at <root>/<filename>. |
|
Add data to the geom component. |
Test if two GeomsComponents are equal. |
TablesComponent#
|
TablesComponent contains data as a dictionary of pandas.DataFrame. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model tables. |
|
|
Write tables at provided or default file path if none is provided. |
|
Read tables at provided or default file path if none is provided. |
|
Add (a) table(s) <pandas.DataFrame> to model. |
Test if two components are equal. |
DatasetsComponent#
|
A component to manage collections of Xarray objects. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model data in the form of xarray objects. |
|
Write dictionary of xarray.Dataset and/or xarray.DataArray to netcdf files. |
|
|
Read model dataset files at <root>/<filename>. |
|
Add data to the xarray component. |
Test if two DatasetsComponents are equal. |
SpatialDatasetsComponent#
|
A component to manage collection of geospatial xarray objects. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model data in the form of xarray objects. |
|
Provide access to the underlying GeoDataFrame data of the model region. |
|
Write dictionary of xarray.Dataset and/or xarray.DataArray to netcdf files. |
|
Read model dataset files at <root>/<filename>. |
|
|
HYDROMT CORE METHOD: Add data variable(s) to datasets component by reclassifying the data in |
|
HYDROMT CORE METHOD: Add data variable(s) from |
Add data to the xarray component. |
|
Test if two DatasetsComponents are equal. |
GridComponent#
|
ModelComponent class for grid components. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Returns the resolution of the model grid. |
|
Returns spatial transform of the model grid. |
|
Returns coordinate reference system embedded in the model grid. |
|
Returns the bounding box of the model grid. |
|
Provide access to the underlying GeoDataFrame data of the model region. |
|
Model static gridded data as xarray.Dataset. |
|
|
Write model grid data to netcdf file at <root>/<fn>. |
|
Read model grid data at <root>/<fn> and add to grid property. |
|
Add data to grid. |
Test if two components are equal. |
MeshComponent#
|
ModelComponent class for mesh components. |
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
Model static mesh data. |
|
Returns model mesh crs. |
|
Returns model mesh bounds. |
|
Provide access to the underlying GeoDataFrame data of the model region. |
|
List of grid names in mesh. |
|
Dictionary of grid names and Ugrid topologies in mesh. |
|
Dictionnary of grid names and corresponding UgridDataset topology and data variables in mesh. |
|
Returns dict of geometry of grids in mesh as a gpd.GeoDataFrame. |
|
|
Write model grid data to a netCDF file at <root>/<filename>. |
|
Read model mesh data at <root>/<filename> and add to mesh property. |
|
Add data to mesh. |
|
Return a specific grid topology from mesh based on grid_name. |
VectorComponent#
|
ModelComponent class for vector components. |
Model vector (polygon) data. |
|
Returns the geometry of the model vector as gpd.GeoSeries. |
|
Returns the index dimension of the vector. |
|
Returns coordinate reference system embedded in the vector. |
|
Return the model object this component is associated with. |
|
Return the data catalog of the model this component is associated with. |
|
Return the root of the model this component is associated with. |
|
|
Read model vector from combined netcdf and geojson file. |
|
Write model vector to combined netcdf and geojson files. |
|
Add data to vector. |
Test if two components are equal. |