diff --git a/dev/_examples/build_from_cli.html b/dev/_examples/build_from_cli.html index 05de797e..4dee3181 100644 --- a/dev/_examples/build_from_cli.html +++ b/dev/_examples/build_from_cli.html @@ -471,7 +471,7 @@

Build a model from CLI
 model plugins:
  - sfincs (hydromt_sfincs 1.0.1.dev0)
-generic models (hydromt 0.8.0):
+generic models (hydromt 0.8.1.dev0):
  - grid_model
  - lumped_model
  - network_model
@@ -519,54 +519,54 @@ 

1. Build your first SFINCS model:
-2023-08-03 07:49:59,794 - build - log - INFO - HydroMT version: 0.8.0
-2023-08-03 07:49:59,794 - build - main - INFO - Building instance of sfincs model at /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base.
-2023-08-03 07:49:59,795 - build - main - INFO - User settings:
-2023-08-03 07:49:59,815 - build - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.region: {'geom': 'data/region.geojson'}
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.res: 50
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.crs: utm
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.rotated: True
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.hydrography_fn: None
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.basin_index_fn: None
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.dec_origin: 0
-2023-08-03 07:49:59,815 - build - model_api - INFO - setup_grid_from_region.dec_rotation: 3
-2023-08-03 07:49:59,868 - build - model_api - INFO - setup_dep.datasets_dep: [{'elevtn': 'merit_hydro', 'zmin': 0.001}, {'elevtn': 'gebco'}]
-2023-08-03 07:49:59,869 - build - model_api - INFO - setup_dep.buffer_cells: 0
-2023-08-03 07:49:59,869 - build - model_api - INFO - setup_dep.interp_method: linear
-2023-08-03 07:50:00,149 - build - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
-2023-08-03 07:50:01,970 - build - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
-2023-08-03 07:50:02,039 - build - data_catalog - INFO - DataCatalog: Getting merit_hydro RasterDataset raster data from /home/runner/.hydromt_data/artifact_data/v0.0.8/merit_hydro/{variable}.tif
-2023-08-03 07:50:02,093 - build - data_catalog - INFO - DataCatalog: Getting gebco RasterDataset raster data from /home/runner/.hydromt_data/artifact_data/v0.0.8/gebco.tif
-2023-08-03 07:50:02,428 - build - model_api - INFO - setup_mask_active.mask: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/region.geojson
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.include_mask: None
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.exclude_mask: None
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.mask_buffer: 0
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.zmin: -5
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.zmax: None
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.fill_area: 10.0
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.drop_area: 0.0
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.connectivity: 8
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.all_touched: True
-2023-08-03 07:50:02,429 - build - model_api - INFO - setup_mask_active.reset_mask: True
-2023-08-03 07:50:02,433 - build - data_catalog - INFO - DataCatalog: Getting region GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/region.geojson
-2023-08-03 07:50:02,437 - build - geodataframe - INFO - GeoDataFrame: Read vector data and clip to bbox (epsg:4326) [12.646, 45.490, 12.820, 45.586].
-2023-08-03 07:50:02,473 - build - regulargrid - INFO - 4 gaps outside valid elevation range < 10.0 km2.
-2023-08-03 07:50:02,476 - build - sfincs - INFO - Derive region geometry based on active cells.
-2023-08-03 07:50:02,485 - build - model_api - WARNING - Replacing geom: region
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.btype: waterlevel
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.include_mask: None
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.exclude_mask: None
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.zmin: None
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.zmax: -1
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.connectivity: 8
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.all_touched: False
-2023-08-03 07:50:02,485 - build - model_api - INFO - setup_mask_bounds.reset_bounds: False
-2023-08-03 07:50:02,514 - build - sfincs - INFO - Writing model data to /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
-2023-08-03 07:50:02,516 - build - sfincs - INFO - Write raster file(s) for grid to 'gis' subfolder
-2023-08-03 07:50:02,615 - build - sfincs - INFO - Write geom files
-2023-08-03 07:50:02,615 - build - sfincs - INFO - Write vector file(s) for geoms to 'gis' subfolder
-2023-08-03 07:50:02,625 - build - sfincs - WARNING - zsini not in states, skipping
+2023-08-03 14:56:58,489 - build - log - INFO - HydroMT version: 0.8.1.dev0
+2023-08-03 14:56:58,489 - build - main - INFO - Building instance of sfincs model at /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base.
+2023-08-03 14:56:58,489 - build - main - INFO - User settings:
+2023-08-03 14:56:58,520 - build - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
+2023-08-03 14:56:58,521 - build - model_api - INFO - setup_grid_from_region.region: {'geom': 'data/region.geojson'}
+2023-08-03 14:56:58,522 - build - model_api - INFO - setup_grid_from_region.res: 50
+2023-08-03 14:56:58,522 - build - model_api - INFO - setup_grid_from_region.crs: utm
+2023-08-03 14:56:58,522 - build - model_api - INFO - setup_grid_from_region.rotated: True
+2023-08-03 14:56:58,522 - build - model_api - INFO - setup_grid_from_region.hydrography_fn: None
+2023-08-03 14:56:58,522 - build - model_api - INFO - setup_grid_from_region.basin_index_fn: None
+2023-08-03 14:56:58,523 - build - model_api - INFO - setup_grid_from_region.dec_origin: 0
+2023-08-03 14:56:58,523 - build - model_api - INFO - setup_grid_from_region.dec_rotation: 3
+2023-08-03 14:56:58,605 - build - model_api - INFO - setup_dep.datasets_dep: [{'elevtn': 'merit_hydro', 'zmin': 0.001}, {'elevtn': 'gebco'}]
+2023-08-03 14:56:58,605 - build - model_api - INFO - setup_dep.buffer_cells: 0
+2023-08-03 14:56:58,605 - build - model_api - INFO - setup_dep.interp_method: linear
+2023-08-03 14:56:58,711 - build - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
+2023-08-03 14:57:01,288 - build - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
+2023-08-03 14:57:01,376 - build - data_catalog - INFO - DataCatalog: Getting merit_hydro RasterDataset raster data from /home/runner/.hydromt_data/artifact_data/v0.0.8/merit_hydro/{variable}.tif
+2023-08-03 14:57:01,453 - build - data_catalog - INFO - DataCatalog: Getting gebco RasterDataset raster data from /home/runner/.hydromt_data/artifact_data/v0.0.8/gebco.tif
+2023-08-03 14:57:01,854 - build - model_api - INFO - setup_mask_active.mask: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/region.geojson
+2023-08-03 14:57:01,854 - build - model_api - INFO - setup_mask_active.include_mask: None
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.exclude_mask: None
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.mask_buffer: 0
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.zmin: -5
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.zmax: None
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.fill_area: 10.0
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.drop_area: 0.0
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.connectivity: 8
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.all_touched: True
+2023-08-03 14:57:01,855 - build - model_api - INFO - setup_mask_active.reset_mask: True
+2023-08-03 14:57:01,861 - build - data_catalog - INFO - DataCatalog: Getting region.geojson GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/region.geojson
+2023-08-03 14:57:01,866 - build - geodataframe - INFO - GeoDataFrame: Read vector data and clip to bbox (epsg:4326) [12.646, 45.490, 12.820, 45.586].
+2023-08-03 14:57:01,915 - build - regulargrid - INFO - 4 gaps outside valid elevation range < 10.0 km2.
+2023-08-03 14:57:01,918 - build - sfincs - INFO - Derive region geometry based on active cells.
+2023-08-03 14:57:01,928 - build - model_api - WARNING - Replacing geom: region
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.btype: waterlevel
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.include_mask: None
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.exclude_mask: None
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.zmin: None
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.zmax: -1
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.connectivity: 8
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.all_touched: False
+2023-08-03 14:57:01,929 - build - model_api - INFO - setup_mask_bounds.reset_bounds: False
+2023-08-03 14:57:01,968 - build - sfincs - INFO - Writing model data to /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
+2023-08-03 14:57:01,971 - build - sfincs - INFO - Write raster file(s) for grid to 'gis' subfolder
+2023-08-03 14:57:02,105 - build - sfincs - INFO - Write geom files
+2023-08-03 14:57:02,106 - build - sfincs - INFO - Write vector file(s) for geoms to 'gis' subfolder
+2023-08-03 14:57:02,119 - build - sfincs - WARNING - zsini not in states, skipping
 
 
@@ -653,7 +653,7 @@

