Hi everybody,
I am new to the openEO platform and and I’m trying to handle the data from Sentinel-5.
In particular (see attached code), I’m getting the data in a specific time window ([“2022-01-01T00:00:00Z”, “2022-01-12T00:00:00Z”]) for a specific gas (CO), and I’d like to perform a time average of CO values every N days (here I put 3 as an example).
To do so, I’ve selected the first 3 days (datacube_CO_1 = datacube_CO.filter_temporal(“2022-01-01”, “2022-01-04”)) and I was trying to (time) average those values, pixel by pixel, using the commands:
datacube_CO_1_mean = datacube_CO.process(“mean”, data=datacube_CO_1)
datacube_CO_1_mean.execute()
But that part of the code doesn’t seem to work.
Also, my aim would be to save the results as a GeoTiff image, and also as a CSV file, containing, for each pixel, the averaged value (over the time window) of each pixel.
So my issues regard the portion of the code that should perform the time average and the commands for saving the results (as I am not sure if they are correct).
Thanks everybody in advance for any help
import openeo
from openeo.processes import process
connection = openeo.connect("openeo.dataspace.copernicus.eu")
connection.authenticate_oidc_device()
datacube_CO = connection.load_collection("SENTINEL_5P_L2",
spatial_extent={"west": 9.077297902737973, "east": 9.305281982978242, "south": 45.40604831451452, "north": 45.53233801222407},
temporal_extent=["2022-01-01T00:00:00Z", "2022-01-12T00:00:00Z"],
bands=["CO"])
datacube_CO_1 = datacube_CO.filter_temporal("2022-01-01", "2022-01-04")
datacube_CO_1_mean = datacube_CO.process("mean", data=datacube_CO_1)
datacube_CO_1_mean.execute()
job=datacube_CO_1_mean.execute_batch(out_format="GTiff",title="C")
job.get_results().download_files()