Skip to content

Using xESMF as a missing value filling tool #431

Description

@aulemahal

Just an idea I had: we could make use of ESMF to create a new class for filling missing values. It would work like a regridding that receives the same array twice, but the input has mask selecting only valid points and the output has the opposite mask.

We would have two and half methods already there : nearest_s2d/d2s and bilinear. Fixing #21 would add an option for extrapolation.

Elsewhere in the xarray world, there's the basic scipy methods, but I haven't seen a proper xarray implementation of them for the specific use case of filling missing values. Most notably, xarray's DataArray.interpolate_na does not support 2D grids. There pyinterp which is xarray-adjacent and provides 2 methods. They don't seem to support has many grid types as ESMF, but they also have 3D and 4D support, which is out of scope for xESMF.

In all cases, the idea of being able to save the weights and reload them is what makes xESMF interesting for this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions