In vmf data server https://vmf.geo.tuwien.ac.at/, there is fortran and matlab source code to interpolate vmf1 at given location using 2.5o x 2o grid data. I needed that source code in python scripting.
Shanker KC The Vienna Mapping Function 1 (VMF1) is a model for explaining the atmospheric mapping function used in the placement of Global Navigation Satellite Systems (GNSS). It is used to compensate for atmospheric refraction in GNSS signals. Typically, the VMF1 is provided as a grid of coefficients that may be used to interpolate the mapping function at a particular position and time.
There is no Python version of the VMF1 grid interpolation technique that is directly similar to the fortran or matlab code you cited. However, the old code may be converted to Python. To encapsulate Fortran or C code as a Python module, use tools like f2py or cython. You may then call the Fortran code from Python.
You might also attempt manually translating the Fortran or Matlab code to Python. This may take a little longer, but it will give you more control over the final implementation.
It's also worth noting that various Python packages, such as Scipy's interpolation routines (e.g., Rbf, interp2d) or other more specialized programs like PyInterp, might be used to interpolate the grid data and give a comparable solution.
If you are unfamiliar with fortran or matlab and are having problems translating the code, you may consider seeking assistance from someone who is acquainted with both languages and can assist you with translating and optimizing the code.
You might also attempt manually translating the Fortran or Matlab code to Python. This may take a little more time, but it will be worth it. Keep in mind that the performance of the Python implementation may differ from that of the Fortran or Matlab implementations, necessitating some optimization and tuning.