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