easysnowdata.processing.snow.repair_fill_values#

easysnowdata.processing.snow.repair_fill_values(da: DataArray, *, last_class: int = 3, fill: int = 255) DataArray[source]#

Put the upstream 256/265 fill values back to 255 and return uint8.

The published rasters use nodata 256 (and 265 in places), which does not fit in a byte, so GDAL widens the whole array to uint32. Everything above last_class is fill, so it is rewritten to fill.