Python Forum
3d Interpolation with irregular input grid - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: 3d Interpolation with irregular input grid (/thread-1995.html)



3d Interpolation with irregular input grid - blueade7 - Feb-09-2017

Hi,

I have a 3-dimension dataset on a grid which has regular monotonic x and y coordinates, but an irregular, non-monotonic z coordinate.

In other words this z coordinate varies with every data point, so is necessarily 3-dimensional itself.

I would like to take a horizontal slice through this data, i.e. to interpolate it onto a single z level.

Does anyone know of a way to do this in python? I've tried interpolate.griddata but I don't think that can handle a 3-d input coordinate.

Thanks


RE: 3d Interpolation with irregular input grid - Larz60+ - Feb-09-2017

see https://gist.github.com/aadm/424490cfbb4e7980f8d14ed9fd69dcb2


RE: 3d Interpolation with irregular input grid - blueade7 - Feb-09-2017

(Feb-09-2017, 06:33 PM)Larz60+ Wrote: see https://gist.github.com/aadm/424490cfbb4e7980f8d14ed9fd69dcb2

Thanks for your reply but this is for a 3d field on a regular grid. My data has one coordinate which is irregular and non-monotonic.