flood-adapt 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- flood_adapt-0.3.0/LICENSE +21 -0
- flood_adapt-0.3.0/PKG-INFO +183 -0
- flood_adapt-0.3.0/README.md +127 -0
- flood_adapt-0.3.0/flood_adapt/__init__.py +22 -0
- flood_adapt-0.3.0/flood_adapt/adapter/__init__.py +9 -0
- flood_adapt-0.3.0/flood_adapt/adapter/fiat_adapter.py +1502 -0
- flood_adapt-0.3.0/flood_adapt/adapter/interface/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/adapter/interface/hazard_adapter.py +70 -0
- flood_adapt-0.3.0/flood_adapt/adapter/interface/impact_adapter.py +36 -0
- flood_adapt-0.3.0/flood_adapt/adapter/interface/model_adapter.py +89 -0
- flood_adapt-0.3.0/flood_adapt/adapter/interface/offshore.py +19 -0
- flood_adapt-0.3.0/flood_adapt/adapter/sfincs_adapter.py +1857 -0
- flood_adapt-0.3.0/flood_adapt/adapter/sfincs_offshore.py +193 -0
- flood_adapt-0.3.0/flood_adapt/config/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/config/config.py +245 -0
- flood_adapt-0.3.0/flood_adapt/config/fiat.py +219 -0
- flood_adapt-0.3.0/flood_adapt/config/gui.py +224 -0
- flood_adapt-0.3.0/flood_adapt/config/sfincs.py +336 -0
- flood_adapt-0.3.0/flood_adapt/config/site.py +124 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/database_builder.py +2175 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/default_units/imperial.toml +9 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/default_units/metric.toml +9 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/green_infra_table/green_infra_lookup_table.csv +10 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/black_down_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/black_left_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/black_right_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/black_up_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_down.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_left.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_right.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-16_white_up.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_down.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_left.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_right.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_black_up.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_white_left.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/icons8-triangle-arrow-24_white_right.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/white_down_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/white_left_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/white_right_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/icons/white_up_48x48.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/OSM/config_charts.toml +90 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/OSM/config_people.toml +57 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/OSM/config_risk_charts.toml +121 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/OSM/config_roads.toml +65 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/OSM/styles.css +45 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/US_NSI/config_charts.toml +126 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/US_NSI/config_people.toml +60 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/US_NSI/config_risk_charts.toml +121 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/US_NSI/config_roads.toml +65 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/US_NSI/styles.css +45 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/ambulance.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/car.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/cart.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/firetruck.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/hospital.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/house.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/info.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/money.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/person.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/school.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/truck.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infographics/images/walking_person.png +0 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/OSM/metrics_additional_risk_configs.toml +4 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/OSM/with_SVI/infographic_metrics_config.toml +143 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/OSM/with_SVI/infographic_metrics_config_risk.toml +153 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/OSM/without_SVI/infographic_metrics_config.toml +127 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/OSM/without_SVI/infographic_metrics_config_risk.toml +57 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/US_NSI/metrics_additional_risk_configs.toml +4 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/US_NSI/with_SVI/infographic_metrics_config.toml +191 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/US_NSI/with_SVI/infographic_metrics_config_risk.toml +153 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/US_NSI/without_SVI/infographic_metrics_config.toml +178 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/US_NSI/without_SVI/infographic_metrics_config_risk.toml +57 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/mandatory_metrics_config.toml +9 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/infometrics/mandatory_metrics_config_risk.toml +65 -0
- flood_adapt-0.3.0/flood_adapt/database_builder/templates/mapbox_layers/bin_colors.toml +5 -0
- flood_adapt-0.3.0/flood_adapt/database_builder.py +16 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/__init__.py +21 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/database.py +716 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_benefit.py +97 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_event.py +91 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_measure.py +103 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_projection.py +52 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_scenario.py +150 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_static.py +261 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_strategy.py +147 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/dbs_template.py +302 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/interface/database.py +147 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/interface/element.py +137 -0
- flood_adapt-0.3.0/flood_adapt/dbs_classes/interface/static.py +47 -0
- flood_adapt-0.3.0/flood_adapt/flood_adapt.py +1371 -0
- flood_adapt-0.3.0/flood_adapt/misc/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/misc/database_user.py +16 -0
- flood_adapt-0.3.0/flood_adapt/misc/log.py +183 -0
- flood_adapt-0.3.0/flood_adapt/misc/path_builder.py +54 -0
- flood_adapt-0.3.0/flood_adapt/misc/utils.py +185 -0
- flood_adapt-0.3.0/flood_adapt/objects/__init__.py +59 -0
- flood_adapt-0.3.0/flood_adapt/objects/benefits/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/benefits/benefits.py +61 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/event_factory.py +135 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/event_set.py +84 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/events.py +221 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/historical.py +55 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/hurricane.py +64 -0
- flood_adapt-0.3.0/flood_adapt/objects/events/synthetic.py +48 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/csv.py +68 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/discharge.py +66 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/forcing.py +142 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/forcing_factory.py +182 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/meteo_handler.py +93 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/netcdf.py +40 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/plotting.py +428 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/rainfall.py +98 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/tide_gauge.py +191 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/time_frame.py +77 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/timeseries.py +552 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/unit_system.py +580 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/waterlevels.py +108 -0
- flood_adapt-0.3.0/flood_adapt/objects/forcing/wind.py +124 -0
- flood_adapt-0.3.0/flood_adapt/objects/measures/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/measures/measure_factory.py +92 -0
- flood_adapt-0.3.0/flood_adapt/objects/measures/measures.py +506 -0
- flood_adapt-0.3.0/flood_adapt/objects/object_model.py +68 -0
- flood_adapt-0.3.0/flood_adapt/objects/projections/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/projections/projections.py +89 -0
- flood_adapt-0.3.0/flood_adapt/objects/scenarios/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/scenarios/scenarios.py +22 -0
- flood_adapt-0.3.0/flood_adapt/objects/strategies/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/objects/strategies/strategies.py +68 -0
- flood_adapt-0.3.0/flood_adapt/workflows/__init__.py +0 -0
- flood_adapt-0.3.0/flood_adapt/workflows/benefit_runner.py +541 -0
- flood_adapt-0.3.0/flood_adapt/workflows/floodmap.py +85 -0
- flood_adapt-0.3.0/flood_adapt/workflows/impacts_integrator.py +82 -0
- flood_adapt-0.3.0/flood_adapt/workflows/scenario_runner.py +69 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/PKG-INFO +183 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/SOURCES.txt +144 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/dependency_links.txt +1 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/not-zip-safe +1 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/requires.txt +47 -0
- flood_adapt-0.3.0/flood_adapt.egg-info/top_level.txt +1 -0
- flood_adapt-0.3.0/pyproject.toml +145 -0
- flood_adapt-0.3.0/setup.cfg +4 -0
- flood_adapt-0.3.0/tests/test_flood_adapt.py +620 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Deltares
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: flood-adapt
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: A software package support system which can be used to assess the benefits and costs of flood resilience measures
|
|
5
|
+
Author-email: Gundula Winter <Gundula.Winter@deltares.nl>, Panos Athanasiou <Panos.Athanasiou@deltares.nl>, Frederique de Groen <Frederique.deGroen@deltares.nl>, Tim de Wilde <Tim.deWilde@deltares.nl>, Julian Hofer <Julian.Hofer@deltares.nl>, Daley Adrichem <Daley.Adrichem@deltares.nl>, Luuk Blom <Luuk.Blom@deltares.nl>
|
|
6
|
+
Project-URL: Source, https://github.com/Deltares-research/FloodAdapt
|
|
7
|
+
Classifier: Intended Audience :: Science/Research
|
|
8
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
9
|
+
Classifier: Topic :: Scientific/Engineering :: Hydrology
|
|
10
|
+
Requires-Python: <3.13,>=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: cht-cyclones==1.0.3
|
|
14
|
+
Requires-Dist: cht-meteo==0.3.1
|
|
15
|
+
Requires-Dist: cht-observations==0.2.1
|
|
16
|
+
Requires-Dist: cht-tide==0.1.1
|
|
17
|
+
Requires-Dist: dask==2024.11.2
|
|
18
|
+
Requires-Dist: numba_celltree==0.2.2
|
|
19
|
+
Requires-Dist: fiat-toolbox==0.1.17
|
|
20
|
+
Requires-Dist: fiona<2.0,>=1.0
|
|
21
|
+
Requires-Dist: geojson<4.0,>=3.0
|
|
22
|
+
Requires-Dist: geopandas<2.0,>=1.0
|
|
23
|
+
Requires-Dist: hydromt-fiat==0.5.4
|
|
24
|
+
Requires-Dist: hydromt-sfincs==1.2.0
|
|
25
|
+
Requires-Dist: numpy<2.0,>=1.0
|
|
26
|
+
Requires-Dist: numpy-financial<2.0,>=1.0
|
|
27
|
+
Requires-Dist: pandas<3.0,>=2.0
|
|
28
|
+
Requires-Dist: plotly<7.0,>=6.0
|
|
29
|
+
Requires-Dist: pydantic<3.0,>=2.0
|
|
30
|
+
Requires-Dist: pydantic-settings<3.0,>=2.0
|
|
31
|
+
Requires-Dist: pyogrio<1.0
|
|
32
|
+
Requires-Dist: tomli<3.0,>=2.0
|
|
33
|
+
Requires-Dist: tomli-w<2.0,>=1.0
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-timeout<3.0,>=2.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov<7.0,>=6.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pre-commit==3.8.0; extra == "dev"
|
|
39
|
+
Requires-Dist: ruff==0.5.5; extra == "dev"
|
|
40
|
+
Requires-Dist: typos==1.23.6; extra == "dev"
|
|
41
|
+
Provides-Extra: build
|
|
42
|
+
Requires-Dist: build<2.0,>=1.2; extra == "build"
|
|
43
|
+
Requires-Dist: twine<7.0,>=6.0; extra == "build"
|
|
44
|
+
Requires-Dist: pyinstaller==6.7.0; extra == "build"
|
|
45
|
+
Requires-Dist: pefile<2024.8.26; extra == "build"
|
|
46
|
+
Provides-Extra: docs
|
|
47
|
+
Requires-Dist: jupyter<2.0,>=1.0; extra == "docs"
|
|
48
|
+
Requires-Dist: jupyter-cache<2.0,>=1.0; extra == "docs"
|
|
49
|
+
Requires-Dist: matplotlib<4.0,>=3.0; extra == "docs"
|
|
50
|
+
Requires-Dist: quartodoc<1.0,>=0.9.0; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx<9.0,>=8.0; extra == "docs"
|
|
52
|
+
Requires-Dist: sphinx-rtd-theme<4.0,>=3.0; extra == "docs"
|
|
53
|
+
Requires-Dist: regex<2025.0,>=2024.11; extra == "docs"
|
|
54
|
+
Provides-Extra: all
|
|
55
|
+
Requires-Dist: flood-adapt[build,dev,docs]; extra == "all"
|
|
56
|
+
|
|
57
|
+
# FloodAdapt
|
|
58
|
+
FloodAdapt is a decision-support tool that seeks to advance and accelerate flooding-related adaptation planning. It brings rapid, physics-based compound flood and detailed impact modelling into an easy-to-use system, allowing non-expert end-users to evaluate a wide variety of compound events, future conditions, and adaptation options in minutes. FloodAdapt serves as a connector between scientific advances and practitioner needs, improving and increasing the uptake and impact of adaptation research and development.
|
|
59
|
+
|
|
60
|
+
To make decisions on flood adaptation, communities need to understand how climate and socio-economic changes will affect flood risk and the risk-reduction potential of various adaptation options. This type of information is usually costly to acquire, and models are often too slow and labor-intensive to evaluate all the scenarios required to understand the impacts and effectiveness of potential adaptation decisions. FloodAdapt addresses this by making rapid, physics-based compound flood modeling and detailed impact modeling accessible to non-expert end-users, allowing them to evaluate a wide variety of compound events, future conditions, and adaptation options in minutes.
|
|
61
|
+
|
|
62
|
+
FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?”
|
|
63
|
+
|
|
64
|
+
Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures.
|
|
65
|
+
The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model SFINCS (https://github.com/Deltares/SFINCS) that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed flood impact assessment tool Delft-FIAT (https://github.com/Deltares/Delft-FIAT). It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes.
|
|
66
|
+
|
|
67
|
+
FloodAdapt can greatly support adaptation planning by allowing users to explore many scenarios. It can be used to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. Users can also test out adaptation options, like sea walls, levees, pumps, home elevations, buyouts and floodproofing.
|
|
68
|
+
|
|
69
|
+
Recent developments of the decision-support system include (1) simplifying and partially automating the setup of the SFINCS and Delft-FIAT models, (2) improving the user experience, (3) better supporting adaptation planning with improvements like metrics tables, infographics, better visualizations in the user interface, adding in additional adaptation options to evaluate, and calculating benefits of adaptation options, and (4) incorporating social vulnerability and equity into the evaluation of adaptation options to support equitable adaptation planning.
|
|
70
|
+
|
|
71
|
+
FloodAdapt is currently in an intensive development stage. Independent usage of the repository will be challenging prior to end-of-year 2024. FloodAdapt documentation will be expanded on throughout 2024.
|
|
72
|
+
|
|
73
|
+
# Installation
|
|
74
|
+
|
|
75
|
+
## Setting up Pixi
|
|
76
|
+
To build the environment, manage dependencies and run tasks, FloodAdapt uses [Pixi](https://pixi.sh/latest/), please download and install it by following the instructions on the pixi website.
|
|
77
|
+
|
|
78
|
+
Before continuing the installation process, make sure you have access to all required private repositories by ensuring you are in the Teams `FloodAdaptUsers` in the [Deltares](https://github.com/orgs/Deltares/teams/floodadaptusers) and [Deltares-research](https://github.com/orgs/Deltares-research/teams/floodadaptusers) organizations.
|
|
79
|
+
|
|
80
|
+
## Windows
|
|
81
|
+
Then run these commands to install FloodAdapt:
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/Deltares-research/FloodAdapt.git
|
|
84
|
+
cd FloodAdapt
|
|
85
|
+
pixi install
|
|
86
|
+
```
|
|
87
|
+
## Linux
|
|
88
|
+
Linux is not supported at the moment, but will be supported in the near future.
|
|
89
|
+
|
|
90
|
+
## Configure database
|
|
91
|
+
|
|
92
|
+
#### TODO add section for the DatabaseBuilder.
|
|
93
|
+
|
|
94
|
+
FloodAdapt uses a database to store, handle and organize input files, output files and static data. This database needs to be configured the first time you want to use FloodAdapt. Which is done via `flood_adapt/misc/config.py` which contains the `Settings` class to set and validate environment variables, specific to your system.
|
|
95
|
+
|
|
96
|
+
To initialize FloodAdapt and configure the database, add the following lines to the top of your script / initialize function to validate and set the environment variables:
|
|
97
|
+
```python
|
|
98
|
+
from pathlib import Path
|
|
99
|
+
from flood_adapt.misc.config import Settings
|
|
100
|
+
|
|
101
|
+
# Usually ends in `Database` and can contain multiple sites
|
|
102
|
+
root = Path("path/to/your/database/root")
|
|
103
|
+
|
|
104
|
+
# Specifies which site to use
|
|
105
|
+
name = "database_name"
|
|
106
|
+
|
|
107
|
+
# Contains the model kernels to run that perform the calculations
|
|
108
|
+
system_folder = Path("path/to/your/system/folder")
|
|
109
|
+
|
|
110
|
+
# Validate and set environment variables
|
|
111
|
+
Settings(
|
|
112
|
+
DATABASE_ROOT=root,
|
|
113
|
+
DATABASE_NAME=name,
|
|
114
|
+
SYSTEM_FOLDER=system_folder,
|
|
115
|
+
)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Developing FloodAdapt
|
|
119
|
+
|
|
120
|
+
To contribute to FloodAdapt, you will need to install additional dependencies. To do so, clone the repository and install the development environment:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Install dev environment
|
|
124
|
+
git clone https://github.com/Deltares/FloodAdapt
|
|
125
|
+
cd FloodAdapt
|
|
126
|
+
|
|
127
|
+
# This will install the required environment and run the tests to verify
|
|
128
|
+
pixi run tests
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Alternatively, you can open an interactive shell and have pixi take care of activating and updating your environment.
|
|
132
|
+
```bash
|
|
133
|
+
# `activate` the dev environment
|
|
134
|
+
pixi shell -e dev
|
|
135
|
+
|
|
136
|
+
# Develop
|
|
137
|
+
pytest tests/test_x/test_y/test_z.py
|
|
138
|
+
python scripts/my_script.py
|
|
139
|
+
...
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Adding editable installations to your environment
|
|
143
|
+
|
|
144
|
+
To make developing easier and not have to reinstall packages after every change, editable installs exist.
|
|
145
|
+
Pixi supports editable installs, but not in the most intuitive way, as they need to be defined as editable in the project specification.
|
|
146
|
+
|
|
147
|
+
Example command to add the package `example_package` as an editable install to the default environment:
|
|
148
|
+
- go to the non-pixi sections in `pyproject.toml` and comment out the `example_package`. (`[dependencies]` or `[optional-dependencies]`)
|
|
149
|
+
- in the pixi section `[tool.pixi.pypi-dependencies]`: add the following line `example_package = {path = "./path/to/example_package", editable = true }`. Note that this path is relative to the root of this project.
|
|
150
|
+
- run `pixi update`
|
|
151
|
+
|
|
152
|
+
## Useful pixi commands
|
|
153
|
+
```bash
|
|
154
|
+
# Display all pixi commands and options
|
|
155
|
+
pixi -h
|
|
156
|
+
|
|
157
|
+
# Install a non default pixi environment defined in pyproject.toml
|
|
158
|
+
pixi install -e [ENV_NAME]
|
|
159
|
+
|
|
160
|
+
# Update environment(s) to the latest allowed by dependency specifications in pyproject.toml
|
|
161
|
+
pixi update
|
|
162
|
+
|
|
163
|
+
# List all available tasks
|
|
164
|
+
pixi task list
|
|
165
|
+
|
|
166
|
+
# Run a task in the default environment for that task
|
|
167
|
+
pixi run [TASK]
|
|
168
|
+
|
|
169
|
+
# Start a shell in the pixi environment
|
|
170
|
+
pixi shell -e [ENV_NAME]
|
|
171
|
+
|
|
172
|
+
# Add a package to the dependencies
|
|
173
|
+
pixi add [PACKAGE]
|
|
174
|
+
|
|
175
|
+
# Run a task in a specific environment
|
|
176
|
+
pixi run -e [ENV_NAME] [TASK]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Generating the documentation
|
|
180
|
+
|
|
181
|
+
We use `quartodoc` to generate our API documentation automatically. If you have the `docs` optional dependency group installed.
|
|
182
|
+
you can do this by running `quartodoc build` from the `docs` directory, and it will create the documentation for you.
|
|
183
|
+
After this is done, if you wish, you can build and view the documentation locally by running `quarto preview` from the `docs` directory
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# FloodAdapt
|
|
2
|
+
FloodAdapt is a decision-support tool that seeks to advance and accelerate flooding-related adaptation planning. It brings rapid, physics-based compound flood and detailed impact modelling into an easy-to-use system, allowing non-expert end-users to evaluate a wide variety of compound events, future conditions, and adaptation options in minutes. FloodAdapt serves as a connector between scientific advances and practitioner needs, improving and increasing the uptake and impact of adaptation research and development.
|
|
3
|
+
|
|
4
|
+
To make decisions on flood adaptation, communities need to understand how climate and socio-economic changes will affect flood risk and the risk-reduction potential of various adaptation options. This type of information is usually costly to acquire, and models are often too slow and labor-intensive to evaluate all the scenarios required to understand the impacts and effectiveness of potential adaptation decisions. FloodAdapt addresses this by making rapid, physics-based compound flood modeling and detailed impact modeling accessible to non-expert end-users, allowing them to evaluate a wide variety of compound events, future conditions, and adaptation options in minutes.
|
|
5
|
+
|
|
6
|
+
FloodAdapt was developed as a rapid planning tool with a straightforward graphical user interface for scenario generation, simulation, and visualization of spatial flooding and flooding impacts. Decision-making needs at the community level were central to the design of FloodAdapt. Users can answer planning questions like: “How will potential adaptation options reduce flood impacts?”, “How will those options perform for different types of events, like hurricanes, king tides, or heavy rainfall?”, “Which neighborhoods will benefit most?”, “How will those options hold up in the future?”
|
|
7
|
+
|
|
8
|
+
Users specify what-if scenarios composed of historic or synthetic weather events, climate or socio-economic future projections, and adaptation measures.
|
|
9
|
+
The backend of FloodAdapt leverages the open-source, state-of-the-art process-based compound flood model SFINCS (https://github.com/Deltares/SFINCS) that can accurately predict compound flooding due to surge, rainfall, and river discharge, at a fraction of the computation time typically required by physics-based models. The damage model included in FloodAdapt is the Deltares-developed flood impact assessment tool Delft-FIAT (https://github.com/Deltares/Delft-FIAT). It calculates the flood damages to individual buildings and roads, and – when social vulnerability data is available – aggregates these damages over vulnerability classes.
|
|
10
|
+
|
|
11
|
+
FloodAdapt can greatly support adaptation planning by allowing users to explore many scenarios. It can be used to evaluate flooding and impacts due to compound weather events, like hurricanes, king tides, and rainfall events. Users can evaluate flooding, impacts, and risk considering user-specified projections of sea level rise, precipitation increase, storm frequency increase, population growth, and economic growth. Users can also test out adaptation options, like sea walls, levees, pumps, home elevations, buyouts and floodproofing.
|
|
12
|
+
|
|
13
|
+
Recent developments of the decision-support system include (1) simplifying and partially automating the setup of the SFINCS and Delft-FIAT models, (2) improving the user experience, (3) better supporting adaptation planning with improvements like metrics tables, infographics, better visualizations in the user interface, adding in additional adaptation options to evaluate, and calculating benefits of adaptation options, and (4) incorporating social vulnerability and equity into the evaluation of adaptation options to support equitable adaptation planning.
|
|
14
|
+
|
|
15
|
+
FloodAdapt is currently in an intensive development stage. Independent usage of the repository will be challenging prior to end-of-year 2024. FloodAdapt documentation will be expanded on throughout 2024.
|
|
16
|
+
|
|
17
|
+
# Installation
|
|
18
|
+
|
|
19
|
+
## Setting up Pixi
|
|
20
|
+
To build the environment, manage dependencies and run tasks, FloodAdapt uses [Pixi](https://pixi.sh/latest/), please download and install it by following the instructions on the pixi website.
|
|
21
|
+
|
|
22
|
+
Before continuing the installation process, make sure you have access to all required private repositories by ensuring you are in the Teams `FloodAdaptUsers` in the [Deltares](https://github.com/orgs/Deltares/teams/floodadaptusers) and [Deltares-research](https://github.com/orgs/Deltares-research/teams/floodadaptusers) organizations.
|
|
23
|
+
|
|
24
|
+
## Windows
|
|
25
|
+
Then run these commands to install FloodAdapt:
|
|
26
|
+
```bash
|
|
27
|
+
git clone https://github.com/Deltares-research/FloodAdapt.git
|
|
28
|
+
cd FloodAdapt
|
|
29
|
+
pixi install
|
|
30
|
+
```
|
|
31
|
+
## Linux
|
|
32
|
+
Linux is not supported at the moment, but will be supported in the near future.
|
|
33
|
+
|
|
34
|
+
## Configure database
|
|
35
|
+
|
|
36
|
+
#### TODO add section for the DatabaseBuilder.
|
|
37
|
+
|
|
38
|
+
FloodAdapt uses a database to store, handle and organize input files, output files and static data. This database needs to be configured the first time you want to use FloodAdapt. Which is done via `flood_adapt/misc/config.py` which contains the `Settings` class to set and validate environment variables, specific to your system.
|
|
39
|
+
|
|
40
|
+
To initialize FloodAdapt and configure the database, add the following lines to the top of your script / initialize function to validate and set the environment variables:
|
|
41
|
+
```python
|
|
42
|
+
from pathlib import Path
|
|
43
|
+
from flood_adapt.misc.config import Settings
|
|
44
|
+
|
|
45
|
+
# Usually ends in `Database` and can contain multiple sites
|
|
46
|
+
root = Path("path/to/your/database/root")
|
|
47
|
+
|
|
48
|
+
# Specifies which site to use
|
|
49
|
+
name = "database_name"
|
|
50
|
+
|
|
51
|
+
# Contains the model kernels to run that perform the calculations
|
|
52
|
+
system_folder = Path("path/to/your/system/folder")
|
|
53
|
+
|
|
54
|
+
# Validate and set environment variables
|
|
55
|
+
Settings(
|
|
56
|
+
DATABASE_ROOT=root,
|
|
57
|
+
DATABASE_NAME=name,
|
|
58
|
+
SYSTEM_FOLDER=system_folder,
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Developing FloodAdapt
|
|
63
|
+
|
|
64
|
+
To contribute to FloodAdapt, you will need to install additional dependencies. To do so, clone the repository and install the development environment:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Install dev environment
|
|
68
|
+
git clone https://github.com/Deltares/FloodAdapt
|
|
69
|
+
cd FloodAdapt
|
|
70
|
+
|
|
71
|
+
# This will install the required environment and run the tests to verify
|
|
72
|
+
pixi run tests
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Alternatively, you can open an interactive shell and have pixi take care of activating and updating your environment.
|
|
76
|
+
```bash
|
|
77
|
+
# `activate` the dev environment
|
|
78
|
+
pixi shell -e dev
|
|
79
|
+
|
|
80
|
+
# Develop
|
|
81
|
+
pytest tests/test_x/test_y/test_z.py
|
|
82
|
+
python scripts/my_script.py
|
|
83
|
+
...
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Adding editable installations to your environment
|
|
87
|
+
|
|
88
|
+
To make developing easier and not have to reinstall packages after every change, editable installs exist.
|
|
89
|
+
Pixi supports editable installs, but not in the most intuitive way, as they need to be defined as editable in the project specification.
|
|
90
|
+
|
|
91
|
+
Example command to add the package `example_package` as an editable install to the default environment:
|
|
92
|
+
- go to the non-pixi sections in `pyproject.toml` and comment out the `example_package`. (`[dependencies]` or `[optional-dependencies]`)
|
|
93
|
+
- in the pixi section `[tool.pixi.pypi-dependencies]`: add the following line `example_package = {path = "./path/to/example_package", editable = true }`. Note that this path is relative to the root of this project.
|
|
94
|
+
- run `pixi update`
|
|
95
|
+
|
|
96
|
+
## Useful pixi commands
|
|
97
|
+
```bash
|
|
98
|
+
# Display all pixi commands and options
|
|
99
|
+
pixi -h
|
|
100
|
+
|
|
101
|
+
# Install a non default pixi environment defined in pyproject.toml
|
|
102
|
+
pixi install -e [ENV_NAME]
|
|
103
|
+
|
|
104
|
+
# Update environment(s) to the latest allowed by dependency specifications in pyproject.toml
|
|
105
|
+
pixi update
|
|
106
|
+
|
|
107
|
+
# List all available tasks
|
|
108
|
+
pixi task list
|
|
109
|
+
|
|
110
|
+
# Run a task in the default environment for that task
|
|
111
|
+
pixi run [TASK]
|
|
112
|
+
|
|
113
|
+
# Start a shell in the pixi environment
|
|
114
|
+
pixi shell -e [ENV_NAME]
|
|
115
|
+
|
|
116
|
+
# Add a package to the dependencies
|
|
117
|
+
pixi add [PACKAGE]
|
|
118
|
+
|
|
119
|
+
# Run a task in a specific environment
|
|
120
|
+
pixi run -e [ENV_NAME] [TASK]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Generating the documentation
|
|
124
|
+
|
|
125
|
+
We use `quartodoc` to generate our API documentation automatically. If you have the `docs` optional dependency group installed.
|
|
126
|
+
you can do this by running `quartodoc build` from the `docs` directory, and it will create the documentation for you.
|
|
127
|
+
After this is done, if you wish, you can build and view the documentation locally by running `quarto preview` from the `docs` directory
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# has to be here at the start to avoid circular imports
|
|
2
|
+
__version__ = "0.3.0"
|
|
3
|
+
|
|
4
|
+
from flood_adapt import adapter, dbs_classes, objects
|
|
5
|
+
from flood_adapt.config.config import Settings
|
|
6
|
+
from flood_adapt.config.site import Site
|
|
7
|
+
from flood_adapt.flood_adapt import FloodAdapt
|
|
8
|
+
from flood_adapt.misc.log import FloodAdaptLogging
|
|
9
|
+
from flood_adapt.objects.forcing import unit_system
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"FloodAdapt",
|
|
13
|
+
"Site",
|
|
14
|
+
"Settings",
|
|
15
|
+
"FloodAdaptLogging",
|
|
16
|
+
"unit_system",
|
|
17
|
+
"objects",
|
|
18
|
+
"dbs_classes",
|
|
19
|
+
"adapter",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
FloodAdaptLogging() # Initialize logging once for the entire package
|