We urgently need to adapt the current cirrus mask, which is using elevation. Currently this is cutting all cirrus masks above 2000m, which is not the best solution. I found a solution based on the approach by Baeten et al.
I also realized that something got lost during the transfer to JAVA back in the days. „cw“ (Cirrus over Water) and „cl“ (Cirrus over Land), have been bound to a water difinition, like the names indicate. I have added this in the adapted code below. Without this criterion the two thresholds do not makle any sense.
Nevertheless, some water experts form GeoInfo shall take a look.
We urgently need to adapt the current cirrus mask, which is using elevation. Currently this is cutting all cirrus masks above 2000m, which is not the best solution. I found a solution based on the approach by Baeten et al.
B10 > threshold + (threshold * exp(elevation/1000))
I also realized that something got lost during the transfer to JAVA back in the days. „cw“ (Cirrus over Water) and „cl“ (Cirrus over Land), have been bound to a water difinition, like the names indicate. I have added this in the adapted code below. Without this criterion the two thresholds do not makle any sense.
Nevertheless, some water experts form GeoInfo shall take a look.
In detail that means: https://github.com/bcdev/snap-idepix/blob/master/idepix-s2msi/src/main/java/org/esa/snap/idepix/s2msi/S2IdepixOp.java cwThresh = 0.0035 (line 107) clThrsh = 0.0035 (line 119)
https://github.com/bcdev/snap-idepix/blob/master/idepix-s2msi/src/main/java/org/esa/snap/idepix/s2msi/S2IdepixAlgorithm.java Lines 96-98: public boolean isCirrus() { final boolean cw = refl[10] > cwThresh + cwThresh (elevation/1000)^2 && isB3B11Water(); final boolean cl = refl[10] > clThresh + clThresh (elevation/1000)^2 && !isB3B11Water();
CLA_THRESH = 0.001 (Line 61)
Lines 105-106: public boolean isCirrusAmbiguous() { final boolean cla = refl[10] > CLA_THRESH + CLA_THRESH * (elevation/1000)^2;
This is based on findings from January 2021. Therefore the location in code might have changed.