Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug #292

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion swmmanywhere/swmmanywhere.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def swmmanywhere(config: dict) -> tuple[Path, dict | None]:
# Currently precipitation must be provided via address_overrides, otherwise
# the default storm.dat file will be used
if not Path(
config.get("address_overrides", {}).get("precipitation", Path())
config.get("address_overrides", {}).get(
"precipitation", Path("precipitation.dat")
)
).exists():
config["address_overrides"] = config.get("address_overrides", {})
config["address_overrides"]["precipitation"] = (
Expand Down
1 change: 0 additions & 1 deletion tests/test_swmmanywhere.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def test_swmmanywhere():
config["bbox"] = [0.05677, 51.55656, 0.07193, 51.56726]
config["address_overrides"] = {
"building": str(test_data_dir / "building.geoparquet"),
"precipitation": str(defs_dir / "storm.dat"),
}
config["parameter_overrides"] = {
"subcatchment_derivation": {"subbasin_streamorder": 5}
Expand Down