computing percentiles does not exclude nan values
To me, it looks like that the NaN
Pixels are counted as being below the median. My expectation would be that 50% of Pixels disappear by using the median threshold;-). Please check for other pecentile implementation as well elbe_show_ds.nc