Python embedding is done in 3 spots in MET:
(1) vx_data2d_python library for gridded data
(2) ascii2nc for point obs
(3) stat_analysis for MPR data
(2) and (3) use the Python3_Script class, while (1), implemented first, does not. This makes the implementation details a bit confusing and more difficult to maintain. This task is to refactor (1) to also use the Python3_Script class.
In addition, enhance the Python3_Script class to check when an error occurred. Call PyErr_Occurred() and PyErr_Fetch() to retrieve the PyObjects containing the error details. Print the results to the mlog output so that the error messages are included in the log files.
Python embedding is done in 3 spots in MET: (1) vx_data2d_python library for gridded data (2) ascii2nc for point obs (3) stat_analysis for MPR data
(2) and (3) use the Python3_Script class, while (1), implemented first, does not. This makes the implementation details a bit confusing and more difficult to maintain. This task is to refactor (1) to also use the Python3_Script class.
In addition, enhance the Python3_Script class to check when an error occurred. Call PyErr_Occurred() and PyErr_Fetch() to retrieve the PyObjects containing the error details. Print the results to the mlog output so that the error messages are included in the log files.