Hey there,
We are trying to process the SENTINEL2_L2A_SENTINELHUB collection, where a temporal extent is a full month and a spatial extent is almost the size of the 18NXL tile. Then, we’ve tried to download data but we’ve obtained only 6 scenes. We are sure there are more scenes. Could you explain us why we gained only a few scenes?
This is an example of the script:
start_date = '2022-01-01'
end_date = '2022-01-31'
bands = ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09', 'B11', 'B12', 'CLP', 'SCL' , 'sunAzimuthAngles', 'sunZenithAngles']
collection = 'SENTINEL2_L2A_SENTINELHUB'
# 18NXL
spatial_extent = {'west': -74.09868206699997 , 'east': -73.106493944999954, 'south': 4.432483427000022, 'north': 5.425259437000022}
S2_cube = connection.load_collection(collection,
spatial_extent = spatial_extent,
temporal_extent = [start_date, end_date],
bands = bands)
# SCL Sen2Cor mask
scl = S2_cube.band("SCL")
mask = (scl == 3) | (scl == 8) | (scl == 9) | (scl == 10) |(scl == 11)
S2_cube_scl = S2_cube.mask(mask)
# CLP (cloud probabilities) based on s2cloudless
clp = S2_cube.band("CLP")
clp = clp.resample_spatial(resolution=20, method = "bicubic")
mask = (clp / 255) > 0.3 # 160m resolution s2cloudless so it does not have to use
S2_cube = S2_cube_scl.mask(mask)
# Send cube to server
S2_cube = S2_cube.save_result(format='GTiff') #GTiff #netCDF
my_job = S2_cube.send_job(title="S2_L2A_220115")
results = my_job.start_and_wait().get_results()
We can see from the log (1:33:04 Job ‘vito-81464076-ddc2-405f-80a2-35ebe35a9ad4’: finished (progress N/A), that processing was finished but when we wanted to download data using results.download_files("S2_L2A")
We’ve obtained the S2 scenes only from half of a month.
[WindowsPath('S2_L2A/openEO_2022-01-03Z.tif'),
WindowsPath('S2_L2A/openEO_2022-01-05Z.tif'),
WindowsPath('S2_L2A/openEO_2022-01-08Z.tif'),
WindowsPath('S2_L2A/openEO_2022-01-10Z.tif'),
WindowsPath('S2_L2A/openEO_2022-01-13Z.tif'),
WindowsPath('S2_L2A/openEO_2022-01-15Z.tif'),
WindowsPath('S2_L2A/job-results.json')]