hydromt_sfincs.components.forcing.SfincsWaterLevel#
- class hydromt_sfincs.components.forcing.SfincsWaterLevel(model: SfincsModel)[source]#
Water level boundary component for SFINCS models.
This component handles reading and writing of water level boundary conditions in SFINCS format, including both ASCII and netCDF files. Furthermore, it allows to generate time series from astronomical constituents (if available).
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 waterlevel forcing.
create_boundary_points_from_mask([min_dist, ...])Get boundary points from mask in quadtree grid.
create_timeseries([index, shape, timestep, ...])Applies time series boundary conditions for each point Create numpy datetime64 array for time series with python datetime.datetime objects
create_timeseries_from_astro([dt, offset])Generates boundary time series file from astronomical components
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.
generate_bzs_from_bca([dt, offset, write_file])Function called in CoSMoS to generate bzs file from bca file.
read([format])Read SFINCS boundary conditions (.bnd, .bzs, .bca files) or netcdf file.
read_boundary_conditions_astro([filename])Read SFINCS boundary condition astro (.bca) file
read_boundary_conditions_netcdf([filename])Read SFINCS boundary conditions netcdf file
read_boundary_conditions_timeseries([filename])Read SFINCS boundary condition timeseries (.bzs) file
read_boundary_points([filename])Read SFINCS boundary condition points (.bnd) 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 boundary conditions (.bnd, .bzs, .bca files) or netcdf file.
write_boundary_conditions_astro([filename])Write SFINCS boundary condition astro (.bca) file
write_boundary_conditions_netcdf([filename])Write SFINCS boundary condition netcdf (.nc) file
write_boundary_conditions_timeseries([filename])Write SFINCS boundary condition timeseries (.bzs) file
write_boundary_points([filename])Write SFINCS boundary condition points (.bnd) 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.