AWIPS Tips: Open Jupyter Notebooks with our Virtual Machine

AWIPS Tips

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:

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:

cd python-awips
conda activate python3-awips
jupyter notebook examples

Activate python environment and open Jupyter notebook examples in Linux Virtual Machine

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:

Resize VMWare Player to force a reset of the display

From here you have access to all of our available example notebooks:

The example notebooks shown in the Jupyter browser.

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:

A demonstration of running cells in a Jupyter notebook.

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):

cd python-awips/
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:

git status
# On branch main
nothing to commit, working directory clean

This process is demonstrated below:

Use git to reset all example notebooks.

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 support-awips@unidata.ucar.edu

This blog was posted in reference to v18.2.1-6 of NSF Unidata AWIPS

Comments:

Post a Comment:
  • HTML Syntax: Allowed
News@Unidata
News and information from the Unidata Program Center
News@Unidata
News and information from the Unidata Program Center

Welcome

FAQs

Developers’ blog

Recent Entries:
Take a poll!

What if we had an ongoing user poll in here?

Browse By Topic
Browse by Topic
« December 2024
SunMonTueWedThuFriSat
2
3
4
5
6
7
8
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today