From 9843f6f40adca59a43d33f88cefa9211644036a1 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 22 Dec 2023 20:14:59 +0100 Subject: [PATCH] Add tests for aggregate_temporal_period --- tests/README.md | 2 +- tests/aggregate_temporal.json5 | 5 +- tests/aggregate_temporal_period.json5 | 1366 ++++++++++++++++++++++++- 3 files changed, 1369 insertions(+), 4 deletions(-) diff --git a/tests/README.md b/tests/README.md index 5d978e48..a0632e5d 100644 --- a/tests/README.md +++ b/tests/README.md @@ -9,7 +9,7 @@ This folder contains test cases for the openEO processes. - [x] add_dimension - [ ] aggregate_spatial* - [x] aggregate_temporal -- [ ] aggregate_temporal_period* +- [x] aggregate_temporal_period - [x] all - [x] and - [x] any diff --git a/tests/aggregate_temporal.json5 b/tests/aggregate_temporal.json5 index 23939741..0b4f8a0c 100644 --- a/tests/aggregate_temporal.json5 +++ b/tests/aggregate_temporal.json5 @@ -237,7 +237,7 @@ "absolute": { "process_id": "absolute", "arguments": { - "data": { + "x": { "from_node": "mean" } }, @@ -369,6 +369,7 @@ } }, { + "level": "L3", "required": [ "sum" ], @@ -389,7 +390,7 @@ "from_parameter": "data" }, "ignore_nodata": { - "from_pataeter": "context" + "from_parameter": "context" } }, "result": true diff --git a/tests/aggregate_temporal_period.json5 b/tests/aggregate_temporal_period.json5 index dd3d0233..e58e2dd8 100644 --- a/tests/aggregate_temporal_period.json5 +++ b/tests/aggregate_temporal_period.json5 @@ -1,5 +1,1369 @@ { "id": "aggregate_temporal_period", "level": "L2", - "tests": [] + "tests": [ + { + // TooManyDimensions + "arguments": { + "data": { + "$ref": "assets/xytt-no-data.json5" + }, + "period": "day", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "throws": "TooManyDimensions" + }, + { + // DimensionNotAvailable + "required": [ + "mean" + ], + "arguments": { + "data": { + "$ref": "assets/xyb-minimal-int.json5" + }, + "period": "day", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "throws": "DimensionNotAvailable" + }, + { + // DimensionNotAvailable + "required": [ + "mean" + ], + "arguments": { + "data": { + "$ref": "assets/xyt-minimal-float.json5" + }, + "period": "day", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + }, + "dimension": "time" + }, + "throws": "DimensionNotAvailable" + }, + { + // hour + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-06-01T00:00:00Z", + "2020-06-01T00:59:59Z", + "2020-06-01T01:00:00Z", + "2020-06-01T01:30:00Z", + "2020-06-01T04:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "hour", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-06-01-00", + "2020-06-02-00", + "2020-06-03-00", + "2020-06-04-00" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // day + multiple processes + "required": [ + "mean", + "absolute" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-06-01T00:00:00Z", + "2020-06-01T12:00:59Z", + "2020-06-02T00:00:00Z", + "2020-06-02T12:00:00Z", + "2020-06-04T00:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "day", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + } + }, + "abs": { + "process_id": "absolute", + "arguments": { + "x": { + "from_node": "mean" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-06-01-00", + "2020-06-02-00", + "2020-06-03-00", + "2020-06-04-00" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [23.075, 31.375, 47.81, 36.125], + [8.475, 27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, 17.725] + ], + [ + [29.195, 36.07, 70.445, 0.88], + [29.185, 74.1, 19.14, 16.61], + [41.17, 42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [12.23, 61.46, 2.38, 84.76], + [28.36, 48.45, 65.85, 65.90], + [29.50, 45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // week + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2022-12-06T12:00:00Z", + "2022-12-07T12:00:00Z", + "2022-12-12T00:00:00Z", + "2022-12-18T23:59:59Z", + "2023-01-01T12:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "week", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2022-49", + "2022-50", + "2022-51", + "2022-52" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // dekad + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2024-01-28T00:00:00Z", + "2024-01-31T00:00:00Z", + "2024-02-01T00:00:00Z", + "2024-02-10T00:00:00Z", + "2024-02-29T00:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "dekad", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2024-03", + "2024-04", + "2024-05", + "2024-06" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // month + different dimension name auto-detected + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t2", "y", "x"], + "dimensions": { + "t2": { + "type": "temporal", + "values": [ + "2024-01-28T00:00:00Z", + "2024-01-31T00:00:00Z", + "2024-02-01T00:00:00Z", + "2024-02-10T00:00:00Z", + "2024-04-15T00:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "month", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t2", "y", "x"], + "dimensions": { + "t2": { + "type": "temporal", + "values": [ + "2024-01", + "2024-02", + "2024-03", + "2024-04" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // season + dimension = t2 + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t2", "y", "x"], + "dimensions": { + "t2": { + "type": "temporal", + "values": [ + "2023-12-28T00:00:00Z", + "2024-02-29T00:00:00Z", + "2024-03-01T00:00:00Z", + "2024-04-10T00:00:00Z", + "2024-11-31T00:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "season", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + }, + "dimension": "t2" + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2023-djf", + "2024-mam", + "2024-jja", + "2024-son" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // tropical-season + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t2", "y", "x"], + "dimensions": { + "t2": { + "type": "temporal", + "values": [ + "2023-11-01T00:00:00Z", + "2024-04-30T00:00:00Z", + "2024-05-01T00:00:00Z", + "2024-10-10T00:00:00Z", + "2024-11-31T00:00:00Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "tropical-season", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + }, + "dimension": "t2" + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2023-ndjfma", + "2024-mjjaso", + "2024-ndjfma" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // year + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-01-01T00:00:00Z", + "2020-06-01T00:00:00Z", + "2022-01-01T00:00:00Z", + "2022-12-31T00:00:00Z", + "2023-06-28T12:55:12Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + }, + "period": "year", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020", + "2021", + "2022", + "2023" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ], + [ + [-12.23, 61.46, 2.38, -84.76], + [ 28.36, 48.45, -65.85, 65.90], + [ 29.50, -45.82, 78.05, 58.27] + ] + ] + } + } + }, + { + // decade + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-01-01T00:00:00Z", + "2029-12-31T23:48:59Z", + "2030-01-01T00:00:00Z", + "2039-12-31T23:59:59Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ] + ] + }, + "period": "decade", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020", + "2030" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ] + ] + } + } + }, + { + // decade-ad + "required": [ + "mean" + ], + "arguments": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2020-01-01T00:00:00Z", + "2021-01-01T00:00:00Z", + "2030-12-31T23:48:59Z", + "2041-01-01T00:00:00Z", + "2050-12-31T23:59:59Z" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [17.5, 53.75, -27.1, -64.25], + [-18.0, 8.45, -3.11, -20.5], + [50.4, 49.24, 25.16, -81.6] + ], + [ + [-63.65, 9.0, -68.52, -8.0], + [1.05, -63.8, 73.05, 51.05], + [47.86, -21.30, NaN, 46.15] + ], + [ + [-13.40, 36.07, 43.88, 74.72], + [79.92, 74.10, 98.28, -23.62], + [-70.40, -30.03, 1.26, 5.28] + ], + [ + [71.79, NaN, 97.01, -76.48], + [-21.55, NaN, -60.00, 56.84], + [-11.94, -54.23, NaN, 73.26] + ] + ] + }, + "period": "decade-ad", + "reducer": { + "process_graph": { + "mean": { + "process_id": "mean", + "arguments": { + "data": { + "from_parameter": "data" + } + }, + "result": true + } + } + } + }, + "returns": { + "data": { + "type": "datacube", + "nodata": NaN, + "order": ["t", "y", "x"], + "dimensions": { + "t": { + "type": "temporal", + "values": [ + "2011", + "2021", + "2031", + "2041" + ] + }, + "y": { + "type": "spatial", + "axis": "y", + "values": [5757495.0, 5757485.0, 5757475.0], + "reference_system": "EPSG:25832" + }, + "x": { + "type": "spatial", + "axis": "x", + "values": [404835.0, 404845.0, 404855.0, 404865.0], + "reference_system": "EPSG:25832" + } + }, + "data": [ + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [-23.075, 31.375, -47.81, -36.125], + [-8.475, -27.675, 34.97, 15.275], + [49.13, 13.97, 25.16, -17.725] + ], + [ + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN], + [NaN, NaN, NaN, NaN] + ], + [ + [29.195, 36.07, 70.445, -0.88], + [29.185, 74.1, 19.14, 16.61], + [-41.17, -42.13, 1.26, 39.27] + ] + ] + } + } + } + ] }