hydromt_sfincs.components.grid.SfincsSubgridTable#
- class hydromt_sfincs.components.grid.SfincsSubgridTable(model: SfincsModel, version: int = 1)[source]#
SFINCS Subgrid Table Component.
This component contains methods to create, read and write subgrid tables for the SFINCS model on regular grids. Subgrid tables are used to represent subgrid-scale variations in bed level and roughness within each grid cell, allowing for more accurate simulations of flow dynamics.
Note
The subgrid table data is stored in the component’s data attribute as an xarray.Dataset.
- __init__(model: SfincsModel, version: int = 1)[source]#
Methods
__init__(model[, version])close()Clean up all open datasets.
create(elevation_list[, roughness_list, ...])Create method for subgrid tables based on a list of elevation and Manning's roughness datasets.
finish_write()Finish the write functionality after cleanup was called for all components in the model.
from_xarray(ds_sbg)Convert xarray dataset to subgrid class.
read([filename])Load subgrid table from file for a regular grid with given mask.
read_binary([filename])Load subgrid table from binary file for a regular grid with given mask.
read_netcdf([filename])Load subgrid table from netcdf file for a regular grid with given mask.
test_equal(other)Test if two components are equal.
to_xarray(dims, coords)Convert old binary subgrid class to xarray dataset.
write([filename])Write subgrid table to file for a regular grid with given mask.
write_binary([filename])Save the subgrid data to a binary file.
write_netcdf([filename])Save the subgrid data to a netcdf file for a regular grid with given mask.
Attributes
Model static gridded data as xarray.Dataset.
data_catalogReturn the data catalog of the model this component is associated with.
modelReturn the model object this component is associated with.
name_in_modelFind the name of the component in the parent model components.
rootReturn the root of the model this component is associated with.