Temporal aggregation by season not working

Hi Guys,

I want to perform temporal aggregation using openEO from R. Monthly aggregation works just perfectly but not season? I really don’t understand why. Here below a reproducible exemple of my issue

Best

Adrien

temporal aggragation with openEO

library(openeo)
rm(list = ls())

library(help=“openeo”)

connect(host=“https://openeo.vito.be/”)

assign the graph-building helper object to “p” for easy access to all openEO processes, see > ?processes()

p ← processes()
login()

process_viewer(list_processes())

collection_viewer(list_collections())

create variables for loading collection

AOI ← list(west = 5.6131,
south = 50.43213,
east = 6.255395,
north = 50.67681)

time_period ← c(“2015-01-01”, “2022-08-01”)

collections_dispo ← list_collections()

load first datacube

datacube_LAI ← p$load_collection(
id = collections_dispo$TERRASCOPE_S2_LAI_V2,
spatial_extent = AOI,
temporal_extent = time_period,
bands=c(“LAI_10M”))

temporal aggreg

datacube_LAI_season ← p$aggregate_temporal_period(datacube_LAI,reducer = function(data, context) { p$mean(data) }, period = “season”)
datacube_LAI_month ← p$aggregate_temporal_period(datacube_LAI,reducer = function(data, context) { p$mean(data) }, period = “month”)

format outputs and run on backend

formats ← list_file_formats()
res1 ← p$save_result(data = datacube_LAI_season, format = formats$output$netCDF)
job_season ← create_job(graph = res1, title = “LAI_Vesdre_season”)
start_job(job_season) # this is not working
res2 ← p$save_result(data = datacube_LAI_month, format = formats$output$netCDF)
job_month ← create_job(graph = res2, title = “LAI_Vesdre_month”)
start_job(job_month) # this one is working fine

Hey,

thanks for your post. @stefaan.lippens This doesn’t look like a client issue, is season supported by VITO?

Best,
Matthias

PS: I tried to edit the post to put the code into a code block, but I’m hit by the slow mode again. :frowning:

Same for me (about slow mode).

You cannot edit but you can reply :confused:

season is indeed not supported currently on VITO backend openeo-python-driver/ProcessGraphDeserializer.py at 5ebd754c8322f02e60a06b291f8fbc0bb3b63088 · Open-EO/openeo-python-driver · GitHub

It should be straightforward to add however

I added support for “season” and “tropical-season” in "season" support in aggregate_temporal_period · Issue #135 · Open-EO/openeo-python-driver · GitHub

this will become available in production VITO backend somewhere next week probably

Thanks !

How to check which parameters values are available on the backend?
Because for the case of the period parameter, “season” was actually in the process description when I checked the process list for the Vito backend on the hub…

Just to get better: the error message was super generic. How to debug and find this by myself (without having to ask you guys :sunglasses:)?

Indeed, in this case, the VITO back-end metadata wrongly claims to support it. Strictly speaking this is a bug in the VITO back-end.

What error did you get? You should have gotten something like
No support for a period of type: season
(comes from here: https://github.com/Open-EO/openeo-python-driver/blob/62b08e3bc4c237bbf5a4597a76aee806193df9be/openeo_driver/ProcessGraphDeserializer.py#L993-L994)

I was looking at the wrong place. Thanks for the follow up!!!