Skip to content

0.9.4

Choose a tag to compare

@Praddy-GByte Praddy-GByte released this 03 Nov 21:37
· 3 commits to main since this release

cPermanent snow and ice, and where it sits

For a Himalayan, Andean or Alpine catchment this is usually the first question asked and the last one answered. Both layers it needs were already being fetched: ESA WorldCover carries a snow-and-ice class, and the elevation model is in hand for the terrain products. Nothing had put the two together.

Basin.snow_ice() reports the share of the basin under permanent snow and ice, measured by area rather than by counting cells — a cell is 12.3 km2 at the equator and 2.2 km2 at 80 degrees north, and glaciers live at the second latitude — together with the elevation band the ice occupies and how much of the basin lies in it. No new dataset, no account, nothing downloaded that a run was not already downloading.

The first version read the bottom of the ice zone as the minimum elevation of the mapped ice, and the Trishuli said that was wrong. The lowest cell sits at 1,458 m, which is not a Himalayan terminus; 33 cells out of 140,415 — two hundredths of one per cent — lie below 2,000 m, and the lowest of them sits at the basin's own lowest point, at the outlet. The wrong floor also made the share of the basin above it 100 per cent, which says nothing about anything. The floor is now the first percentile: 4,414 m on the same basin, with 67.2 per cent of the catchment above it. The lowest mapped cell is still reported and named as probable misclassification rather than quietly dropped. A statistic one bad cell can destroy is not a statistic, and a caveat in the documentation is not a substitute for not reporting it.

The ice is also crossed against elevation, aspect and slope, which the elevation model already in hand pays for. The elevation split is a snowline read off the map rather than assumed: on the Trishuli it runs from 0.9 per cent of the 4,000 to 4,500 m band to 96.8 per cent above 7,000 m. The aspect split states which way it leans, and where it leans towards the sunlit slopes rather than away from them it says so and names the first suspect — the land-cover map rather than the glaciology, because shaded slopes are the ones a classifier loses. Settling that needs a glacier inventory this does not have. Writing those found a fault of their own: ice whose maximum landed exactly on a band boundary fell outside every band, and the breakdown accounted for 90 per cent of the ice while reporting shares that summed to 90.

Said on every path, because it is the misreading waiting to happen: an ice fraction is not a meltwater fraction. A basin 7 per cent covered by ice does not deliver 7 per cent of its flow from melt. That depends on mass balance and on how much of the ice is in the ablation zone in a given year, none of which is measured here. Outside the 60S to 82.75N that ESA WorldCover covers, the answer says the map has no opinion rather than reporting zero per cent — which is what no data would otherwise be mistaken for, in precisely the basins that have the ice.

Given a BasinATLAS row the answer gains glacier, snow-cover and permafrost extent over the whole upstream area. Those columns are found by prefix rather than by name, and are reported beside the land-cover measurement rather than averaged into it: permanent ice in one mapped year is not mean annual snow cover. Nothing requires the row, because BasinATLAS is a 2.7 GB download and the land-cover map was being fetched anyway.

In QGIS it is the Snow and ice algorithm, which also writes the ice mask as a raster — a number is what a report needs, a layer is what anyone looking at a glacier actually wants.

AGPL-3.0-or-later for the package

Apache-2.0 let anyone take basinkit, close it and sell it — as a product or, more realistically for a delineation engine, as a web service — without giving anything back and without anyone being able to check what that service was actually doing. For software whose whole claim is that you can open it and verify the number, that last part is the contradiction.

The Python package is now AGPL-3.0-or-later. Using it, changing it and publishing with it are unaffected. Distributing a modified version, or letting other people use one over a network, now means those people get the source of that version on the same terms.

Three things deliberately did not change. The QGIS plugin stays GPL-3.0-or-later, which is what the plugin repository requires and what it already was. The ArcGIS Pro toolbox stays Apache-2.0: it is a separate program that runs the package in an interpreter of its own and reads back the files it writes. And every release already published keeps the licence it was published under — MIT through 0.8.4, Apache-2.0 for 0.9.0 to 0.9.3. A licence cannot be withdrawn from a version that is already out, and this does not attempt to.

Verified end to end on the Trishuli at Syabrubesi, 3,198 km2, and on the full test suite: 374 passed.