xarray.apply ufunc
Official documents
input_core_dims
Core dimensions are automatically moved to the last axes of input variables before applying func
Tips
Rapidly Prototyping High-Performance Meteorological Data Systems Using Xarray and Numba: 99th American Meteorological Society Annual Meeting Pangeo use case - when dask.array and xarray.apply_ufunc are not the answer
Xarray with Dask Arrays — Custom workflows and automatic parallelization
python xarray - dask performance apply along axis - Stack Overflow
python - What's the difference between dask=parallelized and dask=allowed in xarray's apply_ufunc? - Stack Overflow
Chunking and performance
A good rule of thumb is to create arrays with a minimum chunksize of at least one million elements (e.g., a 1000x1000 matrix).
apply_ufunc(dask='parallelized'): mix of chunked and non-chunked *args results in shape mismatch · Issue '#2817 · pydata/xarray · GitHub
Examples
code:python
sigma0 = xr.apply_ufunc(gsw.sigma0, ds.salt, ds.thetaoga,
See also