Open-EO / openeo-geotrellis-extensions

Java/Scala extensions for Geotrellis, for use with OpenEO GeoPySpark backend.
Apache License 2.0
5 stars 3 forks source link

Out of memory after resampling AGERA5 #265

Closed EmileSonneveld closed 3 months ago

EmileSonneveld commented 4 months ago

Doing a resample_spatial from low to high resolution can gives OOM errors here.

Task that shows OOM: https://epod204.vgt.vito.be:8042/node/containerlogs/container_e5123_1707931224191_16000_01_000025/emile.sonneveld/stdout?start=-4096 j-240220be46af48c78e55462095630792 (link might expire) Task without resample that does not OOM: j-240220ab5f1644108c9ac35d1108fe47

connection = openeo.connect("https://openeo.cloud").authenticate_oidc()
ERA5_dc = connection.load_collection(
    "AGERA5",
    temporal_extent=["2015-01-01", "2023-07-01"],
    spatial_extent={"west": 10, "south": -40, "east": 40, "north": -20, },
    bands=["precipitation-flux"],
)

previous_month_UDF_code = """
from openeo.udf import XarrayDataCube

def apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:
    array = cube.get_array()
    array.shift(t=1)  # Probably uses NaN as filler value
    return XarrayDataCube(array)
"""
ERA5_shift_dc = ERA5_dc.apply_dimension(
    dimension="t", code=previous_month_UDF_code, runtime="Python"
)

resolution = 0.00297619047619  # 300m in degrees
ERA5_shift_dc = ERA5_shift_dc.resample_spatial(resolution=resolution, projection=4326)  # comment out to avoid OOM 

custom_execute_batch(ERA5_shift_dc, heavy_job_options)

Potential workaround:

ERA5_dc._pg.arguments['featureflags'] = {"tilesize": 1}  # very small size
EmileSonneveld commented 4 months ago

The tilesize workaround comes from: https://jira.vito.be/projects/EP/issues/EP-3738

EmileSonneveld commented 4 months ago

The tilesize workaround seems to be hanging too: tilesize 16: j-2402207d2dde4cfab9209d3f76815bde tilesize 1: j-2402206838d141e2a1193635ce461873

jdries commented 4 months ago

Ok, we'll want to look at the partitioner then. Can you indicate priority/urgency, to properly schedule?


