SciTools / iris

A powerful, format-agnostic, and community-driven Python package for analysing and visualising Earth science data
https://scitools-iris.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
626 stars 283 forks source link

Interpolation over derived coordinates #1759

Open duncanwp opened 9 years ago

duncanwp commented 9 years ago

None of the interpolation interfaces appear to support interpolation over hybrid (derived) coordinates. However I've been looking at interpolation of a single point on a cube with hybrid height and it seems to be fairly straightforward to first ask for a vertical column using any of the interpolation methods available, and subsequently ask for an (altitude) interpolation over that column.

Could this be built into the iris interpolation routines to save the overhead of these two seperate calls?

pelson commented 9 years ago

Could this be built into the iris interpolation routines to save the overhead of these two seperate calls?

Yes - that would be excellent. Though I'm a little uncertain of the difficulties in doing so. :+1:

github-actions[bot] commented 3 years ago

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

duncanwp commented 3 years ago

This is still something that would be nice to have

github-actions[bot] commented 1 year ago

In order to maintain a backlog of relevant issues, we automatically label them as stale after 500 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

duncanwp commented 1 year ago

I'd still be interested if we can get it implemented!

trexfeathers commented 7 months ago

@duncanwp we've all been quite scared to take this on as we're not sure of the scope! Could you provide an example of the workaround you are currently using? We can't currently assess the potential effort this would need. Many thanks

duncanwp commented 7 months ago

Sure, basically my current approach is to interpolate the regularly gridded dimensions (typically lat/lon/time) to extract column(s) of the hybrid dimension, each of which should now also regular - then interpolate those.

You can get a feel for that here: https://github.com/cedadev/cis/blob/c207b4e3b47f770da404991eedeeb55422817772/cis/collocation/gridded_interpolation.py#L215.

It may be that this is the most efficient way of doing it already, but I don't have the capacity to support this code any more and I think it would be of wider use to the community within Iris.