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

Small slopes filtering now happens at the flowline determination #232

Merged
merged 4 commits into from
May 12, 2017

Conversation

fmaussion
Copy link
Member

This relatively small change in the code involves quite a bit of change in how the inversion and the numerical model are going to handle unrealistic flowlines in the future. The consequences of this change need to be tested on other glaciers than HEF, but here is the deal: slopes smaller than cfg.PARAMS['min_slope'] are simply not allowed anymore at the moment the flowlines are created (initialize_flowlines task).

When the threshold is reached, the non-valid areas are expanded until the slope is valid again using a fill-void algorithm. Two cases are possible:

  • the voids can be filled. In that case the algorithm will simply interpolate between the two valid points. Example with paint:
    paint
  • the problem happens at the very beginning (e.g. HEF if you omit the divides). In that case the flowline is cut so that you have a valid slope.

Before:

test_nodivide

After:

test_nodivide_corrected

I expect this change to increase the numerical stability of the model, and automatically avoid completely unrealistic flowlines. It will need some thorough testing on more glaciers to see if it works as expected.

@fmaussion
Copy link
Member Author

I added a control parameter to revert to the previous behavior if needed (cfg.PARAMS['filter_min_slope'], which is True per default. Set to False to get back to previous)

@fmaussion fmaussion merged commit 1c0f9a3 into OGGM:master May 12, 2017
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.

1 participant