Week 5 overview
Announcements¶
HW1: Due End of Day, Tuesday September 9/30¶
Class Website as a virtual textbook¶
Treat the fully-rendered notebooks as the “notebooks of record” for the class!
They will continually be updated for fixes and clarity.
In some cases, e.g. the NLDN notebook, you can interact with the content in your web browser.
Great Resource for Python and Pandas: Python for Data Analysis (W. Mckinney)¶
Kevin has a couple of physical copies available to borrow!
Learning Objectives:¶
- Git and GitHub continued
- Gridded datasets
- Intro to Xarray
Learning and Participation Activities with Due Dates (Tuesday, Sep. 30, end of day):¶
In class, Tuesday 9/23¶
Git and GitHub continued
a. Access the class Jupyterhub server on Turing
b. In the Launcher, open up a Terminal session
c. cd to your
atm533folder:cd /spare11/atm533/<YourNetID>d. Type
git clone git@github.com:DAES433533/week5f. You should then have a
week5folder visible in youratm533directory, which contains one Jupyter notebook and a README.g. Create and check out a development branch for your Week 5 clone:
git checkout -b dev
h. Follow along with the Git and GitHub activites demonstrated in class.
Intro to Xarray
Follow along with the Intro to Xarray notebook.
On your own:¶
Attempt the suggested things to try at the end of the Intro to Xarray notebook.
Stage and commit your revisions on your dev branch.
When notified, pull updates to the origin repository to your main branch:
Very important: While still on your dev branch, run a
git status. If necessary, stage and commit your revisions on your dev branch.Check out the main branch:
git checkout mainPull from the upstream repo:
git pull origin mainVerify that the contents of your directory have changed (type
ls -lin your terminal in yourweek5folder)Check out the dev branch again:
git checkout devCheck out any files that exist in your main branch but not in your dev branch: type:
git checkout main -- .Run
git statusagain. You should see that there is the02_Xarray_Computation_Masking.ipynbready to be staged.Type
git add 02_Xarray_Computation_Masking.ipynb.Type
git commit -m "Added 2nd Xarray notebook".At this point (confirm with
git status!), you should now have the 2nd Xarray notebook in yourdevbranch.Continue with exploring and then copying/further developing the notebooks you are working on, while also trying the new Xarray notebook.
As you play around, continue to periodically run
git addandgit commit.Moral of the story: Always work on your
devbranch! Next week we will learn how to merge yourdevbranch into yourmainbranch.