Try to implement a new helper function [`apply_ufunc()`](http://xarray.pydata.org/en/v0.10.0rc1/whats-new.html) instead of stacking and groupby.
Try to implement a new helper function
apply_ufunc()instead of stacking and groupby.