Help with Python embedding for MTD #2653
-
Hi, I’m working on using MTD on my data, which has grid mapping type "rotated_pole". Since this grid type isn't supported by MET, I’m using Python embedding as a workaround. However, I’m encountering some challenges with using Python embedding and setting up the config file. I’m not sure if I’m missing any key steps or configurations when using Python embedding with MTD. I use a python environment where I set the following variables:
Here, you can find the config file, Python embedding script, a description of the grid, and the MTD_test.log file: When I run MTD with
I tried running dataplane.py separately, and it works without any error messages (including loading numpy, xarray, etc.). I also completed the online tutorial for MTD, and it worked without any issues on the tutorial data. Therefore, I suspect the error might be related to my use of Python embedding. Could you provide some guidance on how to set up the Python embedding? If you need any additional information or files, please let me know! Thanks in advance for your help! Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 22 replies
-
Hi Annabell (@anwe5). I see that the problem is that numpy cannot be found:
when using Can you please run the following commands?
to determine if numpy loads without a problem. If numpy does load, please try removing the following line from your python_embedding.py script and rerun:
Please let us know how it goes. Regarding guidance on setting up the Python embedding, please take a look at the documentation in our MET User's Guide. Hopefully, this will answer any questions you have. But, please let us know if you do have any further questions after reading through our documentation: 37. Appendix F Python Embedding |
Beta Was this translation helpful? Give feedback.
Hi,
I resolved the issue with the Python version. I realized I wasn't using the correct versions of Python and NetCDF for the MET installation. After correcting this, the 'plot_data_plane' tool is now working.
Thank you very much for your help on this issue!