atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Increase support for parallel interpolation from LAM grids

Open wdeconinck opened this issue 1 month ago • 1 comments

This PR contains various fixes to be able to interpolate in parallel from a regional grid. Most fixes had to do with support for empty partitions, or latitude numbering going from South to North instead of North to South.

A test has been added that runs some interpolation cases from a Lambert Conformal grid provided by Ulf Andrae (see below):

The intended use cases for this feature at the moment are:

  • Couple LAM configurations (ACCORD - HARMONIE - AROME) to ecrad in parallel.
  • Use of PLUME plugins with LAM configurations

Currently known not to work are the StructuredInterpolation methods as their stencil computations expect periodic and pole-folding boundaries. Some dedicated effort will be required for this. The "RegionalLinear2D" interpolation is working fine. Below is an example interpolation performed by the added test.

Source Lambert grid:

type: regional
lonlat(xmin,ymin): [4.03896, 51.1994]
nx: 49
ny: 69
dx: 2500.0
dy: 2500.0
projection:
    type: lambert_conformal_conic
    latitude0: 51.967
    longitude0: 4.9
image Interpolation to a sample lonlat target grid:
type: regional
lonlat(xmin,ymin): [4.4, 51.5]
nx: 41
ny: 41
dx: 0.025
dy: 0.025
image

💣💥☠️ Static Analyzer Report ☠️💥💣 https://sites.ecmwf.int/docs/atlas/static-analyzer/PR-331

wdeconinck avatar Nov 07 '25 12:11 wdeconinck

Codecov Report

:x: Patch coverage is 93.60000% with 16 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 79.83%. Comparing base (4a5d4e9) to head (1f21887). :warning: Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/atlas/grid/StructuredPartitionPolygon.cc 78.94% 8 Missing :warning:
...atlas/meshgenerator/detail/RegularMeshGenerator.cc 60.00% 4 Missing :warning:
...as/meshgenerator/detail/StructuredMeshGenerator.cc 50.00% 2 Missing :warning:
src/tests/AtlasTestEnvironment.h 85.71% 1 Missing :warning:
...tests/interpolation/test_interpolation_from_lam.cc 99.42% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #331      +/-   ##
===========================================
+ Coverage    79.27%   79.83%   +0.55%     
===========================================
  Files          909      908       -1     
  Lines        61597    70941    +9344     
===========================================
+ Hits         48832    56634    +7802     
- Misses       12765    14307    +1542     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Nov 07 '25 13:11 codecov-commenter