Open saevioapps opened 1 month ago
Normally these types of "invalid value" warnings from numpy come from NaNs in the data or geolocation data. If you're getting this with your example code...then I'm not sure where it would be coming from, especially for large radii values since I would expect that to mean more valid pixels are involved not more invalid.
Maybe @pnuu has ideas since he originally wrote that resampler class.
The only weird thing is that there is no warning from the previous line which is identical other than there being a addition instead of subtraction. Most likely there are NaN
s in a__
or b__
that cause the warning. Nothing to worry about.
And to clarfiy, the NaN
values can be due to the four points used in bilinear calculation to form a paralellogram (opposite edges are parallel) or one/two of the edges being exactly vertical. These special casesare handled in the next steps. The third option for
NaN`s is that there are no valid points for the interpolation at all, like if the target area extends beyond the source data coverage, or there are invalid coordinates..
Code Sample, a minimal, complete, and verifiable piece of code
I have a temperature grib message and I want to resample it using cubic resampling. However, i get these warnings in the console. If i lower the radius value I no longer get the warnings but I get 0s in the interpolated data.
Thank you!