Blockmean with input data as an Xarray Dataset

Hello. I’m trying to resample (to a larger cellsize) a very large DataArray grid. I’m finding that GRDSAMPLE introduces some smoothing, and that better results are achieved by GRD2XYZ to a Pandas Dataframe and then BLOCKMEAN and then SURFACE. Problem is … I run out of memory.

I see from the API that BLOCKMEAN can accept Xarray Datasets. But I can’t seem to get that to work. I’ve been creating the Dataset using xarray.DataArray.to_dataset .

Does anyone have example code for BLOCKMEAN (outputting a Pandas Dataframe) for an input Array Dataset?