From: Emile @.> Sent: Wednesday, February 21, 2024 9:15 AM To: Open-EO/openeo-geotrellis-extensions @.> Cc: Subscribed @.***> Subject: Re: [Open-EO/openeo-geotrellis-extensions] Out of memory after resampling AGERA5 (Issue #265)

The tilesize workaround seems to be hanging too: tilesize 16: j-2402207d2dde4cfab9209d3f76815bde tilesize 1: j-2402206838d141e2a1193635ce461873

— Reply to this email directly, view it on GitHubhttps://github.com/Open-EO/openeo-geotrellis-extensions/issues/265#issuecomment-1956103270, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABNJPSFULK5GNTNP7PIFM7DYUWUI7AVCNFSM6AAAAABDRHPYKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGEYDGMRXGA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

VITO Disclaimer: http://www.vito.be/e-maildisclaimer

EmileSonneveld commented 4 months ago

Finding a workaround in the following days would be nice. As we want to soon pass it to the integrators.

After the resampling, the size should be around 10'000x6'000px, compressed that is around 35Mb per timestamp

jdries commented 4 months ago

@EmileSonneveld I will still be stuck for today, so pointing out where something needs to change if you want to give it a try: https://github.com/Open-EO/openeo-geotrellis-extensions/blob/e2496005325faf5afc01f510aa9480cb0046156c/openeo-geotrellis/src/main/scala/org/openeo/geotrellis/OpenEOProcesses.scala#L734

Now the question will be which partitioner you'll want to configure to fix it. To answer that, it would be good to know which partititoner is actually configured when it enters resample_cube_spatial. You could consider adding logging for that, or use a test with a similar graph.

For target partitioner, a 'regular' spacetime partitioner would probably work. (Anything that would break up the larger partitions into smaller ones, as the final partitioner is anyway determined by the target datacube.)

jdries commented 4 months ago

Relevant logging:

Cube partitioner index: SparseSpaceTimePartitioner 3007776 false
Created cube for  with metadata TileLayerMetadata(uint16ud65535,LayoutDefinition(Extent(9.949999999999989, -40.14999999999999, 40.14999999999999, -19.94999999999999),CellSize(0.1,0.10000000000000002),302x202 tiles,302x202 pixels),Extent(10.0, -40.0, 40.0, -20.0),EPSG:4326,KeyBounds(SpaceTimeKey(0,0,1420070400000),SpaceTimeKey(300,200,1688083200000))) and partitioner Some(SpacePartitioner(KeyBounds(SpaceTimeKey(0,0,1420070400000),SpaceTimeKey(300,200,1688083200000))))
apply_neighborhood created datacube Metadata(bounds=Bounds(minKey=SpaceTimeKey(col=0, row=0, instant=datetime.datetime(2015, 1, 1, 0, 0)), maxKey=SpaceTimeKey(col=300, row=200, instant=datetime.datetime(2023, 6, 30, 0, 0)))cellType=float32noDataValue=nancrs=+proj=longlat +datum=WGS84 +no_defs extent=Extent(xmin=10.0, ymin=-40.0, xmax=40.0, ymax=-20.0)tileLayout=TileLayout(layoutCols=302, layoutRows=202, tileCols=1, tileRows=1)layoutDefinition=LayoutDefinition(extent=Extent(xmin=9.949999999999989, ymin=-40.14999999999999, xmax=40.14999999999999, ymax=-19.94999999999999), tileLayout=TileLayout(layoutCols=302, layoutRows=202, tileCols=1, tileRows=1))
jdries commented 4 months ago

@EmileSonneveld the job with tilesize 1 is no longer available in spark history because it keeps a limited number of applications. You really want to open spark ui and take screenshots or retrieve number of partitions to determine the effect. Also, as this is a memory issue, did you already try increasing it? That may help to determine how big your partitions get after resampling.

jdries commented 4 months ago

@EmileSonneveld the bounding box you have in there is pretty large, isn't south africa much smaller?

jdries commented 4 months ago

Initial fix has some effect, the partitioner is 'None' after applying the UDF so we need to see how to deal with that. Perhaps jep runtime can be a better option, allowing to retain a partitioner...

▸
Reprojecting datacube with partitioner None to new layout LayoutDefinition(extent=Extent(xmin=14.949999999999989, ymin=-34.14999999999999, xmax=32.15238095237819, ymax=-20.947619047621153), tileLayout=TileLayout(layoutCols=1445, layoutRows=1109, tileCols=4, tileRows=4)) and 4326
+10m 4s 165msINFO
ID: [1708679240379, 31526]
▸
Repartitioning datacube with 1419 partitions to 14190 before resample_spatial.
EmileSonneveld commented 4 months ago

The exact extent is indeed a bit smaller. I am re-launching the task with tilesize 16 and a smaller extent: spatial_extent={"west": 16.448304, "south": -46.980603, "east": 37.998802, "north": -22.12718, }

jdries commented 4 months ago

@EmileSonneveld the memory explosion is quite apparent in spark ui:

Image

This raises the question if there are ways to reduce the cube size? A common quick win is datatype conversion. I guess we also can't get rid of the daily time resolution?

EmileSonneveld commented 4 months ago

For the SPI the data is pre-aggregated to monthly, over a longer time period. But in this example there is indeed 6x the amount of dates. Original code here: https://git-ext.gmv.com/anin-external/drought-indices/-/blob/openeo/SPI/SPI_openeo.py

jdries commented 4 months ago

can you run again yourself on openeo-dev? If you have a failing example, just inspect spark ui for some details and provide process graph in this ticket. From the logs, try retrieving the lines about resampling and the partitioner that's used before resampling.

EmileSonneveld commented 4 months ago

This morning I launched the task again:j-240226bf712544d39465424b234b1a34

process graph ```json { "process_graph": { "applydimension1": { "arguments": { "data": { "from_node": "filterspatial1" }, "dimension": "t", "process": { "process_graph": { "runudf1": { "arguments": { "data": { "from_parameter": "data" }, "runtime": "Python", "udf": "import numpy as np\nimport os\nimport sys\nimport xarray as xr\nfrom openeo.udf import XarrayDataCube\n\nwheel_path = \"/data/users/Public/emile.sonneveld/python/climate_indices-1.0.13-py2.py3-none-any.whl\"\nif not os.path.exists(wheel_path):\n raise Exception(\"Path not found: \" + wheel_path)\nsys.path.append(wheel_path)\nimport climate_indices\nfrom climate_indices import indices\n\n############################## SETTING PARAMETERS for the SPI ##############################\n\nscale = 3\ndistribution = climate_indices.indices.Distribution.gamma # Fixed\ndata_start_year = 1980\ncalibration_year_initial = 1980\ncalibration_year_final = 2023\nperiodicity = climate_indices.compute.Periodicity.monthly # Fixed\n\nif calibration_year_final - calibration_year_initial <= 2:\n print(\"Gamma correction in SPI on only 2 years will give bad looking results\")\n\n\ndef spi_wrapped(values: np.ndarray):\n return indices.spi(\n values=values,\n scale=scale,\n distribution=distribution,\n data_start_year=data_start_year,\n calibration_year_initial=calibration_year_initial,\n calibration_year_final=calibration_year_final,\n periodicity=periodicity,\n )[np.newaxis].T\n\n\ndef proccessingNETCDF(data: xr.DataArray):\n \"\"\"Process the data to serve as input to de SPI function\n Args:\n data: netcdf file\n\n Returns\n DataArrayGroupBy grouped over point (y and x coordinates)\n \"\"\"\n num_days_month = data.t.dt.days_in_month\n # num_days_month = 30.4 # Average number of days in a month\n\n # Rescaling values no longer needed\n data_precip = data\n data_precip *= 1000 * num_days_month\n data_precip = data_precip.squeeze()\n\n # Giving the appropriate shape to da data\n data_grouped = data_precip.stack(point=(\"y\", \"x\")).groupby(\"point\")\n print(\"\"\"Data is prepared to serve as input for the SPI index.\"\"\")\n\n return data_grouped\n\n\ndef apply_datacube(cube: XarrayDataCube, context: dict) -> XarrayDataCube:\n array = cube.get_array()\n\n data_grouped = proccessingNETCDF(array)\n spi_results = xr.apply_ufunc(\n spi_wrapped,\n data_grouped,\n # input_core_dims=[[\"t\"]],\n # output_core_dims=[[\"t\"]],\n )\n\n BAND_NAME = \"SPI\"\n spi_results = spi_results.expand_dims(dim=\"bands\", axis=0).assign_coords(bands=[BAND_NAME])\n spi_results = spi_results.unstack(\"point\")\n spi_results = spi_results.rename({\"y\": \"lat\", \"x\": \"lon\"}) # Necessary step\n spi_results = spi_results.reindex(lat=list(reversed(spi_results[\"lat\"])))\n spi_results = spi_results.rename({\"lat\": \"y\", \"lon\": \"x\"})\n # No need to specify crs here\n return XarrayDataCube(spi_results)\n\n\nif __name__ == \"__main__\":\n print(\"Running test code!\")\n import datetime\n import rioxarray as rxr\n\n now = datetime.datetime.now()\n\n dataset = rxr.open_rasterio(\"/home/emile/openeo/drought-indices/SPI/out-2024-02-20_19_10_33.970882/openEO.nc\")\n if dataset.dims == (\"variable\", \"band\", \"y\", \"x\"):\n array = dataset.swap_dims({\"variable\": \"bands\", \"band\": \"t\"})\n elif dataset.dims == (\"band\", \"y\", \"x\"):\n array = dataset.swap_dims({\"band\": \"t\"})\n else:\n array = dataset.swap_dims({\"variable\": \"bands\"})\n\n array = array.astype(np.float32)\n\n ret = apply_datacube(XarrayDataCube(array), dict())\n arr = ret.array\n data_crs = dataset.rio.crs\n arr.rio.write_crs(data_crs, inplace=True)\n arr = arr.squeeze() # remove unneeded dimensions\n # First timeframes are NaN, which is confusing, as it shows nothing in Q-GIS. Drop them:\n arr = arr.dropna(dim=\"t\", how=\"all\") # Might be nice to only trim beginning and end, in all dimensions\n if len(arr.dims) > 3:\n print(\"Taking only first time sample to avoid too many dimensions\")\n arr = arr.isel(t=0)\n arr.rio.to_raster(\"tmp/out-\" + str(now).replace(\":\", \"_\").replace(\" \", \"_\") + \".nc\")\n print(ret)\n" }, "process_id": "run_udf", "result": true } } } }, "process_id": "apply_dimension" }, "filterspatial1": { "arguments": { "data": { "from_node": "loaddiskdata1" }, "geometries": { "features": [ { "geometry": { "coordinates": [ [ [ 18.368339, -33.789537 ], [ 18.383074, -33.813927 ], [ 18.37059, -33.820969 ], [ 18.356581, -33.801926 ], [ 18.368339, -33.789537 ] ] ], "type": "Polygon" }, "id": "(0, 1)", "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [ [ [ 18.088265, -33.413502 ], [ 18.097336, -33.425861 ], [ 18.097979, -33.432015 ], [ 18.072042, -33.413794 ], [ 18.088265, -33.413502 ] ] ], "type": "Polygon" }, "id": "(0, 2)", "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [ [ [ 37.608116, -46.887693 ], [ 37.653402, -46.866004 ], [ 37.66797, -46.833472 ], [ 37.707649, -46.823755 ], [ 37.843038, -46.851384 ], [ 37.877052, -46.893059 ], [ 37.90686, -46.90252 ], [ 37.834594, -46.980603 ], [ 37.777746, -46.962469 ], [ 37.657027, -46.973141 ], [ 37.584804, -46.945992 ], [ 37.608116, -46.887693 ] ] ], "type": "Polygon" }, "id": "(0, 9)", "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [ [ [ 37.941216, -46.612616 ], [ 37.987267, -46.620927 ], [ 37.998802, -46.652639 ], [ 37.932142, -46.668642 ], [ 37.87311, -46.622845 ], [ 37.904255, -46.603118 ], [ 37.941216, -46.612616 ] ] ], "type": "Polygon" }, "id": "(0, 10)", "properties": {}, "type": "Feature" }, { "geometry": { "coordinates": [ [ [ 16.491778, -28.567332 ], [ 16.59964, -28.531837 ], [ 16.620323, -28.501189 ], [ 16.680648, -28.470897 ], [ 16.701282, -28.498006 ], [ 16.736228, -28.493945 ], [ 16.775666, -28.442593 ], [ 16.768496, -28.398649 ], [ 16.803776, -28.362451 ], [ 16.755156, -28.301917 ], [ 16.757368, -28.265168 ], [ 16.823012, -28.270679 ], [ 16.804002, -28.219139 ], [ 16.855392, -28.210715 ], [ 16.830403, -28.167403 ], [ 16.886882, -28.173236 ], [ 16.886911, -28.087343 ], [ 16.975769, -28.059503 ], [ 17.003017, -28.074945 ], [ 17.021117, -28.052585 ], [ 17.08281, -28.033783 ], [ 17.136779, -28.091903 ], [ 17.191253, -28.107808 ], [ 17.182702, -28.203503 ], [ 17.213611, -28.246473 ], [ 17.319584, -28.226191 ], [ 17.380098, -28.292033 ], [ 17.376302, -28.32188 ], [ 17.404779, -28.356563 ], [ 17.409672, -28.399287 ], [ 17.390475, -28.432517 ], [ 17.348136, -28.44041 ], [ 17.333614, -28.475823 ], [ 17.368357, -28.514167 ], [ 17.379054, -28.566863 ], [ 17.431552, -28.575124 ], [ 17.419962, -28.721506 ], [ 17.57104, -28.686081 ], [ 17.599675, -28.696809 ], [ 17.61782, -28.763207 ], [ 17.646985, -28.774241 ], [ 17.705752, -28.744911 ], [ 17.731219, -28.759976 ], [ 17.749049, -28.740271 ], [ 17.779401, -28.758673 ], [ 17.916977, -28.765724 ], [ 17.936589, -28.788608 ], [ 17.972464, -28.79237 ], [ 18.04678, -28.876318 ], [ 18.082649, -28.871225 ], [ 18.189452, -28.91707 ], [ 18.263813, -28.879927 ], [ 18.428151, -28.900327 ], [ 18.470459, -28.883791 ], [ 18.512196, -28.889809 ], [ 18.632638, -28.84063 ], [ 18.731026, -28.832637 ], [ 18.932322, -28.856558 ], [ 18.995328, -28.890846 ], [ 19.007598, -28.927998 ], [ 19.104479, -28.968402 ], [ 19.150158, -28.962387 ], [ 19.190869, -28.950206 ], [ 19.244129, -28.903524 ], [ 19.281294, -28.908236 ], [ 19.295831, -28.893228 ], [ 19.24234, -28.824481 ], [ 19.267262, -28.748352 ], [ 19.298472, -28.732601 ], [ 19.401396, -28.733693 ], [ 19.46579, -28.706167 ], [ 19.490851, -28.678728 ], [ 19.502298, -28.604658 ], [ 19.538805, -28.583074 ], [ 19.563833, -28.529029 ], [ 19.624355, -28.511497 ], [ 19.667926, -28.529423 ], [ 19.739317, -28.486181 ], [ 19.814783, -28.506651 ], [ 19.877707, -28.443482 ], [ 19.999574, -28.426385 ], [ 19.99948, -24.751953 ], [ 20.12333, -24.87952 ], [ 20.261444, -24.924636 ], [ 20.294645, -24.97628 ], [ 20.38092, -25.032235 ], [ 20.43543, -25.148347 ], [ 20.465793, -25.156054 ], [ 20.457302, -25.209165 ], [ 20.536683, -25.287011 ], [ 20.522429, -25.313362 ], [ 20.543669, -25.323897 ], [ 20.56561, -25.383909 ], [ 20.602914, -25.394866 ], [ 20.629401, -25.455649 ], [ 20.675184, -25.454524 ], [ 20.644864, -25.475172 ], [ 20.632692, -25.516588 ], [ 20.692272, -25.584898 ], [ 20.656465, -25.629143 ], [ 20.686659, -25.636743 ], [ 20.679861, -25.685457 ], [ 20.754992, -25.782785 ], [ 20.745076, -25.821599 ], [ 20.788485, -25.80752 ], [ 20.788238, -25.854157 ], [ 20.809171, -25.875643 ], [ 20.803277, -25.914638 ], [ 20.836187, -25.957394 ], [ 20.818529, -26.00474 ], [ 20.839438, -26.083268 ], [ 20.826788, -26.10853 ], [ 20.860914, -26.133057 ], [ 20.82143, -26.180031 ], [ 20.787061, -26.273481 ], [ 20.720644, -26.336251 ], [ 20.68932, -26.396512 ], [ 20.623263, -26.441902 ], [ 20.614541, -26.468916 ], [ 20.606575, -26.552852 ], [ 20.633809, -26.627033 ], [ 20.615969, -26.700316 ], [ 20.631201, -26.792502 ], [ 20.652887, -26.83633 ], [ 20.685873, -26.852404 ], [ 20.693304, -26.903528 ], [ 20.723412, -26.872109 ], [ 20.899891, -26.796817 ], [ 20.973811, -26.809687 ], [ 21.020234, -26.848044 ], [ 21.142901, -26.873029 ], [ 21.39894, -26.825757 ], [ 21.524787, -26.860758 ], [ 21.581343, -26.847495 ], [ 21.631189, -26.865568 ], [ 21.698377, -26.859993 ], [ 21.781239, -26.797675 ], [ 21.772992, -26.701977 ], [ 21.797873, -26.672691 ], [ 21.943662, -26.672409 ], [ 22.046571, -26.633543 ], [ 22.15949, -26.508586 ], [ 22.199886, -26.398095 ], [ 22.24328, -26.360736 ], [ 22.362538, -26.324746 ], [ 22.362758, -26.294879 ], [ 22.398536, -26.277115 ], [ 22.422197, -26.230493 ], [ 22.475669, -26.208269 ], [ 22.560595, -26.22157 ], [ 22.582159, -26.147678 ], [ 22.605769, -26.148872 ], [ 22.668316, -26.078102 ], [ 22.669632, -26.025577 ], [ 22.722943, -26.019856 ], [ 22.729108, -25.946914 ], [ 22.74851, -25.919655 ], [ 22.719947, -25.892424 ], [ 22.784172, -25.825392 ], [ 22.745214, -25.795124 ], [ 22.777774, -25.734197 ], [ 22.824657, -25.695087 ], [ 22.830032, -25.662182 ], [ 22.810034, -25.643322 ], [ 22.852289, -25.614689 ], [ 22.820717, -25.583408 ], [ 22.856512, -25.526743 ], [ 22.851639, -25.488077 ], [ 22.902063, -25.483974 ], [ 22.89181, -25.466989 ], [ 22.912813, -25.419654 ], [ 22.970639, -25.379411 ], [ 22.979982, -25.338071 ], [ 23.00881, -25.328318 ], [ 23.011613, -25.295747 ], [ 23.031869, -25.306862 ], [ 23.06052, -25.289506 ], [ 23.0561, -25.31784 ], [ 23.074597, -25.328031 ], [ 23.198648, -25.27318 ], [ 23.276688, -25.269613 ], [ 23.296424, -25.287727 ], [ 23.35572, -25.283134 ], [ 23.417584, -25.307584 ], [ 23.442316, -25.277015 ], [ 23.463165, -25.276128 ], [ 23.460465, -25.294693 ], [ 23.498746, -25.322038 ], [ 23.497746, -25.346795 ], [ 23.528584, -25.340086 ], [ 23.591097, -25.391164 ], [ 23.614311, -25.384313 ], [ 23.639754, -25.430161 ], [ 23.664646, -25.417043 ], [ 23.674685, -25.443064 ], [ 23.727797, -25.449409 ], [ 23.766404, -25.502494 ], [ 23.817595, -25.515385 ], [ 23.815004, -25.54617 ], [ 23.876773, -25.57952 ], [ 23.913626, -25.627224 ], [ 23.944072, -25.63518 ], [ 23.973122, -25.617911 ], [ 24.01014, -25.625763 ], [ 24.010985, -25.648935 ], [ 24.058553, -25.651871 ], [ 24.068893, -25.631143 ], [ 24.085845, -25.641464 ], [ 24.154812, -25.613509 ], [ 24.1619, -25.629238 ], [ 24.191654, -25.62267 ], [ 24.265175, -25.701917 ], [ 24.286786, -25.702232 ], [ 24.281695, -25.721047 ], [ 24.320825, -25.714859 ], [ 24.354814, -25.755987 ], [ 24.399821, -25.760048 ], [ 24.449068, -25.738276 ], [ 24.652497, -25.818518 ], [ 24.901988, -25.811951 ], [ 25.01406, -25.728419 ], [ 25.043753, -25.723067 ], [ 25.130377, -25.757961 ], [ 25.330511, -25.769362 ], [ 25.42367, -25.734994 ], [ 25.581897, -25.633599 ], [ 25.649141, -25.508628 ], [ 25.708772, -25.2838 ], [ 25.748147, -25.229376 ], [ 25.884893, -24.912273 ], [ 25.890737, -24.855636 ], [ 25.866212, -24.806162 ], [ 25.868767, -24.756197 ], [ 25.937363, -24.720781 ], [ 26.024437, -24.718757 ], [ 26.420826, -24.634771 ], [ 26.474813, -24.587625 ], [ 26.518838, -24.488568 ], [ 26.596214, -24.408899 ], [ 26.668535, -24.389051 ], [ 26.679365, -24.348283 ], [ 26.713035, -24.318537 ], [ 26.786808, -24.304471 ], [ 26.865233, -24.259184 ], [ 26.883142, -24.158332 ], [ 26.870554, -24.103769 ], [ 26.916839, -24.018909 ], [ 26.953971, -23.877355 ], [ 26.939166, -23.854248 ], [ 26.958776, -23.834775 ], [ 26.968009, -23.733808 ], [ 27.00057, -23.689376 ], [ 27.008582, -23.645318 ], [ 27.036896, -23.663331 ], [ 27.03508, -23.682225 ], [ 27.063962, -23.672093 ], [ 27.082037, -23.649968 ], [ 27.065368, -23.617933 ], [ 27.116915, -23.572222 ], [ 27.155207, -23.567975 ], [ 27.139927, -23.528242 ], [ 27.206192, -23.536025 ], [ 27.19696, -23.504509 ], [ 27.235167, -23.502716 ], [ 27.307161, -23.458189 ], [ 27.331885, -23.407685 ], [ 27.371914, -23.431753 ], [ 27.380938, -23.403702 ], [ 27.406917, -23.39694 ], [ 27.401925, -23.422445 ], [ 27.417887, -23.427615 ], [ 27.445308, -23.392107 ], [ 27.531959, -23.384322 ], [ 27.563844, -23.351779 ], [ 27.603546, -23.22473 ], [ 27.650137, -23.233089 ], [ 27.689829, -23.207423 ], [ 27.720497, -23.239953 ], [ 27.741474, -23.236766 ], [ 27.787503, -23.174227 ], [ 27.769514, -23.141157 ], [ 27.794668, -23.148336 ], [ 27.823181, -23.115091 ], [ 27.916708, -23.076222 ], [ 27.939184, -23.044709 ], [ 27.941069, -22.964593 ], [ 28.043121, -22.910675 ], [ 28.047878, -22.837045 ], [ 28.154184, -22.769271 ], [ 28.163131, -22.71059 ], [ 28.201928, -22.671755 ], [ 28.340418, -22.580969 ], [ 28.449112, -22.57114 ], [ 28.512167, -22.586083 ], [ 28.824941, -22.486742 ], [ 28.831068, -22.463504 ], [ 28.863774, -22.447632 ], [ 28.916088, -22.458442 ], [ 28.970712, -22.375079 ], [ 28.965606, -22.308807 ], [ 29.034339, -22.217975 ], [ 29.150387, -22.213755 ], [ 29.202116, -22.181552 ], [ 29.331429, -22.203891 ], [ 29.459619, -22.167705 ], [ 29.518185, -22.175688 ], [ 29.538082, -22.151984 ], [ 29.605569, -22.154137 ], [ 29.647623, -22.12718 ], [ 29.764103, -22.141378 ], [ 29.875813, -22.190254 ], [ 29.923118, -22.191931 ], [ 30.124736, -22.308248 ], [ 30.223948, -22.294399 ], [ 30.288097, -22.350686 ], [ 30.48442, -22.314485 ], [ 30.628915, -22.331032 ], [ 30.662074, -22.30851 ], [ 30.843553, -22.291111 ], [ 31.07723, -22.343824 ], [ 31.162575, -22.327835 ], [ 31.201833, -22.360181 ], [ 31.259532, -22.360715 ], [ 31.31127, -22.41774 ], [ 31.558204, -23.177402 ], [ 31.54583, -23.402721 ], [ 31.557326, -23.469946 ], [ 31.688802, -23.619235 ], [ 31.695725, -23.720823 ], [ 31.761704, -23.879482 ], [ 31.874623, -23.951577 ], [ 31.913494, -24.189862 ], [ 31.990236, -24.312785 ], [ 32.01144, -24.476143 ], [ 32.001099, -24.682194 ], [ 32.044278, -25.126039 ], [ 32.024894, -25.37267 ], [ 31.98156, -25.487685 ], [ 32.01255, -25.63768 ], [ 31.938071, -25.830848 ], [ 32.004946, -25.990249 ], [ 32.088156, -26.013858 ], [ 32.107778, -26.166017 ], [ 32.076738, -26.364176 ], [ 32.08104, -26.41111 ], [ 32.136483, -26.536069 ], [ 32.13366, -26.83498 ], [ 32.182368, -26.860332 ], [ 32.226578, -26.832823 ], [ 32.354837, -26.861 ], [ 32.891523, -26.858332 ], [ 32.841308, -27.108337 ], [ 32.677408, -27.505205 ], [ 32.679362, -27.546045 ], [ 32.609467, -27.781055 ], [ 32.556393, -28.144509 ], [ 32.434447, -28.362308 ], [ 32.411232, -28.495007 ], [ 32.380355, -28.553394 ], [ 32.099137, -28.801259 ], [ 32.029793, -28.793038 ], [ 32.04409, -28.830204 ], [ 32.059561, -28.806786 ], [ 32.086391, -28.814748 ], [ 32.011486, -28.876992 ], [ 31.758999, -28.970273 ], [ 31.342721, -29.381157 ], [ 31.129126, -29.652555 ], [ 31.047204, -29.797732 ], [ 31.048217, -29.870037 ], [ 31.022857, -29.864599 ], [ 31.001732, -29.885036 ], [ 31.05523, -29.883545 ], [ 30.889762, -30.053191 ], [ 30.734306, -30.338835 ], [ 30.543072, -30.630549 ], [ 30.224196, -31.060316 ], [ 30.03582, -31.267857 ], [ 29.865775, -31.422541 ], [ 29.741255, -31.464369 ], [ 29.622607, -31.585798 ], [ 29.544271, -31.641564 ], [ 29.426867, -31.690243 ], [ 29.400589, -31.734229 ], [ 29.358401, -31.759705 ], [ 29.345811, -31.803628 ], [ 29.294571, -31.834876 ], [ 29.215556, -31.942124 ], [ 29.139601, -31.994783 ], [ 29.086211, -32.078005 ], [ 29.018603, -32.124717 ], [ 28.880826, -32.279965 ], [ 28.786313, -32.342819 ], [ 28.651316, -32.480726 ], [ 28.608733, -32.498435 ], [ 28.549925, -32.571733 ], [ 28.433357, -32.633128 ], [ 28.369094, -32.70629 ], [ 28.139698, -32.807607 ], [ 28.077734, -32.912197 ], [ 27.961317, -32.979125 ], [ 27.906468, -33.039895 ], [ 27.731791, -33.119865 ], [ 27.605246, -33.219291 ], [ 27.214143, -33.459486 ], [ 27.154402, -33.48021 ], [ 27.110144, -33.524252 ], [ 26.939106, -33.581508 ], [ 26.866054, -33.625608 ], [ 26.742547, -33.653421 ], [ 26.554759, -33.748676 ], [ 26.467028, -33.772101 ], [ 26.321593, -33.767011 ], [ 26.150529, -33.717252 ], [ 26.042064, -33.705301 ], [ 25.906532, -33.713246 ], [ 25.789539, -33.743717 ], [ 25.685418, -33.797805 ], [ 25.633023, -33.865497 ], [ 25.614458, -33.947763 ], [ 25.673704, -33.986647 ], [ 25.700808, -34.030467 ], [ 25.659397, -34.027146 ], [ 25.630132, -34.04711 ], [ 25.409042, -34.034903 ], [ 25.212712, -33.96913 ], [ 25.001762, -33.976975 ], [ 24.932036, -34.01184 ], [ 24.921236, -34.078511 ], [ 24.84079, -34.147589 ], [ 24.834957, -34.169229 ], [ 24.862404, -34.193014 ], [ 24.833501, -34.211699 ], [ 24.652885, -34.174399 ], [ 24.603708, -34.189672 ], [ 24.507017, -34.170445 ], [ 24.382049, -34.104503 ], [ 24.311131, -34.100846 ], [ 24.189883, -34.059779 ], [ 23.651853, -33.981466 ], [ 23.557916, -33.983392 ], [ 23.408697, -34.022414 ], [ 23.378527, -34.049612 ], [ 23.372292, -34.082391 ], [ 23.404595, -34.109806 ], [ 23.008949, -34.072787 ], [ 22.970898, -34.088115 ], [ 22.792166, -34.031084 ], [ 22.572955, -33.996625 ], [ 22.483945, -34.049074 ], [ 22.268164, -34.053356 ], [ 22.15478, -34.088542 ], [ 22.112121, -34.15033 ], [ 22.155095, -34.188143 ], [ 21.961603, -34.227284 ], [ 21.916077, -34.266274 ], [ 21.916222, -34.287862 ], [ 21.939964, -34.300563 ], [ 21.910387, -34.319268 ], [ 21.90806, -34.340118 ], [ 21.833955, -34.374801 ], [ 21.700996, -34.394438 ], [ 21.524115, -34.358095 ], [ 21.437578, -34.371609 ], [ 21.400675, -34.406564 ], [ 21.302493, -34.43719 ], [ 21.125095, -34.382069 ], [ 20.938192, -34.366619 ], [ 20.85454, -34.400991 ], [ 20.870326, -34.449679 ], [ 20.848014, -34.471563 ], [ 20.642412, -34.450843 ], [ 20.535599, -34.470013 ], [ 20.446305, -34.510567 ], [ 20.397191, -34.570487 ], [ 20.249177, -34.645274 ], [ 20.231405, -34.687967 ], [ 20.091198, -34.73015 ], [ 20.051968, -34.769203 ], [ 20.058075, -34.808434 ], [ 20.003315, -34.831638 ], [ 19.869552, -34.767639 ], [ 19.697763, -34.764157 ], [ 19.645787, -34.782161 ], [ 19.523749, -34.676283 ], [ 19.45347, -34.65437 ], [ 19.412203, -34.609627 ], [ 19.300251, -34.628985 ], [ 19.376042, -34.539062 ], [ 19.345572, -34.468435 ], [ 19.281353, -34.413136 ], [ 19.21454, -34.435878 ], [ 19.13828, -34.419909 ], [ 19.106929, -34.377435 ], [ 19.041443, -34.343192 ], [ 18.828089, -34.384344 ], [ 18.815043, -34.302007 ], [ 18.853816, -34.249703 ], [ 18.821697, -34.190169 ], [ 18.862758, -34.157974 ], [ 18.778468, -34.085738 ], [ 18.592908, -34.078972 ], [ 18.472973, -34.10943 ], [ 18.437524, -34.138037 ], [ 18.428256, -34.183841 ], [ 18.473492, -34.232246 ], [ 18.463048, -34.317237 ], [ 18.486473, -34.35361 ], [ 18.428251, -34.329228 ], [ 18.382385, -34.270837 ], [ 18.368456, -34.195215 ], [ 18.322233, -34.147956 ], [ 18.34894, -34.118441 ], [ 18.364617, -34.060637 ], [ 18.313422, -34.037857 ], [ 18.369062, -33.972656 ], [ 18.39577, -33.906171 ], [ 18.446437, -33.916328 ], [ 18.484385, -33.885332 ], [ 18.437608, -33.694343 ], [ 18.353445, -33.579601 ], [ 18.313109, -33.566584 ], [ 18.321064, -33.517714 ], [ 18.298923, -33.474046 ], [ 18.153891, -33.357495 ], [ 18.157013, -33.327884 ], [ 18.106407, -33.241369 ], [ 17.957012, -33.108108 ], [ 17.991082, -33.071287 ], [ 18.028202, -33.143685 ], [ 18.094808, -33.201163 ], [ 18.120927, -33.19156 ], [ 18.032526, -33.10199 ], [ 18.041515, -33.05349 ], [ 18.028547, -33.024505 ], [ 17.971056, -32.997375 ], [ 17.949242, -33.011309 ], [ 17.967618, -33.035678 ], [ 17.896327, -33.03751 ], [ 17.899508, -33.013333 ], [ 17.875045, -32.995769 ], [ 17.883529, -32.932852 ], [ 17.862729, -32.906313 ], [ 17.881401, -32.864162 ], [ 17.849743, -32.827262 ], [ 17.903192, -32.796402 ], [ 17.901401, -32.739574 ], [ 17.969559, -32.70548 ], [ 18.055501, -32.780545 ], [ 18.142311, -32.770406 ], [ 18.244897, -32.679112 ], [ 18.311554, -32.569444 ], [ 18.333946, -32.467979 ], [ 18.31553, -32.322095 ], [ 18.337936, -32.309659 ], [ 18.343703, -32.282083 ], [ 18.302309, -32.120118 ], [ 18.312487, -32.068741 ], [ 18.267056, -31.940625 ], [ 18.275409, -31.887234 ], [ 18.234277, -31.819116 ], [ 18.220776, -31.743734 ], [ 18.111971, -31.578041 ], [ 17.902608, -31.351821 ], [ 17.865375, -31.261835 ], [ 17.746923, -31.138061 ], [ 17.681187, -31.003159 ], [ 17.60367, -30.912645 ], [ 17.522359, -30.735494 ], [ 17.472551, -30.683017 ], [ 17.436527, -30.621274 ], [ 17.44, -30.594596 ], [ 17.27596, -30.339083 ], [ 17.257634, -30.257526 ], [ 17.194565, -30.130505 ], [ 17.157724, -29.982741 ], [ 17.118918, -29.930882 ], [ 17.078218, -29.81914 ], [ 17.054489, -29.689828 ], [ 17.001559, -29.573873 ], [ 16.969236, -29.437039 ], [ 16.841741, -29.216318 ], [ 16.815216, -29.093729 ], [ 16.741774, -29.033845 ], [ 16.686156, -28.924498 ], [ 16.604304, -28.872695 ], [ 16.56408, -28.762259 ], [ 16.566711, -28.725555 ], [ 16.448304, -28.622134 ], [ 16.491778, -28.567332 ] ] ], "type": "Polygon" }, "id": "(0, 15)", "properties": {}, "type": "Feature" } ], "type": "FeatureCollection" } }, "process_id": "filter_spatial" }, "filtertemporal1": { "arguments": { "data": { "from_node": "renamelabels1" }, "extent": [ "1980-01-01", "2023-03-01" ] }, "process_id": "filter_temporal" }, "loaddiskdata1": { "arguments": { "featureflags": { "tilesize": 16 }, "format": "GTiff", "glob_pattern": "/data/users/Public/emile.sonneveld/ERA5-Land-monthly-averaged-data-ANIN/tiff_collection/*/*/*/*_tp.tif", "options": { "date_regex": ".*(\\d{4})-(\\d{2})-(\\d{2}).*" } }, "process_id": "load_disk_data" }, "renamelabels1": { "arguments": { "data": { "from_node": "applydimension1" }, "dimension": "bands", "target": [ "SPI" ] }, "process_id": "rename_labels" }, "resamplespatial1": { "arguments": { "align": "upper-left", "data": { "from_node": "filtertemporal1" }, "method": "near", "projection": 4326, "resolution": 0.00297619047619 }, "process_id": "resample_spatial" }, "saveresult1": { "arguments": { "data": { "from_node": "resamplespatial1" }, "format": "GTiff", "options": {} }, "process_id": "save_result", "result": true } } } ```
EmileSonneveld commented 4 months ago

Related: https://github.com/Open-EO/openeo-geopyspark-driver/issues/413

EmileSonneveld commented 3 months ago

Tested on openeo-dev with stac catalog and load_collection on AGERA5. For the load_collection, I specified a smaller temporal extent, because it has a larger temporal resolution