cf-xarray icon indicating copy to clipboard operation
cf-xarray copied to clipboard

sgrid use cases & API

Open dcherian opened this issue 3 years ago • 3 comments

Our homework was to write down use cases to come up with a useful API.

I would like to eventually see a xesmf.to_uniform_grid(dataset, method="conservative") that would work on staggered grid datasets. This requires automatic inference of corner points given a set of dimension names.

dcherian avatar Apr 23 '21 16:04 dcherian

I'd like a method to subsample a dataset preserving the native grid. I.e., after subsampling a dataset, the relative size/position of all axes does not change, and therefore all SGRID attributes are still valid.

Something like, .isel(X=slice(10, 20), Y=slice(10, 20), preserve_padding=True).

malmans2 avatar Apr 28 '21 14:04 malmans2

If preserve_padding=False, it would be nice to update the SGRID attributes accordingly.

malmans2 avatar Apr 28 '21 14:04 malmans2

In addition to the first suggestion above, I think a way to infer missing "paddings" would be nice. Say if only padding: none is available, corner inference could include inference of the two outer elements to come up with padding: both.

aulemahal avatar Apr 28 '21 16:04 aulemahal