fmemuir/COASTGUARD

QA 60 Band Issue in Sentinel-2 images

IdhamN opened this issue · 3 comments

Hi Freya,

I encountered a problem when I attempted to extract the vegetation edge in year 2024 using Sentinel-2 images. I received the error message "Image does not contain the band QA60". However, when I change the date to 2023, it works as expected.

QA 60 band issue

Thanks for raising this @IdhamN, will investigate with some test ee.Image Sentinel-2 objects for 2024!

After some research, the only relevant issue I can see is here: https://issuetracker.google.com/issues/324827389?pli=1
Basically the newest Sentinel-2 images have changed the QA band names, so they are no longer QA10, QA20 and QA60 but MSK_CLASSI_OPAQUE, MSK_CLASSI_CIRRUS and MSK_CLASSI_SNOW_ICE. The Sentinel-2 documentation doesn't list QA bands either, but 'Scene classification', 'Cloud probability' and 'Snow probability' (https://documentation.dataspace.copernicus.eu/Data/SentinelMissions/Sentinel2.html#sentinel-2-level-1c-top-of-atmosphere-toa).

I'll add a try/except to use MSK_CLASSI_OPAQUE if QA60 isn't available, as opaque clouds are what we care about masking. However, I'll do some more digging to make sure this is the correct cloud mask band to use from now on, or if this is a temporary band for only some new images.

I've now added a bug report to the GEE issue tracker for this (https://issuetracker.google.com/issues/351040913), and the condition I added for using the old vs. new band names (in 938523e) will have to suffice for now.