metview-python icon indicating copy to clipboard operation
metview-python copied to clipboard

Question regarding function behid mv.interpolation

Open mr-d3falt opened this issue 1 year ago • 2 comments

What maintenance does this project need?

Hello, I'm reaching out to learn more about the mv.interpolation function used in the metview library. I'm particularly interested in understanding how it works and exploring opportunities to improve its performance. Could you kindly provide me with more information about the purpose, parameters, and usage of the mv.interpolation function? I have experience in optimizing code for better performance and would love to contribute to enhancing its efficiency and effectiveness.

Thank you.

Organisation

No response

mr-d3falt avatar Jul 18 '23 17:07 mr-d3falt

Hello @mr-d3falt, nice to meet you! This is a very kind offer, however this function is implemented in the C++ binary layer of Metview, whose source code is not on GitHub (this repo here is only the Python bindings).

The source is available and probably easiest installed via a 'bundle' - https://confluence.ecmwf.int/display/METV/The+Metview+Source+Bundle. Documentation on the function can be found here: https://metview.readthedocs.io/en/latest/api/functions/interpolate.html. Note that if you really want to dig into the C++ code, there are multiple implementations of this function in MvGrid.cc - one for each grid type (e.g. regular lat/lon, reduced Gaussian, ...). But realistically, building and debugging Metview's C++ has a steep learning curve, and you would need to be familiar with the different GRIB grid types, so you might be better looking elsewhere! 😄

iainrussell avatar Jul 20 '23 16:07 iainrussell

Hello @iainrussell , thank you for the quick response ! Is it possible to parallelize the interpolation ? Because I think the cell with mv.interpolate use only 1 cores of the CPU . And can I use RegularGridInterpolator form scipy library as alternative to mv.interpolate ?

Thank You!

mr-d3falt avatar Jul 21 '23 07:07 mr-d3falt