NOAA-ORR-ERD / gridded

A single API for accessing / working with gridded model results on multiple grid types
https://noaa-orr-erd.github.io/gridded/index.html
The Unlicense
64 stars 14 forks source link

Grid_R can't interpolate on non-ascending dimensions #25

Open jay-hennen opened 6 years ago

jay-hennen commented 6 years ago

Can thank scipy.RegularGridInterpolator for this one. It only accepts dimensions for the data that are exclusively ascending rather than in sorted order (ascending or descending). This is not mentioned in it's documentation.

One possible workaround: detect and numpy.flip any offending dimensions, and flip that dimension's data as well. There are lazy-loading concerns with flipping the data dimension though.

ChrisBarker-NOAA commented 6 years ago

Is it worth looking at the scipy code and submitting a patch?

( at the very least, a doc patch )

You'd think delta could be positive or negative, with no change in the code anywhere else...

I also see this:

"The data must be defined on a regular grid; the grid spacing however may be uneven."

Which is weird, as that isn't a "regular" grid -- it is a "rectangular" grid, though...