flood-adapt 1.1.1__py3-none-any.whl → 1.1.2__py3-none-any.whl
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/__init__.py +1 -1
- flood_adapt/adapter/sfincs_adapter.py +16 -7
- {flood_adapt-1.1.1.dist-info → flood_adapt-1.1.2.dist-info}/METADATA +1 -1
- {flood_adapt-1.1.1.dist-info → flood_adapt-1.1.2.dist-info}/RECORD +7 -7
- {flood_adapt-1.1.1.dist-info → flood_adapt-1.1.2.dist-info}/LICENSE +0 -0
- {flood_adapt-1.1.1.dist-info → flood_adapt-1.1.2.dist-info}/WHEEL +0 -0
- {flood_adapt-1.1.1.dist-info → flood_adapt-1.1.2.dist-info}/top_level.txt +0 -0
flood_adapt/__init__.py
CHANGED
|
@@ -1310,10 +1310,14 @@ class SfincsAdapter(IHazardAdapter):
|
|
|
1310
1310
|
)
|
|
1311
1311
|
return
|
|
1312
1312
|
|
|
1313
|
+
model_rivers = self._read_river_locations()
|
|
1314
|
+
if model_rivers.empty:
|
|
1315
|
+
logger.warning(
|
|
1316
|
+
"Cannot add discharge forcing: No rivers defined in the sfincs model."
|
|
1317
|
+
)
|
|
1318
|
+
return
|
|
1313
1319
|
logger.info(f"Setting discharge forcing for river: {discharge.river.name}")
|
|
1314
|
-
|
|
1315
1320
|
time_frame = self.get_model_time()
|
|
1316
|
-
model_rivers = self._read_river_locations()
|
|
1317
1321
|
|
|
1318
1322
|
# Check that the river is defined in the model and that the coordinates match
|
|
1319
1323
|
river_loc = shapely.Point(
|
|
@@ -1711,17 +1715,22 @@ class SfincsAdapter(IHazardAdapter):
|
|
|
1711
1715
|
|
|
1712
1716
|
def _read_river_locations(self) -> gpd.GeoDataFrame:
|
|
1713
1717
|
path = self.get_model_root() / "sfincs.src"
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1718
|
+
lines = []
|
|
1719
|
+
if path.exists():
|
|
1720
|
+
with open(path) as f:
|
|
1721
|
+
lines = f.readlines()
|
|
1717
1722
|
coords = [(float(line.split()[0]), float(line.split()[1])) for line in lines]
|
|
1718
1723
|
points = [shapely.Point(coord) for coord in coords]
|
|
1719
1724
|
|
|
1720
1725
|
return gpd.GeoDataFrame({"geometry": points}, crs=self._model.crs)
|
|
1721
1726
|
|
|
1722
1727
|
def _read_waterlevel_boundary_locations(self) -> gpd.GeoDataFrame:
|
|
1723
|
-
|
|
1724
|
-
|
|
1728
|
+
path = self.get_model_root() / "sfincs.bnd"
|
|
1729
|
+
lines = []
|
|
1730
|
+
if path.exists():
|
|
1731
|
+
with open(path) as f:
|
|
1732
|
+
lines = f.readlines()
|
|
1733
|
+
|
|
1725
1734
|
coords = [(float(line.split()[0]), float(line.split()[1])) for line in lines]
|
|
1726
1735
|
points = [shapely.Point(coord) for coord in coords]
|
|
1727
1736
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: flood-adapt
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: A software package support system which can be used to assess the benefits and costs of flood resilience measures
|
|
5
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
6
|
License: ====================================================
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
flood_adapt/__init__.py,sha256=
|
|
1
|
+
flood_adapt/__init__.py,sha256=3YQ8FGjALB_ckt6bSvYNYb4kp-L5GMSoNxipSQle_ZY,779
|
|
2
2
|
flood_adapt/flood_adapt.py,sha256=HVFS4OFhcB0TqHtMw3kbEei0IfJxsciauHfG3XZ38-0,40747
|
|
3
3
|
flood_adapt/adapter/__init__.py,sha256=vnF8NCkEVX-N-gtGS-J_A1H1YYAjihWjJZFyYGwcp8Q,180
|
|
4
4
|
flood_adapt/adapter/fiat_adapter.py,sha256=seDjPoumkhUOd7qer3ni1_Ut3dwyq0-_yhJNaTEFc2E,60284
|
|
5
|
-
flood_adapt/adapter/sfincs_adapter.py,sha256=
|
|
5
|
+
flood_adapt/adapter/sfincs_adapter.py,sha256=0M2miklSvKIsedFU5JCRclyHvGAombLEyklZPgwByIY,79138
|
|
6
6
|
flood_adapt/adapter/sfincs_offshore.py,sha256=DkqGwx0Fx4dojY1YH8tW3MUS4Omgd5DC6QINEsTP0Uk,7659
|
|
7
7
|
flood_adapt/adapter/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
flood_adapt/adapter/interface/hazard_adapter.py,sha256=S2NIUAMSRgxC_E-tZRJ2qIP06U1zEVdn-MnvMTrn86s,2828
|
|
@@ -114,8 +114,8 @@ flood_adapt/objects/strategies/strategies.py,sha256=Jw-WJDCamL9p_7VEir3AdmYPMVAi
|
|
|
114
114
|
flood_adapt/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
115
|
flood_adapt/workflows/benefit_runner.py,sha256=eA21TuHdeZ6QYO8ehXri6BHlkyHsVsZphIdIca5g0KA,21824
|
|
116
116
|
flood_adapt/workflows/scenario_runner.py,sha256=9_Y6GmMYhYoTRkBUIlju0eBy6DosGf4Zl2tgu1QEubI,4119
|
|
117
|
-
flood_adapt-1.1.
|
|
118
|
-
flood_adapt-1.1.
|
|
119
|
-
flood_adapt-1.1.
|
|
120
|
-
flood_adapt-1.1.
|
|
121
|
-
flood_adapt-1.1.
|
|
117
|
+
flood_adapt-1.1.2.dist-info/LICENSE,sha256=Ui5E03pQ0EVKxvKA54lTPA1xrtgA2HMGLQai95eOzoE,36321
|
|
118
|
+
flood_adapt-1.1.2.dist-info/METADATA,sha256=nnnU7EvxfCCRU_9kCJqoDR3zpjAGUojTDO5dXZ9C12I,48876
|
|
119
|
+
flood_adapt-1.1.2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
120
|
+
flood_adapt-1.1.2.dist-info/top_level.txt,sha256=JvzMi6cTcQPEThCfpgMEeVny3ghI1urSH0CCgVIqSzw,12
|
|
121
|
+
flood_adapt-1.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|