xCDAT / xcdat-validation

The xCDAT validation repository for exploring, prototyping, and testing feature ideas.
https://xcdat.readthedocs.io/en/latest/
3 stars 3 forks source link

Investigate and Compare Area Averaging in xarray and CDAT #10

Closed pochedls closed 3 years ago

pochedls commented 3 years ago

Specific details to investigate include:

pochedls commented 3 years ago

In explore_spatial_averages.ipynb I compare spatial averaging in xarray and CDAT. xarray has limited built-in functionality for generating weights (e.g., for regional averages), which does matter a little bit in comparisons with CDAT. It is able to subset regions using the .select() functionality, but if the native grid and target region don't have boundaries that match the weighting will not be exactly right (even on simple rectilinear grids). There is a need to extend xarray with better functionality in this regard.