-
Notifications
You must be signed in to change notification settings - Fork 8
[com1]: time dependent release option (hydrograph) for timestep 0 #1215
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?
Conversation
❌ 1 blocking issue (2 total)
@qltysh one-click actions:
|
c2af198 to
f5d064f
Compare
25f2d85 to
c2af198
Compare
abe94b3 to
9133c90
Compare
ef2763a to
3f374c8
Compare
3f374c8 to
76764eb
Compare
…; added mass source plot fix bug: hydrograph polygon does not need an attribute thickness fix bugs for hydrograph without REL area rename hydrograph to timeDependentRelease; move the csv table and polygon to REL folder adapt tests additional column for initialized mass add mass source plot adapt test write time dependent values into configurationFiles folder add test case for time dependent release shp file does not need thickness attribute add tests add test data add time dep rel in docu add data for standard test
76764eb to
060ba94
Compare
| releaseLine = shpConv.readLine(releaseFile, "release1", demVol) | ||
| if releaseType == "timeDepRel": | ||
| timeDepRelValues, _ = gI.getTimeDepRelCsv(timeDepRelFile) | ||
| releaseLine["thickness"] = [timeDepRelValues["thickness"][0]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is only from the initial time step, but later on mass is added - how should this be handled when used to generate info on release areas, for example in getInput.createReleaseStats(
| # get line from release area polygon | ||
| if cfg["GENERAL"].getboolean("timeDependentRelease"): | ||
| if cfg["INPUT"]["relThFile"] != "": | ||
| message = "When release is time dependent, release file needs to be provided as shape file!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check should be performed in: com1DFA/deriveParameterSet.py in function checkThicknessSettings(cfg, thName, inputSimFiles) - when the simDicts are created, leads to an error much earlier already then
| def prepareTimeDepRelLine(inputSimFiles, releaseLine, cfg): | ||
| """ | ||
| read hydrograph polygon and values | ||
| read time dependent release values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: add more info - and save information to releaseLine dictionary with keys..
| # check if some criterias are satisfied in the csv file | ||
| checkTimeDepRelease(releaseLine["values"], inputSimFiles["timeDepRelCsv"]) | ||
| # write the time dependent values into configurationFiles folder | ||
| cfgUtils.writeReleaseCsvFile(cfg, timeDepRelValuesTxt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the difference between this file and the csv file in Inputs/REL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the formatting different? - acutal values are not changed in the model run or can they be changed?
| check if time steps of hydrograph are not to close that the particle density becomes too high | ||
| check that particles moved out of hydrograph area before new particles are initialized | ||
| time between hydrograph time steps | ||
| check if time steps of time dependent release are not to close that the particle density becomes too high |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| check if time steps of time dependent release are not to close that the particle density becomes too high | |
| check if time steps of time dependent release are not too close so that the particle density cannot become too high |
| if cfgSim["GENERAL"]["timeDependentRelease"] == "True": | ||
| cfgSim["GENERAL"]["relThFromFile"] = "False" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed? To start a model run this needs to be set to true otherwise error if not relTh is set and if timeDependentRelease can relTh be set via ini file? I guess this should also go into the checkThicknessSettings that it is not allowed to set relThFromFile = False - as it is read from the csv file, and what if relThFromFile = False and relTh = 1.? should this lead to an error? if so please include that check in checkThicknessSettings
| "thickness": timeDepRelDF["thickness"].to_numpy(), | ||
| "velocity": timeDepRelDF["velocity"].to_numpy(), | ||
| } | ||
| return timeDepRelValues, timeDepRelDF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the timeDepRelDF used?
| .. Note:: | ||
| The time dependent release feature is still under development. | ||
| Various settings do not work yet. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somewhere add: set the flag THICKNESSFromFile (i.e. relThFromFile) to True in the configuration file (default is True) (currently only option is to read thickness from csv file for time dependent release)
and see comments on required checks for this in checkThicknessSettings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also add in com1DFACfg.ini where relTHFromFile is that csv is a type if timeDependentRelease?
Example plot for mass sources:

what is still missing: