pangeo-data / xESMF

Universal Regridder for Geospatial Data
http://xesmf.readthedocs.io/
MIT License
189 stars 34 forks source link

Correctly guess output chunks for SpatialAverager #308

Closed aulemahal closed 1 year ago

aulemahal commented 1 year ago

The SpatialAverager.w property outputs an intuitive 3D weights array. However, the mechanism to guess output chunks (when None is passed, the default) is in the BaseRegridder and it assumed that w was 4D.

This PR changes how we guess those output chunks:

This PR also reactivates the large region tests, adding a segmentize call, so it passes. Not sure how useful that test is, but it also doesn't cost much to keep it.