Is your feature request related to a problem? Please describe.
When operating on xarray.DataArray based on DaskArray's with earthkit.transforms.aggregate.spatial.reduce the operation is performed eagerly. Scrolling a little bit through the code it seems to be like this is expected right now. Interestingly, the ALLOWED_LIBS int tools.py constant only contains numpy right now but still doesn't seem to raise an error. I assume the eagerly loading happens because the HOW_METHODS are defined via numpy functions.
Describe the solution you'd like
I think a simple solution could be to use the dask equivalents where available if the data is in dask.
Describe alternatives you've considered
A more complicated alternative would be to use xarray's apply_ufunc but I don't think that'd be necessary.
Additional context
No response
Organisation
Lobelia Earth
Is your feature request related to a problem? Please describe.
When operating on xarray.DataArray based on DaskArray's with
earthkit.transforms.aggregate.spatial.reducethe operation is performed eagerly. Scrolling a little bit through the code it seems to be like this is expected right now. Interestingly, theALLOWED_LIBSint tools.py constant only contains numpy right now but still doesn't seem to raise an error. I assume the eagerly loading happens because theHOW_METHODSare defined via numpy functions.Describe the solution you'd like
I think a simple solution could be to use the dask equivalents where available if the data is in dask.
Describe alternatives you've considered
A more complicated alternative would be to use xarray's apply_ufunc but I don't think that'd be necessary.
Additional context
No response
Organisation
Lobelia Earth