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

Various fixes to vertical remap and vertical interpolation. #2705

Open
bartgol opened this issue Feb 7, 2024 · 0 comments
Open

Various fixes to vertical remap and vertical interpolation. #2705

bartgol opened this issue Feb 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bartgol
Copy link
Contributor

bartgol commented Feb 7, 2024

It currently is only implemented for scalar/vector 3d quantities, but it should be easy to extend to tensors.

And looking at the interpolation implementation, I don't think we are using LinInterp in the right way. Namely:

  1. we perform the setup inside the 1d interpolation. This means that different vars (for vector quantities) perform the setup. We do not cause race donditions because...
  2. for vector fields, we create the LinInterp object with ncols*ncomps "columns"

At the very least, we are doing more work than we should, and with tensor fields, this extra work may more noticeable.

Battle plan:

  1. Change the current impl, to perform setup and interpolation in two different kernels.
  2. Add support for tensor fields.

Follow up:
3. The vertical remapper is calling perform_vertical_interpolation, but that's a waste! All variables in the remapper are remapped with the same src/tgt pressures, so we should do the LinInterp once for all fields. Hence, we should add vertical interpolation overloads that accept a LinInterp object, so that it can be recycled for several vertical interpolations.

@bartgol bartgol added the enhancement New feature or request label Feb 7, 2024
@bartgol bartgol self-assigned this Feb 7, 2024
@bartgol bartgol changed the title Make vertical interpolation handle tensor fields Various fixes to vertical remap and vertical interpolation. Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant