Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for interpolation with 3D altitude #143

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Dec 17, 2024

This commit adds support for interpolating datasets of the form (lon, lat, z), with (lon, lat) being 1D variables, and z being z(lon, lat) (a 3D variable). This is accomplished by splitting interpolation into two: first, we perform linear interpolation along the vertical direction, and the bilinear in the horizontal.

More specifically, I interpolate the nodal points around the target point onto the same altitude. Then, I perform bilinear interpolation with the interpolated values.

This code is hacky and not polished. It runs on GPUs only because we allow scalars. Boundary conditions are not implemented very well and could be imprecise.

@Sbozzolo Sbozzolo force-pushed the gb/split_vert_horiz_interpolation branch 3 times, most recently from 921d9d1 to e5b6c37 Compare December 17, 2024 17:21
@Sbozzolo Sbozzolo marked this pull request as draft December 17, 2024 17:21
@Sbozzolo Sbozzolo force-pushed the gb/split_vert_horiz_interpolation branch 2 times, most recently from a2b729e to 8510aad Compare December 17, 2024 18:51
@Sbozzolo Sbozzolo force-pushed the gb/split_vert_horiz_interpolation branch from 8510aad to 73282c9 Compare December 17, 2024 22:33
This commit adds support for interpolating datasets of the form
(lon, lat, z), with (lon, lat) being 1D variables, and z being z(lon,
lat) (a 3D variable). This is accomplished by splitting interpolation
into two: first, we perform linear interpolation along the vertical
direction, and the bilinear in the horizontal.

More specifically, I interpolate the nodal points around the target
point onto the same altitude. Then, I perform bilinear interpolation
with the interpolated values.

This code is hacky and not polished. It runs on GPUs only because we
allow scalars. Boundary conditions are not implemented very well and
could be imprecise.
@Sbozzolo Sbozzolo force-pushed the gb/split_vert_horiz_interpolation branch from 73282c9 to 807a28d Compare December 17, 2024 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant