Interpolation over an irregular grid

后端 未结 6 1705
不知归路
不知归路 2020-12-01 01:30

So, I have three numpy arrays which store latitude, longitude, and some property value on a grid -- that is, I have LAT(y,x), LON(y,x), and, say temperature T(y,x), for some

6条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 02:20

    There's a bunch of options here, which one is best will depend on your data... However I don't know of an out-of-the-box solution for you

    You say your input data is from tripolar data. There are three main cases for how this data could be structured.

    1. Sampled from a 3d grid in tripolar space, projected back to 2d LAT, LON data.
    2. Sampled from a 2d grid in tripolar space, projected into 2d LAT LON data.
    3. Unstructured data in tripolar space projected into 2d LAT LON data

    The easiest of these is 2. Instead of interpolating in LAT LON space, "just" transform your point back into the source space and interpolate there.

    Another option that works for 1 and 2 is to search for the cells that maps from tripolar space to cover your sample point. (You can use a BSP or grid type structure to speed up this search) Pick one of the cells, and interpolate inside it.

    Finally there's a heap of unstructured interpolation options .. but they tend to be slow. A personal favourite of mine is to use a linear interpolation of the nearest N points, finding those N points can again be done with gridding or a BSP. Another good option is to Delauney triangulate the unstructured points and interpolate on the resulting triangular mesh.

    Personally if my mesh was case 1, I'd use an unstructured strategy as I'd be worried about having to handle searching through cells with overlapping projections. Choosing the "right" cell would be difficult.

提交回复
热议问题