Welcome back to AWIPS Tips!
Today we’re going to talk a little bit about python-awips! However, unlike our previous python-awips blogs, where we talk about one of our example notebooks, today we’re going to walk you through how to actually open up Jupyter and run those notebooks!
We know there are a variety of Operating Systems out there, and unfortunately, we cannot provide a walkthrough for every single one of them, but to reach the most users as possible, we would like to show you how to get up and running using our Virtual Machine install option. While we currently have this listed on our CAVE installation webpage as an option for Windows machines, this virtual machine can also be used on Linux machines. So, if you would like to follow along with this blog, please go ahead and download the Virtual Machine option for CAVE on your PC or Linux machine.
Two of the main advantages of using Unidata’s virtual machine are that you don’t have to do any of the other software installation, and you don’t have to worry about altering your machine’s environment. Python-awips is already installed with notebooks ready to use!
Working within a virtual machine means you can alter and change as many things about that virtual machine, without impacting the rest of your potential workflows or setups.
After following the above mentioned installation instructions, you should have the following downloaded and installed on your machine:
- VMWare Workstation Player
- Unidata CAVE VM distribution (unidata_cave.zip)
- Loaded the VM, CentOS 7 - Unidata CAVE [version] into VMWare Workstation Player
Shown below is the virtual machine. First we log in using the awips user with password awips, then we open a terminal, navigate to the pre-installed python-awips location, activate the existing python3-awips conda environment, and then start Jupyter notebook on our examples directory. Once started, click on the notebooks folder to view all of our notebooks:
conda activate python3-awips
jupyter notebook examples
NOTE: Also, if the display doesn't seem to take up the entire VMWare Player window, try resizing and then maximizing VMWare Player like below:
From here you have access to all of our available example notebooks:
Once you open a notebook, you can run all the cells by using the Cell menu > Run all. You can also step through each cell and run them individually. Both methods are shown below:
One last quick tip, if you ever want to revert the notebooks back to how they were originally, you can open a terminal, navigate to the python-awips directory and reset the repo, using the following commands (this is assuming you’re starting from a new terminal):
git reset --hard
HEAD is now at 245cfc7 Merge pull request #70 from srcarter3/main
NOTE: The response text may vary, it will change whenever we've made any additional commits to the python-awips repository.
And one last confirmation you can run, is git status, and it should look like this:
# On branch main
nothing to commit, working directory clean
This process is demonstrated below:
We hope this blog helps show how to quickly get you up and running using python-awips in the Linux Virtual Machine we distribute for free download. Once you’ve made it this far, it might be worth your time to check out our Learn Python-AWIPS online training module. If you go through our notebook examples, please also be sure to glance through our previous AWIPS Tips about many of the individual notebooks.
Thanks again for joining us, and check back in two weeks for the next blog post, where we show off the 1 and 5 pane functionality in CAVE.
To view archived blogs, visit the AWIPS Tips blog tag, and get notified of the latest updates from the AWIPS team by signing up for the AWIPS mailing list. Questions or suggestions for the team on future topics? Let us know at email@example.com