Grid.jl
Grid.jl copied to clipboard
CoordInterpGrid does not work with InterpCubic in 2 dimensions
I used the example provided on the main page:
x = -1.0:0.1:1.0
y = 2.0:0.5:10.0
z_2d = Float64[sin(i+j) for i in x, j in y]
With these variables, InterpQuadratic works fine but if I try
z_2di = CoordInterpGrid((x,y), z_2d, BCnil, InterpCubic)
I get:
ERROR: DimensionMismatch("Coordinate lengths do not match grid size.")
in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:7
in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:13
in CoordInterpGrid at /Users/mathieu/.julia/Grid/src/coord.jl:21
We've seen something similar before (maybe #29?) and I thought we fixed it. It seems every time I try to fix one broken thing with InterpCubic, I break something else... =(
The problem is very likely to be somewhere around here - I unfortunately don't have time to take a deeper look at it at the moment, but if you're able to fix it a pull request is most welcome! =) Most likely, something similar to the specialization for BCfill, but specializing for InterpCubic with BCnil, is needed.