Open-EO / openeo-geopyspark-driver

OpenEO driver for GeoPySpark (Geotrellis)
Apache License 2.0
26 stars 4 forks source link

sentinel3: add solar angles to LST #696

Closed jdries closed 5 months ago

jdries commented 7 months ago

Solar angles can be used to determine night from day. This matters quite a bit for creating decent temperature composites. These angles are provided in a lower resolution, so needs some work to correctly read and combine with other bands.

bossie commented 6 months ago

@jdries This concerns these datasets right?

NETCDF:"geometry_tn.nc":solar_azimuth_tn NETCDF:"geometry_tn.nc":solar_zenith_tn

jdries commented 6 months ago

Yes!

jdries commented 6 months ago

@bossie I think you are right about the non-square pixels, extract from data format spec:

The resolution of this grid is 1 km on alongtrack direction and 16 km on across-track one

https://sentinels.copernicus.eu/documents/247904/1872792/Sentinel-3-SLSTR-Product-Data-Format-Specification-Level-2-Land.pdf/e587c02b-1454-46ff-b74e-bfc91943ae78?t=1637223909444

This would mean that you need to upsample the angles with a factor 16 along the x-axis, which would then immediately give you the output resolution?

bossie commented 6 months ago

Status update: ongoing, should be a gradient but looks like a rug.

solar_azimuth_tn_rug

I noticed that these angle bands are treated differently in the original code by Bart O. so I'm adding that part to our code too.

bossie commented 6 months ago

Getting somewhere: proper gradient with values that match input.

solar_azimuth_correct

bossie commented 6 months ago

All bands including solar_azimuth_tn and solar_zenith_tn: test_SENTINEL3_SLSTR_L2_LST_all.tif.txt

jdries commented 6 months ago

Nice!

bossie commented 5 months ago

Seems to work, needs collection test to make sure I didn't break anything. Can use some cleaning up as well.

bossie commented 5 months ago

Added kube_resources.applications.integrationtests.tests.test_collections.test_compare_SENTINEL3_SLSTR_L2_LST to test for regressions wrt/ current bands.