2. Check what files have been created:
-['sfincs.dep', 'hydromt.log', 'sfincs.msk', 'gis', 'sfincs.ind', 'sfincs.inp']
+['sfincs.msk', 'sfincs.dep', 'sfincs.inp', 'sfincs.ind', 'hydromt.log', 'gis', 'hydromt_data.yml']
 
@@ -816,45 +816,45 @@

6. Update the model to include forcing:
-2023-08-03 07:50:13,122 - update - log - INFO - HydroMT version: 0.8.0
-2023-08-03 07:50:13,122 - update - main - INFO - Updating sfincs model at /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base (r+).
-2023-08-03 07:50:13,122 - update - main - INFO - Output dir: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
-2023-08-03 07:50:13,123 - update - main - INFO - User settings:
-2023-08-03 07:50:13,141 - update - model_api - WARNING - Model dir already exists and files might be overwritten: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base/gis.
-2023-08-03 07:50:13,141 - update - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
-2023-08-03 07:50:13,176 - update - model_api - INFO - setup_observation_points.locations: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_example_observation_points.geojson
-2023-08-03 07:50:13,176 - update - model_api - INFO - setup_observation_points.merge: True
-2023-08-03 07:50:13,216 - update - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
-2023-08-03 07:50:13,217 - update - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
-2023-08-03 07:50:13,286 - update - data_catalog - INFO - DataCatalog: Getting compound_example_observation_points GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_example_observation_points.geojson
-2023-08-03 07:50:13,287 - update - geodataframe - INFO - GeoDataFrame: Read vector data and clip to geom (epsg:32633) [316221.151, 5041336.510, 329106.596, 5050441.766].
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.geodataset: gtsmv3_eu_era5
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.timeseries: None
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.locations: None
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.offset: None
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.buffer: 2000
-2023-08-03 07:50:13,301 - update - model_api - INFO - setup_waterlevel_forcing.merge: True
-2023-08-03 07:50:13,317 - update - data_catalog - INFO - DataCatalog: Getting gtsmv3_eu_era5 GeoDataset netcdf data from /home/runner/.hydromt_data/artifact_data/v0.0.8/gtsmv3_eu_era5.nc
-2023-08-03 07:50:13,350 - update - geodataset - INFO - GeoDataset: Read netcdf data and clip to geom (epsg:32633) [315583.508, 5039336.895, 331106.210, 5049946.562].
-2023-08-03 07:50:13,661 - update - model_api - INFO - setup_discharge_forcing.geodataset: None
-2023-08-03 07:50:13,661 - update - model_api - INFO - setup_discharge_forcing.timeseries: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_dis_timeseries.csv
-2023-08-03 07:50:13,661 - update - model_api - INFO - setup_discharge_forcing.locations: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_src_locations.geojson
-2023-08-03 07:50:13,661 - update - model_api - INFO - setup_discharge_forcing.merge: True
-2023-08-03 07:50:13,661 - update - model_api - INFO - setup_discharge_forcing.buffer: None
-2023-08-03 07:50:13,662 - update - data_catalog - INFO - DataCatalog: Getting compound_dis_timeseries DataFrame csv data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_dis_timeseries.csv
-2023-08-03 07:50:13,662 - update - dataframe - INFO - DataFrame: Read csv data.
-2023-08-03 07:50:13,667 - update - data_catalog - INFO - DataCatalog: Getting compound_src_locations GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_src_locations.geojson
-2023-08-03 07:50:13,668 - update - geodataframe - INFO - GeoDataFrame: Read vector data and clip to geom (epsg:32633) [316221.151, 5041336.510, 329106.596, 5050441.766].
-2023-08-03 07:50:13,682 - update - sfincs - INFO - Setting gdf_locs index to ID
-2023-08-03 07:50:13,684 - update - sfincs - INFO - No matching index column found in gdf_locs; assuming the order is correct
-2023-08-03 07:50:13,692 - update - sfincs - INFO - Writing model data to /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
-2023-08-03 07:50:13,695 - update - sfincs - INFO - Write raster file(s) for grid to 'gis' subfolder
-2023-08-03 07:50:13,802 - update - sfincs - INFO - Write geom files
-2023-08-03 07:50:13,804 - update - sfincs - INFO - Write vector file(s) for geoms to 'gis' subfolder
-2023-08-03 07:50:13,820 - update - sfincs - INFO - Write forcing files
-2023-08-03 07:50:13,832 - update - sfincs - INFO - Write vector file(s) for forcing.bzs to 'gis' subfolder
-2023-08-03 07:50:13,868 - update - sfincs - INFO - Write vector file(s) for forcing.dis to 'gis' subfolder
-2023-08-03 07:50:13,893 - update - sfincs - WARNING - zsini not in states, skipping
+2023-08-03 14:57:16,543 - update - log - INFO - HydroMT version: 0.8.1.dev0
+2023-08-03 14:57:16,543 - update - main - INFO - Updating sfincs model at /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base (r+).
+2023-08-03 14:57:16,543 - update - main - INFO - Output dir: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
+2023-08-03 14:57:16,543 - update - main - INFO - User settings:
+2023-08-03 14:57:16,570 - update - model_api - WARNING - Model dir already exists and files might be overwritten: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base/gis.
+2023-08-03 14:57:16,570 - update - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
+2023-08-03 14:57:16,618 - update - model_api - INFO - setup_observation_points.locations: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_example_observation_points.geojson
+2023-08-03 14:57:16,618 - update - model_api - INFO - setup_observation_points.merge: True
+2023-08-03 14:57:16,673 - update - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
+2023-08-03 14:57:16,674 - update - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
+2023-08-03 14:57:16,761 - update - data_catalog - INFO - DataCatalog: Getting compound_example_observation_points.geojson GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_example_observation_points.geojson
+2023-08-03 14:57:16,763 - update - geodataframe - INFO - GeoDataFrame: Read vector data and clip to geom (epsg:32633) [316221.151, 5041336.510, 329106.596, 5050441.766].
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.geodataset: gtsmv3_eu_era5
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.timeseries: None
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.locations: None
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.offset: None
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.buffer: 2000
+2023-08-03 14:57:16,781 - update - model_api - INFO - setup_waterlevel_forcing.merge: True
+2023-08-03 14:57:16,802 - update - data_catalog - INFO - DataCatalog: Getting gtsmv3_eu_era5 GeoDataset netcdf data from /home/runner/.hydromt_data/artifact_data/v0.0.8/gtsmv3_eu_era5.nc
+2023-08-03 14:57:17,323 - update - model_api - INFO - setup_discharge_forcing.geodataset: None
+2023-08-03 14:57:17,323 - update - model_api - INFO - setup_discharge_forcing.timeseries: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_dis_timeseries.csv
+2023-08-03 14:57:17,324 - update - model_api - INFO - setup_discharge_forcing.locations: /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_src_locations.geojson
+2023-08-03 14:57:17,324 - update - model_api - INFO - setup_discharge_forcing.merge: True
+2023-08-03 14:57:17,324 - update - model_api - INFO - setup_discharge_forcing.buffer: None
+2023-08-03 14:57:17,324 - update - data_catalog - INFO - DataCatalog: Getting compound_dis_timeseries.csv DataFrame csv data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_dis_timeseries.csv
+2023-08-03 14:57:17,325 - update - dataframe - INFO - DataFrame: Read csv data.
+2023-08-03 14:57:17,331 - update - data_catalog - INFO - DataCatalog: Getting compound_src_locations.geojson GeoDataFrame vector data from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/data/compound_src_locations.geojson
+2023-08-03 14:57:17,332 - update - geodataframe - INFO - GeoDataFrame: Read vector data and clip to geom (epsg:32633) [316221.151, 5041336.510, 329106.596, 5050441.766].
+2023-08-03 14:57:17,352 - update - sfincs - INFO - Setting gdf_locs index to ID
+2023-08-03 14:57:17,355 - update - sfincs - INFO - No matching index column found in gdf_locs; assuming the order is correct
+2023-08-03 14:57:17,370 - update - sfincs - INFO - Writing model data to /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base
+2023-08-03 14:57:17,374 - update - sfincs - INFO - Write raster file(s) for grid to 'gis' subfolder
+2023-08-03 14:57:17,542 - update - sfincs - INFO - Write geom files
+2023-08-03 14:57:17,545 - update - sfincs - INFO - Write vector file(s) for geoms to 'gis' subfolder
+2023-08-03 14:57:17,573 - update - sfincs - INFO - Write forcing files
+2023-08-03 14:57:17,591 - update - sfincs - INFO - Write vector file(s) for forcing.bzs to 'gis' subfolder
+2023-08-03 14:57:17,650 - update - sfincs - INFO - Write vector file(s) for forcing.dis to 'gis' subfolder
+2023-08-03 14:57:17,690 - update - sfincs - WARNING - zsini not in states, skipping
+2023-08-03 14:57:17,691 - update - data_catalog - INFO - Parsing data catalog from /home/runner/work/hydromt_sfincs/hydromt_sfincs/docs/_examples/tmp_sfincs_base/hydromt_data.yml
 
 
@@ -926,7 +926,7 @@

