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

Cubed sphere interpolation #90

Closed

Conversation

odlomax
Copy link

@odlomax odlomax commented Mar 4, 2022

Note: this PR cannot go into ecmwf/develop until PR ecmwf#95 passes review. feature/cubed-sphere-base3 is ecmwf/develop with ecmwf#95 merged into it.

This feature adds following functionality:

  • a "cubedsphere-bilinear" interpolation scheme, with an associated "cubedsphere" MatchingMesh partitioner.
  • adjoint-of-halo-exchange functionality to the NodeColumns functionspace.
  • a general tidy-up of Quad2D and Triag2D interpolation elements, with some extra floating-point epsilon checks.
  • a cubed sphere interpolation test which uses all of the above. (Example shown below).

CS-LFR-24 interpolation source field:
source

O48 interpolation target field:
target

@twsearle Can you check that my changes to Quad2D and Triag2D don't break anything you're currently working on. The ctests appear to run fine.

@wdeconinck and @MarekWlasak I basically copy-and-pasted code from StructuredColumns to NodeColumns to get the adjoint of the halo exchange to work. Can you check that I haven't done something truly daft?

closes #82 and #83

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #90 (d46531d) into feature/cubed-sphere-base3 (0d1e5ba) will decrease coverage by 0.07%.
The diff coverage is 86.35%.

Impacted file tree graph

@@                      Coverage Diff                       @@
##           feature/cubed-sphere-base3      #90      +/-   ##
==============================================================
- Coverage                       78.01%   77.93%   -0.08%     
==============================================================
  Files                             773      781       +8     
  Lines                           53089    53346     +257     
==============================================================
+ Hits                            41418    41577     +159     
- Misses                          11671    11769      +98     
Impacted Files Coverage Δ
src/atlas/functionspace/NodeColumns.h 93.83% <ø> (ø)
src/atlas/grid/Tiles.h 100.00% <ø> (ø)
src/atlas/grid/detail/tiles/FV3Tiles.cc 93.63% <0.00%> (ø)
src/atlas/grid/detail/tiles/LFRicTiles.h 100.00% <ø> (ø)
src/atlas/grid/detail/tiles/Tiles.h 100.00% <ø> (ø)
...atlas/interpolation/method/bil/BilinearRemapping.h 83.33% <ø> (ø)
...hgenerator/detail/cubedsphere/CubedSphereUtility.h 100.00% <ø> (ø)
src/atlas/projection/Projection.h 100.00% <ø> (ø)
src/atlas/projection/detail/ProjectionImpl.h 100.00% <ø> (ø)
...atlas/redistribution/detail/RedistributeGeneric.cc 90.60% <54.83%> (-6.65%) ⬇️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d1e5ba...d46531d. Read the comment docs.

Copy link

@twsearle twsearle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will cause any issues with the changes I have been making.

There is a chance you are missing out on some small optimisations in localRemap with your refactor. I am not sure if it is worth looking at, but as part of the response to review of my PR for this I removed the Roots struct and calculated the weight directly. I really don't know but it is possible that vectorises better? Having said that, my brief test on a ~1million obs seems to run in about the same time so I am not concerned.

@odlomax
Copy link
Author

odlomax commented Mar 16, 2022

Closed due to deprecated base branch.

@odlomax odlomax closed this Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants