Hi @sulova.andrea. Here is an example on how to use the cloud coverage as an additional property for filtering the data. (I’m filtering out the 15th of February, when the city of Bolzano was covered by clouds).
This example works with pre-processed L2A data. So, if you can work directly with that instead of re applying the atmospheric correction this would be enough.
import openeo
from openeo.processes import between, eq, lte
openeoHost = "https://openeo.cloud"
conn = openeo.connect(openeoHost).authenticate_oidc("egi")
im = conn.load_collection(
"SENTINEL2_L2A_SENTINELHUB",
spatial_extent={'west': 11.304588, 'east': 11.377716, 'south': 46.465311, 'north': 46.516839},
temporal_extent=["2022-02-14", "2022-02-18"],
properties={
"eo:cloud_cover": lambda x: lte(x, 50)
})
im_nc = im.save_result(format='netCDF')
job = conn.create_job(im_nc,title="CLOUD_FILTER_TEST_BOZEN2")
job_id = job.job_id
if job_id:
print("Batch job created with id: ",job_id)
job.start_job()
else:
print("Error! Job ID is None")