7. Plot model including forcing:
# Plot time-series:
-_ = sf.plot_forcing()
+_ = sf.plot_forcing(fn_out="forcing.png")
 
@@ -952,7 +952,7 @@

7. Plot model including forcing:
# plot the model basemaps
 # Note the added obs and forcing points
 
-_ = sf.plot_basemap(bmap="sat", zoomlevel=12)
+_ = sf.plot_basemap(fn_out="basemap.png", bmap="sat", zoomlevel=12)
 
@@ -980,7 +980,7 @@

8. Check what additional files have been created:
-['sfincs.dep', 'sfincs.dis', 'sfincs.src', 'sfincs.obs', 'hydromt.log', 'sfincs.msk', 'gis', 'sfincs.ind', 'sfincs.inp', 'sfincs.bzs', 'sfincs.bnd']
+['sfincs.bnd', 'sfincs.bzs', 'sfincs.msk', 'sfincs.dep', 'sfincs.inp', 'sfincs.obs', 'sfincs.ind', 'figs', 'sfincs.dis', 'hydromt.log', 'sfincs.src', 'gis', 'hydromt_data.yml']
 

SFINCS native input files:

diff --git a/dev/_examples/build_from_script.html b/dev/_examples/build_from_script.html index bffceb60..ca8514bf 100644 --- a/dev/_examples/build_from_script.html +++ b/dev/_examples/build_from_script.html @@ -529,6 +529,14 @@

