Setup
To use it, you need three things:
- A Python 3 interpreter
- Metview 5 needs to be in your PATH
- Metview's Python module needs to be in your PYTHONPATH
So, to try it right now, do the following from a terminal:
module load python3/new module swap metview/new export PYTHONPATH=/tmp/cgi/install/python/lib/python3.6/site-packages/:$PYTHONPATH
Test it
Here's a quick Python program to check that it's working. Copy this into a file called test-metview.py
import metview as mv # call Metview's built-in function to return a lower case string print(mv.lowercase('Hello World!')) # should output "hello world!"
and run it like this:
python3 test-metview.py
If this works, then you have successfully set up Metview's Python interface!