ecmwf / metview-python

Python interface to Metview meteorological workstation and batch system
https://metview.readthedocs.io/en/latest/
Apache License 2.0
126 stars 32 forks source link

Question regarding function behid mv.interpolation #51

Open mr-d3falt opened 1 year ago

mr-d3falt commented 1 year ago

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

iainrussell commented 1 year ago

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! 😄

mr-d3falt commented 1 year ago

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!