Skip to content
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

WIP: Allow individual glaciers to merge together #600

Closed
wants to merge 13 commits into from

Conversation

matthiasdusch
Copy link
Member

@matthiasdusch matthiasdusch commented Nov 13, 2018

  • Tests added/passed
  • Fully documented
  • Entry in whats-new.rst
  • Write a new GlacierDirectory for merged glaciers
  • Come up with a smarter solution how to efficiently handle the climate files

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.
The first requirement to tackle this issue was solved with #539, as each Flowline got an individual mu*.

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:
intersect_downstream_lines finds tributary glaciers to a main glacier by intersecting downstream lines. This will separate true tributaries from ones flowing into other valleys.
merge_tributary_flowlines will merge the model_flowlines of the tributary glaciers with the ones of the main glacier. The result is one glacier containing all tributary flowlines.

One necessary addition in the process was to add a Centerline.climatefile attribute. This allows to use a different climate file for each individual flowline, as tributary glaciers might likely use a different climate reference file than the main glacier one.

This PR is still work in progress. I at least want to add a more automatic selection of possible tributary glaciers. And tests are missing as well of course. 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.
Note how the upper part of the glaciers are identical in depth and width, but the lower part of the merged glacier is thicker, wider and further advanced as there is now more mass contributing to it.

individual_hef

merged_hef

Copy link
Member

@fmaussion fmaussion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some small comments, but overall I think its very good!

I need to check with you about the climate part though, I'm not sure I got it yet


def intersect_downstream_lines(gdir, candidates):
"""Find tributary glaciers to a main glacier by intersecting their
downstream lines
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! On the long run I wonder if we can be more ambitious but for now this looks like quite sensible design to me

oggm/core/centerlines.py Outdated Show resolved Hide resolved
oggm/core/flowline.py Outdated Show resolved Hide resolved
mfls.sort(key=lambda x: x.order, reverse=False)

# Write the data
main.write_pickle(mfls, 'model_flowlines')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here again: for now this is a good solution, but long term I would not recommend to overwrite the main gdir. On the long term we might do something like finding the candidates to merge than recreate a gdir from scratch with a larger map, or copy the original gdir or something

oggm/core/massbalance.py Outdated Show resolved Hide resolved
@pep8speaks
Copy link

Hello @matthiasdusch! Thanks for updating the PR.

@matthiasdusch
Copy link
Member Author

Thanks for the comments. I updated the docstrings and added some goals to this PR.

@fmaussion
Copy link
Member

@matthiasdusch FYI I'd really like to have this in before the v1.1 release - even as a prototype. Do you think it's manageable?

I'm very keen on this because of Hintereisferner mostly, which looks MUCH better with proper divides ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants