OGGM / oggm

Open Global Glacier Model
http://oggm.org
BSD 3-Clause "New" or "Revised" License
218 stars 105 forks source link

Glacier length and area calculation #326

Open juliaeis opened 6 years ago

juliaeis commented 6 years ago

Hey, in the following case the glacier length is not calculated correctly: glacier_length_bug OGGM only counts the number of pixels with ice thickness > 0, but this does not work here. One solution would be to calculate a minimum and a maximum length, so that at least it is known that the glacier length is in between. If they are both the same, we could let it as it is now. How should we deal with this problem?

fmaussion commented 6 years ago

Thanks for the report!

Indeed this is someone I dealt with before, and in particular I wasn't happy with the "max length" solution because of these cases...

The situation is more complicated than it sounds, because programmatically everything is easy to do, right? The problem starts when one asks the question "what is a glacier?" ;-)

The situation like the one you show above happens when there are tributaries, right? Here I wonder if the solution wouldn't be to define "length" as "the longest mass of ice without interruption accross all tributaries", but again I could see examples where this might not be the best solution...

In all cases I would favour a solution which is robust: the length is very sensitive to interannual variability (some cold years can bring annual snow far below the tongue, leading in spikes of the glacier length).

juliaeis commented 6 years ago

Hey, I came up with this problem while the optimization for the initial state search of the glacier. Sometimes it creates some bizarre shapes and the glacier starts growing in the upper flowline - which is in my case not correct. But as I minimize the glacier length between the simulation and the "observation" I need to change this somehow. Programmatically it should not be a problem. But if it is to complicated (because we are not sure how to deal with), I can also calculate the minimum length myself and only minimize this one. But I think this problem will also occurs in other cases ...

fmaussion commented 6 years ago

I am not opposed to new ideas on how to compute the length. It could be added as a new attribute to the model flowlines, and if necessary as new diagnostic variable of the model output.