-
Notifications
You must be signed in to change notification settings - Fork 0
[in2TopoHyd]: Module for computing hydraulic inital conditions #90
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
base: master
Are you sure you want to change the base?
Changes from all commits
92420ee
dab337a
7107d3b
b1c7b51
51a0942
068f5be
294b460
c199fb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| timestep,discharge | ||
| 0,14.17 | ||
| 5,28.33 | ||
| 10,42.5 | ||
| 15,56.67 | ||
| 20,70.83 | ||
| 25,85.0 | ||
| 30,77.92 | ||
| 35,70.83 | ||
| 40,63.75 | ||
| 45,56.67 | ||
| 50,49.58 | ||
| 55,42.5 | ||
| 60,35.42 | ||
| 65,28.33 | ||
| 70,21.25 | ||
| 75,14.17 | ||
| 80,7.08 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| UTF-8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| PROJCS["ETRS_1989_Austria_Lambert",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",400000.0],PARAMETER["False_Northing",400000.0],PARAMETER["Central_Meridian",13.3333333333333],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",47.5],UNIT["Meter",1.0]] |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file ends with "Levee", below in the documentation it says, the file needs to end with "levee" (lower case). File not found or there are more than one levee files in POINTS-folder! |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| UTF-8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| PROJCS["ETRS_1989_Austria_Lambert",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",400000.0],PARAMETER["False_Northing",400000.0],PARAMETER["Central_Meridian",13.3333333333333],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",47.5],UNIT["Meter",1.0]] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| """ | ||
| Directory and file handling helper functions | ||
| """ | ||
|
|
||
| import pathlib | ||
| import shutil | ||
| import logging | ||
|
|
||
| log = logging.getLogger("avaframe.debrisframe.in1Utils.fileUtils") | ||
|
|
||
|
|
||
| def copyHydrToInput(debrisDir): | ||
| """ | ||
| copy the output file from in2TopoHyd into Inputs/REL | ||
| to serve as input data for c1TIF | ||
|
|
||
| Parameters | ||
| ----------- | ||
| debrisDir: str or pathlib path | ||
| path to debris-flow directory | ||
| """ | ||
|
|
||
| debrisDir = pathlib.Path(debrisDir) | ||
|
|
||
| outputFile = debrisDir / "Outputs" / "in2TopoHyd" / "initCondHyd.csv" | ||
| inputsDir = debrisDir / "Inputs" / "REL" | ||
| inputsDir.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| inputsHydFile = inputsDir / outputFile.name | ||
|
|
||
| # TODO: How should we handle if the file already exists? | ||
|
fso42 marked this conversation as resolved.
|
||
| if inputsHydFile.exists(): | ||
| raise FileExistsError(f"File already exists: {inputsHydFile}") | ||
|
|
||
| shutil.copy2(outputFile, inputsHydFile) | ||
Uh oh!
There was an error while loading. Please reload this page.