-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adding new infiltration module #147
base: develop
Are you sure you want to change the base?
Conversation
…nd no just snow-covered
… started working on implementation of the full suite of processes
…nd no just snow-covered
… started working on implementation of the full suite of processes
…aking things closer to complete. From here on out, I'll try to make commits more discrete
… obvious variable name: major_melt_count. Also changed Major to lowercase, which is consistent with other syntax. Xinfil is also replaced. Was a 3 element vector storing, the Gray infiltration index, SWE from when the first major melt begins (init_SWE), and the maximum melt per day for a major melt (max_major_per_day)
… some major issues with implementing this routine in CHM and a suggested fix. Also fixed a few typos.
…tched some variables from being per-trangle to global for the module. Also tried working on some functions for the crack routine but ran into issues, solve tomorrow
…is was moduled after the python version of this module I created in ClassGray.py found at: https://github.com/djmallum/PythonScripts/tree/main/HydrologyTestScripts
…d readability. Main body of GreenAmpt routine completed.
Function declarations, variables declarations up to date
…in repo. I changed these locally, but not necessary to merge with main repo.
This merge is taking my old repo, which is a detached fork to this new repo which is still attached to the main CHM repo.
This reverts commit 885abf7.
This reverts commit 69e892e.
This reverts commit ecdb364.
This reverts commit c4b92d4.
This reverts commit 9f74eb0.
This reverts commit 8df38cf.
|
||
// GreenAmpt | ||
double soil_storage; | ||
std::unique_ptr<tempvars> GA_temp{nullptr}; |
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.
So the idea for this GA_temp variable was to simplify function inputs. It will be accessible as d.GA_temp where the members are tempvars struct.
I could have just had all the members of tempvars be public members of data, but the idea was that these were variables that were not needed between runs (like the other members of data). So I can allocate GA_temp at the start and release it at the end of each call to run ONLY if greenampt is used. This reduces the memory overhead of the module while other modules are running or if greenampt is not used.
Currently there is no soil module in CHM. As a result, soil storage is handled completely by the Infil_All module by increasing d.soil_storage by d.GA_temp->final_storage in the GreenAmpt routine. The crack/Gray module does not use soil_storage in its calculation. When a soil module is added, this will have to be changed so that th efinal storage is sent to the soil module and taken as an input.
Class contains methods for accessing static arrays which are used by infiltration module, Infil_All and the ET model PenmanMonteith.
stored in physics/soil.h so that it can also be accessed by other routines.
This repo only exists becuase it is directly tied to Chris Marsh' CHM repo and is used for merging and PRs.
Here is the PR for the new infiltration module. Infil_All.cpp and the associated .hpp file have been added. Both were adapted from the Gray_Inf module. As a result, the commented headers have not been changed. This needs to be done but for now will remain unchanged until the module is ready to merge.
.github was changed to ignore unix backups appended with ~, and it would be good to include and harmless.
I also spent time working on my workflow file, shown in this PR draft. I intend to remove that one from the draft prior to merge.