hydromt_sfincs.components.forcing.SfincsDischargePoints#
- class hydromt_sfincs.components.forcing.SfincsDischargePoints(model: SfincsModel)[source]#
Discharge point component for SFINCS models.
This component handles reading and writing of discharge points and their associated time series data in SFINCS format, including both ASCII and netCDF files.
Initialize the base component.
- Parameters:
model (
SfincsModel) – Reference to the parent model instance.
- __init__(model: SfincsModel)[source]#
Initialize the base component.
- Parameters:
model (
SfincsModel) – Reference to the parent model instance.
Methods
__init__(model)Initialize the base component.
add_point(x, y[, name, value, drop_duplicates])Convenience to add a single point with a default value for its timeseries.
clear()Clear boundary points and unset associated config keys.
close()Clean up all open datasets.
create([geodataset, timeseries, locations, ...])Setup discharge forcing.
create_timeseries([index, shape, timestep, ...])Applies time series discharges for each point Create numpy datetime64 array for time series with python datetime.datetime objects
delete(index)Delete boundary points and clear config when no points remain.
finish_write()Finish the write functionality after cleanup was called for all components in the model.
read([format])Read SFINCS discharge points (.dis, .src files) or netcdf file.
read_discharge_conditions_netcdf([filename])Read SFINCS discharge conditions netcdf file
read_discharge_points([filename])Read SFINCS discharge points (.src) file
read_discharge_timeseries([filename])Read SFINCS discharge condition timeseries (.dis) file
set([df, gdf, geodataset, merge, ...])Set or update the internal data from either a GeoDataArray (geodataset) or the pair (df, gdf).
set_locations(gdf[, value, merge, ...])Add or update point locations.
set_timeseries(df[, varname])Add or update timeseries for existing locations.
test_equal(other)Test if two components are equal.
write([format])Write SFINCS discharges (.src, .dis files) or netcdf file.
write_discharge_conditions_netcdf([filename])Write SFINCS discharge conditions netcdf file
write_discharge_points([filename])Write SFINCS discharge points (.src) file
write_discharge_timeseries([filename])Write SFINCS discharge timeseries (.dis) file
Attributes
Get the internal xarray dataset/dataarray containing point timeseries and geometry information.
data_catalogReturn the data catalog of the model this component is associated with.
gdfReturn the point locations as a GeoDataFrame.
modelReturn the model object this component is associated with.
name_in_modelFind the name of the component in the parent model components.
nr_pointsReturn the number of point locations currently stored.
rootReturn the root of the model this component is associated with.