Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/openeo_processes/cubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,15 @@ def exec_xar(data, output_filepath='out', format='GTiff', options={}, write_prod
tiles, gridder = get_equi7_tiles(data)

# Renaming the time dimension
if 'time' in data.dims:
data = data.rename({'time': 't'})
if 't' not in data.dims:
# Create list of matches
accepted = ['time', 't', 'month']

values = list(set(accepted).intersection(data.dims))

if values:
value = values[0]
data = data.rename({value: 't'})
else:
data = data.assign_coords(t=datetime.now())
data = data.expand_dims('t')

Expand Down