Skip to content
Open
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
40 changes: 37 additions & 3 deletions debrisframe/c1TIF/c1TIFCfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@


[GENERAL]
# so far no general parameters to be set as debris flow option is fully implemented in com1DFA
# hence checkout the com1DFA_override section

# if inputHydrograph is True, the in2TopoHyd module is computed before the c1TIF computation
# Hydrograph input data need to be provided and the flag timeDependentRelease needs to be set to TRue
inputHydrograph = False


[com1DFA_com1DFA_override]

Expand All @@ -23,7 +26,7 @@ simTypeList = available
modelType = dfa

#+++++++++++++ Output++++++++++++
# desired result Parameters (ppr, pft, pfv, pta, FT, FV, P, FM, Vx, Vy, Vz, TA, particles) - separated by |
# desired result Parameters (ppr, pft, pfv, pta, FT, FV, P, FM, Vx, Vy, Vz, TA, dmDet, sfcChange, demAdapted, timeInfo, entrDepth, particles) - separated by |
resType = pft|pfv|ppr

#+++++++++Debris flow properties
Expand All @@ -38,6 +41,11 @@ rhoEnt = 2000
# mass per particle (if MPPDIR is used) [kg]
massPerPart = 280000.

#+++++++++++++Mesh
# remesh the input rasters or look for remeshed rasters
# expected mesh size [m], default in AvaFrame: 5 m
meshCellSize = 2

#+++++++++++++general start conditions: time dependent release
# if timeDependentRelease is True, provide the the timesteps, thickness and velocity
# for a releases in a csv-table in the REL folder
Expand Down Expand Up @@ -141,7 +149,33 @@ entEroEnergy = 5000
adaptSfcStopped = 0
adaptSfcDetrainment = 0
adaptSfcEntrainment = 0
# deposition is only entrainable if it is an entrainment simulation and if adaptSfcStopped = 1 and adaptSfcEntrainment = 1
# then mass that is stopped can be entrained (also if the entrainment area is not in this stopped area)
entrainableDeposition = False
# only adapt topography if changing height in at least one cell is > thresholdAdaptSfc [m]
thresholdAdaptSfc = 0.1
# use the adapted topography as background in the report plots
adaptDemPlot = False

# specify a particular release area scenario, provide name of shapefile with or without extension .shp (optional)
releaseScenario =


[in2TopoHyd_in2TopoHyd_override]
# use default in2TopoHyd config as base configuration (True) and override following parameters
# if False and local_in2TopoHydCfg is available use local
defaultConfig = True

#++++++++++++++++ Hydraulic Boundary Conditions
# Elevation steps in vertical direction to calclules the flow area
dElev = 0.1
# method how the flow velocity as initial condition is calculated
# currently only the method after Rickenmann (1999) is available
velType = rickenmann
# mean slope for the cross section in flow direction [m/m]
# optional; if left blank, the slope is computed automatically
slope =

# export cell centers along the release line as points in a csv-file; for plausability check
# True or False
exportCrossSectionCells = True
Comment thread
JuLa96 marked this conversation as resolved.
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
Binary file not shown.
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]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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).
When running the example, I get this error:

File not found or there are more than one levee files in POINTS-folder!
Ensure that there is exactly one point-shapefile including the ending *levee.shp!

Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file not shown.
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]]
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion debrisframe/debrisframeCfg.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[MAIN]
# Path to avalanche directory
#TODO: change avalancheDir to debrisDir
avalancheDir = data/debrisGenericTopoTimeDep
avalancheDir = data/debrisParabolaChanneled

# number of CPU cores to use for the computation of com1DFA
# possible values are:
Expand Down
35 changes: 35 additions & 0 deletions debrisframe/in1Utils/fileUtils.py
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?
Comment thread
fso42 marked this conversation as resolved.
if inputsHydFile.exists():
raise FileExistsError(f"File already exists: {inputsHydFile}")

shutil.copy2(outputFile, inputsHydFile)
Empty file.
Loading
Loading