Closed benjaminmenetrier closed 1 month ago
It seems the hash test is failing depending on the compiler, I'll do it differently.
The new test is working.
I have extended the regional interpolation test : accuracy and adjoint tests, for both 1D and 2D fields.
Thank you very much @wdeconinck for your very relevant comments. I realize that I am not well aware of memory usage in C++ and should be more careful about it.
This PR adds a new interpolation for regional structured source grids, available with the factory tag "regional-linear-2d". It uses a generic sparse matrix element class
InterpElement
added ininterpolation/element
, that might also be used for vertical interpolation in the future.An associated test has been added, which defines field values on a coarse source grid, interpolates on a refined target grid, and compute the target field hash on each MPI task (2 tasks requested for this test).
The PR also includes a bugfix in
functionspace/detail/StructuredColumns_setup.cc
: it seems that the fieldxy
is actually corresponding to thelonlat
values for all structured grids. However, this was not true indevelop
for regional grids. I have implemented a minimal bugfix where the correct values oflonlat
are specified in thexy
field for regional grids too.