Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow individual glaciers to merge together #624
This is the same as #600. I made some awful merge/commit errors there. Opening a new PR seemed cleaner and easier.
OGGM glaciers are initialised with current (~2003) glacier geometry and modeled as entities. For all scenarios with glacier retreat or only small advances this is perfectly fine. But for simulations where glaciers advance significantly nearby glaciers might merge together and behave different then when modeled individually.
This Pull Request will most likely only deal with individual glaciers and their tributary glaciers. Future work could adapt this approach and apply it to regional scales. But I doubt merging glaciers will ever become a fully automated process within all OGGM simulations. More likely merging glaciers will be a deliberate choice for specific simulations.
In this 1. commit I provide two new functions:
One necessary addition in the process was to add a
This PR is still work in progress. I at least want to add a more automatic selection of possible tributary glaciers. But I am happy to take comments or suggestions!
For illustration a simulation with artificial climate around Hintereisferner: For the first run all 5 pictured glaciers (Hintereisferner, two small previously connected pieces, Kesselwandferner in the north and Hochjochferner in the east) are modeled in basic OGGM fashion as entities.
The second plot shows a merged run, where all flowlines of the other 4 glaciers are merged to Hintereisferner.
I think the last two things to do are
Hello @matthiasdusch! Thanks for updating the PR.
Comment last updated on December 19, 2018 at 16:19 Hours UTC
fmaussion left a comment
Thanks a lot for this, this is looking great and I like the approach! This is nice looking code
I have the feeling some parts could be simplified, but I don't think it's necessary for now: if it works, that good! Please double check the docstrings and the part about the possible duplication in code again.
I'm sorry I created a conflict again, hopefully this can be solved online this time. Let me know before you want to merge, I might have another look.
referenced this pull request
Dec 17, 2018
fmaussion left a comment
This is a great addition, thanks a lot! Also, very nice code ;-)
I still have a few comments regarding the workflow but feel free to merge as is, we might revisit in the next year (or not), when we freeze v1.1