-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alle verbeteringen aan model-klasse voor het debuggen van Vechtstromen en WDOD --------- Co-authored-by: Martijn Visser <[email protected]>
- Loading branch information
1 parent
6f39f95
commit 71b67e6
Showing
13 changed files
with
1,744 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# %% | ||
|
||
import pandas as pd | ||
from ribasim_nl import CloudStorage, Model | ||
|
||
cloud = CloudStorage() | ||
|
||
|
||
# %% | ||
data = [] | ||
for authority in cloud.water_authorities: | ||
ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_2024_6_3", "model.toml") | ||
if ribasim_toml.exists(): | ||
model = Model.read(ribasim_toml) | ||
data += [ | ||
{ | ||
"waterschap": authority, | ||
"basin_nodes": len(model.basin.node.df), | ||
"basin_areas": len(model.basin.area.df), | ||
"basin_verschil": abs(len(model.basin.node.df) - len(model.basin.area.df)), | ||
"basin_area_lt_5000m2": len(model.basin.area.df[model.basin.area.df.area < 5000]), | ||
} | ||
] | ||
|
||
df = pd.DataFrame(data) | ||
|
||
|
||
df.to_excel(cloud.joinpath("verschil_basins.xlsx"), index=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# %% | ||
from ribasim_nl import CloudStorage | ||
|
||
authority = "DrentsOverijsselseDelta" | ||
short_name = "dod" | ||
|
||
cloud = CloudStorage() | ||
|
||
model_url = cloud.joinurl(authority, "modellen", f"{authority}_2024_6_3") | ||
|
||
cloud.download_content(model_url) | ||
|
||
ribasim_toml = cloud.joinpath(authority, "modellen", f"{authority}_2024_6_3", "model.toml") | ||
if ribasim_toml.exists(): | ||
ribasim_toml.rename(ribasim_toml.with_name(f"{short_name}.toml")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# %% | ||
from ribasim_nl import CloudStorage | ||
|
||
cloud = CloudStorage() | ||
|
||
data_url = cloud.joinurl("DeDommel", "verwerkt") | ||
|
||
# %% | ||
cloud.download_content(data_url) |
Oops, something went wrong.