Skip to content
Merged
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
28 changes: 15 additions & 13 deletions avaframe/com1DFA/com1DFA.py
Original file line number Diff line number Diff line change
Expand Up @@ -3509,20 +3509,22 @@ def prepareVarSimDict(standardCfg, inputSimFiles, variationDict, simNameExisting
cfgSim["INPUT"]["entThFile"] = pathToEnt
inputSimFiles["entResInfo"]["entRemeshed"] = remeshedEnt
cfgSim["INPUT"]["entrainmentScenario"] = str(pathlib.Path("ENT", inputSimFiles["entFile"].name))
if cfgSim["GENERAL"]["entrainableDeposition"] == "True" and (
cfgSim["GENERAL"]["adaptSfcEntrainment"] == "0"
or (
cfgSim["GENERAL"]["adaptSfcStopped"] == "0"
and cfgSim["GENERAL"]["adaptSfcDetrainment"] == "0"
)
):
# set entrainable Deposition to False if entrainment or adapt Sfc are switched off
message = f"When entrainable deposition is True, adaptSfcEntrainment and adaptSfcDeposition (or adaptSfcDetrainment) need to be 1."
log.error(message)
raise ValueError(message)
if modName in ["com1DFA", "com5SnowSlide", "com6RockAvalanche"]:
if cfgSim["GENERAL"]["entrainableDeposition"] == "True" and (
cfgSim["GENERAL"]["adaptSfcEntrainment"] == "0"
or (
cfgSim["GENERAL"]["adaptSfcStopped"] == "0"
and cfgSim["GENERAL"]["adaptSfcDetrainment"] == "0"
)
):
# set entrainable Deposition to False if entrainment or adapt Sfc are switched off
message = f"When entrainable deposition is True, adaptSfcEntrainment and adaptSfcDeposition (or adaptSfcDetrainment) need to be 1."
log.error(message)
Comment thread
fso42 marked this conversation as resolved.
raise ValueError(message)
else:
cfgSim["GENERAL"]["entrainableDeposition"] = "False"
log.info("Deposition is not entrainable when it's not an ent sim type.")
if modName in ["com1DFA", "com5SnowSlide", "com6RockAvalanche"]:
cfgSim["GENERAL"]["entrainableDeposition"] = "False"
log.info("Deposition is not entrainable when it's not an ent sim type.")

# add info about resistance file path to the cfg
if "res" in row._asdict()["simTypeList"] and inputSimFiles["resFile"] is not None:
Expand Down
Loading