2. Specify characteristics of the wanted grid and generate grid:epsg=32633, ) +# Alternatively, we can also use a shape/geojson file to define the grid: +# sf.setup_grid_from_region( +# region = {'geom': 'data/region.geojson'}, +# res= 50, +# rotated=True, +# crs=32633 +# ) + # the input file is automatically updated. Uncomment to displayed below: print(sf.config)

@@ -680,76 +688,122 @@

5. Update mask with water level and outflow boundary cells - including use o

NOTE: - As you can see now, also msk=2 values (red line) have been added along the coastal boundary - As you can see now, also msk=3 values (purple line) have been added along the lateral inland boundaries within the gdf_include shapefile - reset_bounds=True means that you start without initial boundary cells (of the specified type), if reset_bounds=False (default) you build on the existing boundary cells (if available)

-
-

6. Add spatially varying roughness data:#

-
+
+

6. Add river inflow points:#

+
[9]:
 
-
# --> this is used in making subgrid tables
-
-# to ensure a correct lower roughness of the rivers in the domain, we 'burn in' the river with a lower manning roughness value.
-# the position of the river is based on global data, that is loaded below
+
# derive river from hydrography data based on a minimum river length (river_len)
+# and minimum upstream area (river_upa)
 
-# read river shapefile and add manning value to the attributes
-gdf = sf.data_catalog.get_geodataframe("rivers_lin2019_v1", geom=sf.region).to_crs(
-    sf.crs
+sf.setup_river_inflow(
+    hydrography='merit_hydro',
+    river_len=1000,
+    river_upa=50,
+    keep_rivers_geom=True
 )
-gdf["geometry"] = gdf.buffer(50)
-gdf["manning"] = 0.03
 
-# rasterize the manning value of gdf to the  model grid
-da_manning = sf.grid.raster.rasterize(gdf, "manning", nodata=np.nan)
-
-# uncomment to plot either the raster or the vector data:
-# da_manning.plot(vmin=0, x='xc', y='yc', cmap='viridis')
-# gdf.plot()
+# Make a plot of model
+# note the src points and derived river network
+fig, ax = sf.plot_basemap(variable="dep", plot_bounds=False, bmap="sat", zoomlevel=12)
 
-
+
+
+
+
+../_images/_examples_build_from_script_22_0.png +
+
+
[10]:
 
-
# use the river manning raster in combination with vito land to derive the manning roughness file
+
# --> this is used when the making subgrid tables (step 8)
+
+# use the derived rivers to burn these into the model subgrid
+# note that the width and depth are arbitrary here
+
+gdf_riv = sf.geoms['rivers_inflow'].copy()
+gdf_riv['rivwth'] = [100, 50, 50] # width [m]
+gdf_riv['rivdph'] = 1.5 # depth [m]
+gdf_riv["manning"] = 0.03  # manning coefficient [s.m-1/3]
+gdf_riv[['geometry', 'rivwth', 'rivdph', 'manning']]
+
+# prepare the river dataset for the subgrid
+# instead of using the derived rivers, you could also use an aribitrary shapefile with centerlines
+# Other options include to add a river mask shapefile rather than a river width attribute
+# Note that the width is either specified on the river centerline or with a river mask
+# Also the river bed level (rivbed) can be specified instead of the river depth (rivdph).
+
+datasets_riv = [{'centerlines': gdf_riv}]
+
+
+
+
+
+

7. Add spatially varying roughness data:#

+

To ensure a correct lower roughness of the rivers in the domain, we ‘burn in’ the river with a lower manning roughness value. There is two different ways to do this:

+
  1. Rasterize the manning value of gdf to the model grid and use this as a manning raster in datasets_rgh

    +
  2. Provide a manning roughness for datasets_riv while burning in rivers into the subgrid

    +
+
[11]:
+
+
+
# 1. rasterize the manning value of gdf to the  model grid and use this as a manning raster
+# gdf_riv_buf = gdf_riv.assign(geometry=gdf_riv.buffer(gdf_riv['rivwth']/2))
+# da_manning = sf.grid.raster.rasterize(gdf_riv_buf, "manning", nodata=np.nan)
+
+# use the river manning raster in combination with vito land to derive the manning roughness file
 # NOTE that we can combine in-memory data with data from the data catalog
-datasets_rgh = [{"manning": da_manning}, {"lulc": "vito"}]
+# datasets_rgh = [{"manning": da_manning}, {"lulc": "vito"}]
 
-sf.setup_manning_roughness(
-    datasets_rgh=datasets_rgh,
-    manning_land=0.04,
-    manning_sea=0.02,
-    rgh_lev_land=0,  # the minimum elevation of the land
-)
-_ = sf.plot_basemap(variable="manning", plot_bounds=False, bmap="sat", zoomlevel=12)
+# uncomment to plot either the raster or the vector data:
+# da_manning.plot(vmin=0, x='xc', y='yc', cmap='viridis')
+# gdf.plot()
 
-
-
+
+
[12]:
+
-
-
-The nodata value None is not in the reclass table.None will be used for the params.
-No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.
-
+
# 2. provide the manning value to the datasets_riv and burn in the river with a lower manning value
+# a global manning value can be provided to the datasets_riv, or a manning value per river segment can be provided
+# NOTE when using this method, we don't need to provide the river manning values to the datasets_rgh
+datasets_rgh = [{"lulc": "vito"}]
+
-
-
-
-../_images/_examples_build_from_script_23_1.png +
+
[13]:
+
+
+
# NOTE This step can be skipped because we prepare a subgrid model,
+# the manning roughness is than included in the subgrid tables
+# For models without subgrid uncomment the following lines.
+
+# sf.setup_manning_roughness(
+#     datasets_rgh=datasets_rgh,
+#     manning_land=0.04,
+#     manning_sea=0.02,
+#     rgh_lev_land=0,  # the minimum elevation of the land
+# )
+# _ = sf.plot_basemap(variable="manning", plot_bounds=False, bmap="sat", zoomlevel=12)
+
-
-

7. Make subgrid derived tables:#

+
+

8. Make subgrid derived tables:#

Subgrid derived tables are used to better capture the elevation and roughness of your domain, to either improve your results, or to allow you to run on a courser grid resolution (means faster simulation). For more info about subgrid tables, click here.

You as user can specify multiple settings about how the subgrid derived tables should be made.

Every single grid cell of the flux grid of the size inp.dx by inp.dy is defined into subgrid pixels (default nr_subgrid_pixels = 20). For every subgrid pixel the topobathy data is loaded, ideally this consists of high-resolution DEM datasets that you specify as user.

In this example with dx=dy=50m, having nr_subgrid_pixels = 20 means we are loading data onto a 2.5 m subpixel grid However, the input data of Gebco and Merit_hydro is way coarser, therefore let’s set the ratio to 5 for now.

-
-

8. Add spatially varying infiltration data:#

+
+

9. Add spatially varying infiltration data:#

-
[13]:
+
[16]:
 
# independent from subgrid files
@@ -827,7 +874,7 @@ 

8. Add spatially varying infiltration data: -
[13]:
+
[16]:
 
@@ -835,16 +882,15 @@

8. Add spatially varying infiltration data: -

9. Add water level time-series as forcing:#

+
+

10. Add water level time-series as forcing:#

-
[14]:
+
[17]:
 
# Change period of model simulation time, specified in yyyymmdd HHMMSS --> simulation time here is 24 hours
@@ -865,13 +911,13 @@ 

9. Add water level time-series as forcing:
-{'mmax': 250, 'nmax': 107, 'dx': 50.0, 'dy': 50.0, 'x0': 318650, 'y0': 5040000, 'rotation': 27, 'latitude': 0.0, 'tref': '20100201 000000', 'tstart': '20100205 000000', 'tstop': '20100207 000000', 'tspinup': 60.0, 'dtout': 3600.0, 'dthisout': 600.0, 'dtrstout': 0.0, 'dtmaxout': 99999.0, 'trstout': -999.0, 'dtwnd': 1800.0, 'alpha': 0.5, 'theta': 1.0, 'huthresh': 0.01, 'manning': 0.04, 'zsini': 0.0, 'rhoa': 1.25, 'rhow': 1024.0, 'dtmax': 60.0, 'advection': 2, 'baro': 0, 'pavbnd': 0, 'gapres': 101200.0, 'stopdepth': 100.0, 'crsgeo': 0, 'btfilter': 60.0, 'viscosity': 1, 'inputformat': 'bin', 'outputformat': 'net', 'cdnrb': 3, 'cdwnd': [0.0, 28.0, 50.0], 'cdval': [0.001, 0.0025, 0.0015], 'epsg': 32633, 'mskfile': 'sfincs.msk', 'indexfile': 'sfincs.ind', 'sbgfile': 'sfincs.sbg', 'scsfile': 'sfincs.scs'}
+{'mmax': 250, 'nmax': 107, 'dx': 50.0, 'dy': 50.0, 'x0': 318650, 'y0': 5040000, 'rotation': 27, 'latitude': 0.0, 'tref': '20100201 000000', 'tstart': '20100205 000000', 'tstop': '20100207 000000', 'tspinup': 60.0, 'dtout': 3600.0, 'dthisout': 600.0, 'dtrstout': 0.0, 'dtmaxout': 99999.0, 'trstout': -999.0, 'dtwnd': 1800.0, 'alpha': 0.5, 'theta': 1.0, 'huthresh': 0.01, 'manning': 0.04, 'manning_land': 0.04, 'manning_sea': 0.02, 'rgh_lev_land': 0.0, 'zsini': 0.0, 'rhoa': 1.25, 'rhow': 1024.0, 'dtmax': 60.0, 'advection': 2, 'baro': 0, 'pavbnd': 0, 'gapres': 101200.0, 'stopdepth': 100.0, 'crsgeo': 0, 'btfilter': 60.0, 'viscosity': 1, 'inputformat': 'bin', 'outputformat': 'net', 'cdnrb': 3, 'cdwnd': [0.0, 28.0, 50.0], 'cdval': [0.001, 0.0025, 0.0015], 'epsg': 32633, 'mskfile': 'sfincs.msk', 'indexfile': 'sfincs.ind', 'sbgfile': 'sfincs.sbg', 'scsfile': 'sfincs.scs'}
 

a. Specify water level input locations:

For more info about what the bndfile is, click here

-
[15]:
+
[18]:
 
# Here we specify at what x&y-locations we have measured/modelled input water level data in the bndfile of SFINCS:
@@ -931,7 +977,7 @@ 

9. Add water level time-series as forcing:click here

-
[16]:
+
[19]:
 
# Here we specify at what times we are providing water level input, and afterwards what the values are per input location:
@@ -998,7 +1044,7 @@ 

9. Add water level time-series as forcing: -

-
-

10. Add an upstream discharge time-series as forcing:#

+
+

11. Add an upstream discharge time-series as forcing:#

a. specify discharge input locations: srcfile

For more info about what the srcfile is, click here

b. specify discharge time-series: disfile

For more info about what the disfile is, click here

-
[18]:
+
[21]:
 
-
# We follow exactly the same steps as for the water level forcing, but now specify 1 location where we specify discharges in m3/s
-x = [321732]
-y = [5047136]
+
# We now use the previously created src discharge points (step 6)
+# Alternativly you can also create a new geodataframe with points, similar to the water level forcing points
 
-# add to Geopandas dataframe as needed by HydroMT
-pnts = gpd.points_from_xy(x, y)
-index = [1]  # NOTE that the index should start at one
-src = gpd.GeoDataFrame(index=index, geometry=pnts, crs=sf.crs)
-
-time = pd.date_range(
-    start=utils.parse_datetime(sf.config["tstart"]),
-    end=utils.parse_datetime(sf.config["tstop"]),
-    periods=3,
+# make up some discharge data
+index = sf.forcing['dis'].index
+dis = np.array(
+    [[2.0, 1.0],
+    [5.0, 2.0],
+    [2.0, 1.0]]
 )
-
-# and the actual water levels, in this case for input location 1 a water level rising from 0 to 2 meters and back to 0:
-dis = [[2.0], [5.0], [2.0]]
-
 dispd = pd.DataFrame(index=time, columns=index, data=dis)
 
-# now we call the function setup_discharge_forcing
-sf.setup_discharge_forcing(timeseries=dispd, locations=src)
+# now we call the function setup_discharge_forcing, which adds the discharge forcing to the src points
+sf.setup_discharge_forcing(timeseries=dispd)
 
-# NOTE: the discharge forcing data is now stored in the sf.forcing dictionary
+# # NOTE: the discharge forcing data is now stored in the sf.forcing dictionary
 sf.forcing.keys()
 
-
[18]:
+
[21]:
 
-dict_keys(['bzs', 'dis'])
+dict_keys(['dis', 'bzs'])
 

In case you want to add other types of forcing, see the example notebook example_forcing.ipynb for other types. Or read more about this in the SFINCS manual

-
-

11. Add spatially varying rainfall data:#

+
+

12. Add spatially varying rainfall data:#

-
[19]:
+
[22]:
 
# hourly rainfall rates of ECMWF' ERA5 data for the specific area and period have been made available for this period in the artefact data
@@ -1083,20 +1121,20 @@ 

11. Add spatially varying rainfall data: -

-
-

12. Add weirfile:#

+
+

13. Add weirfile:#

In SFINCS, a weirfile is often used to explicity account for line-element features such as dikes, dunes or floodwalls. Read more about structures in the SFINCS manual

-
[21]:
+
[24]:
 
# In this example specify a 'line' style shapefile for the location of the weir to be added
@@ -1129,20 +1167,20 @@ 

12. Add weirfile: -
[21]:
+
[24]:
 
-dict_keys(['region', 'weir'])
+dict_keys(['region', 'rivers_inflow', 'weir'])
 

-
-

13. Add observation points:#

+
+

14. Add observation points:#

For more info about what the obsfile is, click here

-
[22]:
+
[25]:
 
# Loading a point shapefile clicked by user:
@@ -1157,12 +1195,12 @@ 

13. Add observation points: -
[22]:
+
[25]:
 
-dict_keys(['region', 'weir', 'obs'])
+dict_keys(['region', 'rivers_inflow', 'weir', 'obs'])
 

@@ -1170,7 +1208,7 @@

13. Add observation points:#

Observation lines (cross-sections) can be added to monitor discharges through cross-sections. For more info about what the crsfile is, click here

-
[23]:
+
[26]:
 
# Loading a LineString GeoJson clicked by user:
@@ -1184,19 +1222,19 @@ 

14. Add observation lines: -
[23]:
+
[26]:
 
-dict_keys(['region', 'weir', 'obs', 'crs'])
+dict_keys(['region', 'rivers_inflow', 'weir', 'obs', 'crs'])
 

15. Show model:#

-
[24]:
+
[27]:
 
# Use predefined plotting function 'plot_basemap' to show your full SFINCS model setup
@@ -1208,14 +1246,14 @@ 

15. Show model:

-../_images/_examples_build_from_script_52_0.png +../_images/_examples_build_from_script_56_0.png

16. Save all files#

-
[25]:
+
[28]:
 
sf.write()  # write all
@@ -1223,7 +1261,7 @@ 

16. Save all files -
[26]:
+
[29]:
 

Your basemap and forcing figures are saved in the folder ‘figs’, GIS files (tiff & geojson) of your model setup in ‘gis’ and merged elevation and manning roughness on subgrid resolution in ‘subgrid’.

@@ -1297,14 +1335,15 @@

16. Save all files3. Load in wanted elevation datasets:
  • 4. Make mask of active and inactive cells:
  • 5. Update mask with water level and outflow boundary cells - including use of polygons:
  • -
  • 6. Add spatially varying roughness data:
  • -
  • 7. Make subgrid derived tables:
  • -
  • 8. Add spatially varying infiltration data:
  • -
  • 9. Add water level time-series as forcing:
  • -
  • 10. Add an upstream discharge time-series as forcing:
  • -
  • 11. Add spatially varying rainfall data:
  • -
  • 12. Add weirfile:
  • -
  • 13. Add observation points:
  • +
  • 6. Add river inflow points:
  • +
  • 7. Add spatially varying roughness data:
  • +
  • 8. Make subgrid derived tables:
  • +
  • 9. Add spatially varying infiltration data:
  • +
  • 10. Add water level time-series as forcing:
  • +
  • 11. Add an upstream discharge time-series as forcing:
  • +
  • 12. Add spatially varying rainfall data:
  • +
  • 13. Add weirfile:
  • +
  • 14. Add observation points:
  • 14. Add observation lines:
  • 15. Show model:
  • 16. Save all files
  • diff --git a/dev/_examples/example_forcing.html b/dev/_examples/example_forcing.html index 4d082e5b..38dae2ca 100644 --- a/dev/_examples/example_forcing.html +++ b/dev/_examples/example_forcing.html @@ -443,10 +443,10 @@

    Working with forcing conditions
    -2023-08-03 07:50:56,344 - root - log - INFO - HydroMT version: 0.8.0
    -2023-08-03 07:50:56,398 - root - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
    -2023-08-03 07:50:56,399 - root - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
    -2023-08-03 07:50:56,472 - root - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
    +2023-08-03 14:58:23,235 - root - log - INFO - HydroMT version: 0.8.1.dev0
    +2023-08-03 14:58:23,322 - root - data_catalog - INFO - Reading data catalog artifact_data v0.0.8 from archive
    +2023-08-03 14:58:23,323 - root - data_catalog - INFO - Parsing data catalog from /home/runner/.hydromt_data/artifact_data/v0.0.8/data_catalog.yml
    +2023-08-03 14:58:23,420 - root - model_api - INFO - Initializing sfincs model from hydromt_sfincs (v1.0.1.dev0).
     

    We see here the earlier inspected log-file ‘sfincs_log.txt’

    diff --git a/dev/_examples/sfincs_results_animation.html b/dev/_examples/sfincs_results_animation.html index c14417a4..d543111c 100644 --- a/dev/_examples/sfincs_results_animation.html +++ b/dev/_examples/sfincs_results_animation.html @@ -508,7 +508,7 @@

    Plot instantaneous water depths
    -<xarray.plot.facetgrid.FacetGrid at 0x7f0b7cb0e770>
    +<xarray.plot.facetgrid.FacetGrid at 0x7f28c96dccd0>
     

    diff --git a/dev/_generated/hydromt_sfincs.SfincsModel.build.html b/dev/_generated/hydromt_sfincs.SfincsModel.build.html index f9fe0414..a65f5478 100644 --- a/dev/_generated/hydromt_sfincs.SfincsModel.build.html +++ b/dev/_generated/hydromt_sfincs.SfincsModel.build.html @@ -377,6 +377,7 @@
  • hydromt_sfincs.SfincsModel.setup_river_inflow
  • hydromt_sfincs.SfincsModel.setup_river_outflow
  • hydromt_sfincs.SfincsModel.setup_observation_points
  • +
  • hydromt_sfincs.SfincsModel.setup_observation_lines
  • hydromt_sfincs.SfincsModel.setup_structures
  • hydromt_sfincs.SfincsModel.setup_drainage_structures
  • hydromt_sfincs.SfincsModel.setup_waterlevel_forcing
  • @@ -446,9 +447,7 @@