Week notes#
Week 1#
Getting started#
Some of our satellites#
Installing python on your laptop#
Do for Wednesday’s class:#
Sign up for piazza using the link on canvas
Read my extra notes on the material covered on pp. 38-39: Beers and inverse squared laws
Day 2 Wednesday#
Learning objectives
Explain the relationship between the monochromatic radiance and the monochromatic irradiance
Why are both variables necessary?
How would you measure them with a satellite radiometer?
Reading: Beers and inverse squared laws and Solid angle and radiance
Do for Friday’s class#
Read
All of Beers and inverse squared laws and Solid angle and radiance
Stull pp. 34-43
WH Chapter 4 pp. 113-118
Day 3 Friday#
Note syllabus change: Midterm is now Monday, Feb. 24 – ATSC 301: syllabus
Do for Monday#
Read Wallace and Hobbs Section 4.3
Download and run Plotting the Planck function with python and modify it to reproduce Wallace and Hobbs Figure 4.6
Week 2#
Day 4 Monday#
Select office hours – 11am Wed?
Go over Week 1
Get accounts on the NASA earthdata website
Do for Wednesday#
Finish reading Wallace and Hobbs Section 4.3
For Assignment 1 (posted this evening, do next Tuesday at 5 pm)
Unwrap the Planck function for temperature T and code this in Python. That is, given W&H equation 4.4:
\[ B_\lambda(T)=\frac{c_1 \lambda^{-5}}{\pi\left(e^{c_2 / \lambda T}-1\right)} \]Solve for the “brightness temperature” \(T_b\) such that, given a radiance \(I_\lambda\):
\[ B_\lambda(T_b) = I_\lambda \]i.e. find the temperature that a black body would need to have to emit \(I_\lambda\) at wavelength \(\lambda\)
Check your work by “round tripping” – find the radiance at a temperture \(T\) using the Planck function, then insert that temperture into your brightness temperature function to make sure you get back that radiance.
Day 5 Wednesday#
Review/Announcements#
Assignment 1, brightness temperatures is posted on canvas, due Tuesday, Jan 21 at 5pm
Review: \(\cos \theta\) for stream flow
Today we shift from radiation to mapping, and cover some notebooks about the use of the cartopy mapping package.
Making maps#
Reading for Friday: Chapters 1 and 2 of Understanding map projections
In class: Introduction to Cartopy
In class: Mapping Vancouver with cartopy
[download folder](
Do for Friday#
Read Chapters 1 and 2 of Understanding map projections
Finish Introduction to Cartopy and Mapping Vancouver with cartopy
Day 6 Friday#
Go over how to use rioxarray to plot a Landsat/Sentinel image of your choice: The notebook: Landsat 1: Dowloading Landsat and Sentinel data from NASA
Do for Monday#
Download a band 4 (red) tif file for your scene
Week 3#
Day 7 Monday#
Put an image on a map with Mapping the landsat scene
Do for Wednesday#
New consolidated review page started at Weekly review
start on Assignment 2
Review Wallace and Hobbs Section 4.3.5 and 4.3.6 on Kirchoff’s law and the greenhouse effect
Read Wallace and Hobbs Section 4.4
Day 8 Wednesday#
Fixed the bug in Bug: don’t hardcode the dimensions
New notebook on clipping an image region: Zooming an image
In-class worksheet: Kirchoff worksheet
Do for Friday#
Clip an interesting region and make sure your coastlines are correct
Write the region to a new geotiff
Read Wallace and Hobbs Section 4.5
Day 9 Friday#
I’ve added the rioxarray
to_rasterexample to show how to write a geotif with rioxarray in Zooming an imageDo the Kirchoff worksheet
Go over Optical depth and partial transmission with the setup for Wallace and Hobbs Problem 4.39
Do for Monday#
Finish Assignment 1
Write out clipped geotifs for your band 4 and band 5 images
Week 4#
Day 10 Monday#
More on optical depth: linking the mean free path to \(\tau = 1\)
New notebook – how to write several clipped images given a bounding box
Assignment 3 due next Tuesday midnight
Do for Wednesday#
Do Wallace and Hobbs problem 4.44 with pencil and paper
Start on Assignment 3
Read Wallace and Hobbs through p. 133
Day 11 Wednesday#
Discussion: what happened to \(\cos \theta\) in problem 4.31?:
\[ d E=\pi r^2 I d \omega \]If you’re interested/motivated, try pixi install for macos and windows
Finish: Optical depth II: mean free path
Finish: Clipping multiple bands– v0.3
In-class coding:
Write a function with the following signature:
def find_latlon(geotiff,column,row): ''' Given the path to a geotiff file, use the geotiff crs and affine transform to return the longitude and latitude of the center of the pixel at (row, column) Parameters ---------- geotiff: pathlib.Path path to a local geotiff file row: float row of the pixel in the raster column: float column of the pixel in the raster Returns ------- lonlat: (float, float) longitude and latitude of the pixel center
Do for Friday#
Test find_latlon on one of your clipped images
Read WH through p. 132 – especially eq. 4.37
Day 12 Friday#
Introduce code snippets by notebook
Finish
find_latlon
Do for Monday#
Work on Assignment 3
As part of assignment 4, we’ll write a
clip_imagefunction which takes a geotiff and a bounding box and writes out a clipped geotiff
Week 5#
Day 13 Monday#
Note the new Sample mid-term questions I
Go over Assignment 2: solutions part B
My version of Getting lat,lon from row, column
Do for Wednesday#
Read Stull Chapter 8 pp. 219-226 together with:
work on your version of
clip_image. We want it to take a geotiff and two slice objects (desired rows and columns) and write a new, smaller geotiff with the raster selected using those two slices.
Day 14 Wednesday#
Topics:
Assignment 4 due midnight next Wednesday
In-class: Sample mid-term questions I problem A.1 and A.2
Continue with The Schwartzchild Equation
Day 15 Friday#
Introduce Midterm review questions II
Go over Wallace and Hobbs Figure 4.24 – Beer’s law
Continue with The Schwartzchild Equation
Do for Monday#
Work on Assignment 4 and other midterm practice problems
Upload assignment 3 fixed images if you were having cartopy problems
Week 6#
Day 16 Monday#
Do for Wednesday#
Work on Assignment 4 and other midterm practice problems
Day 17 Wednesday#
Assignment 4 questions
Midterm review questions
Do for Friday#
Midterm review
Day 18 Friday#
Week 7#
Day 19 Monday#
mid-term
Day 20 Wednesday#
Went over
Do for Friday#
Read Stull Chapter 8 through p. 239
Start on Assignment 5a due Friday March 7:
Write a function that takes 3 tif files and returns a rioxarray false color image. Use it to make a band 5,4,3 false color png file of your scene and upload the ipynb file
Day 21 Friday#
New version of Clipping multiple bands– v0.3 that correctly saves the channel data as floating point numbers. You’ll need to rewrite your
clip_imagefunction using the approach of version 0.2 of the notebook in the week4 folder: see Create new clipped arraysNew notebook: Using fmask to mask water pixels
the Fmask algorithm
Do for Monday#
Assignment 5b due Friday March 7
Write a function that takes an image and its fmask and returns a new image with all cloudy pixels set to np.nan. Make a notebook that uses this function to plot a partly cloudy scene.
Day 23 Monday#
Week 8#
Day 24 Wednesday#
Do for Friday#
Read Stull Chapter 8 through p. 248 on weather radar
Day 25 Friday#
New Combining goes and landsat data using rioxarray with bug fixed
New v0.2 of a301_lib.py
For Monday#
Work on Assignment 6
Read Notes on the radar equation along with the Stull weather radar pages
Week 9#
Day 26 Monday#
Working with bounding boxes
A land classification dataset
More on the Schwartzchild equation: the diffuse flux approximation
For Wednesday#
Get the land cover tif for your Landsat region
work on Assignment 6
Read:
Day 27 Wednesday#
Github part 1: ssh keys#
You need to be able to pull and push files from your computer to the github server. Github does this using public key cryptography
log onto your github acount
clone a301_lib
open a terminal and generate an ssh key named a301key by doing:
ssh-keygen -f a301keymove both your private key (a301key) and your public key (a301key.pub) into ~/.ssh
upload the a301key.pub to github following their instructions
download the ssh config file from our gdrive installation folder
if
~/.ssh/configexists, add the lines from the gdrive file to your config fileif you don’t have an ssh config, copy the gdrive config file to
~/.sshtest your keys by doing:
ssh a301git
clone the
a301_librepository by doing
cd ~/repos
git clone a301git:youraccountname/a301_lib
Day 28 Friday#
Github part 2: packages#
log into your github account
fork phaustin/a301_extras
git clone a301git:youraccountname/a301_extras
checkout a working branch with your initials (mine are pha)
git checkoout -b pha
install with
pip install -e . --upgrade
test with
python test_imports.py
add a new python file with your functions to the src/ folder
commit it to git with
git add src/newfile.py git commit -am 'added new function' git push
For Monday#
Read Stull through p. 255 on Doppler radar
Week 10#
Day 29 Monday#
Continue with false color notebook
Working with google Collab and Gemini – class demo#
Assignment 7 – due Monday March24 at midnight#
For Wednesday#
Read the NOAA Doppler notes through page 3.20
Day 30 Wednesday#
Assignment 6 solutions#
Github part 3: merging changes from upstream (revised from Monday)#
To get the new changes from my repository: phaustin/a301_extras.git you need
to add it to the list of repositories you can pull code from. By tradition, your own remote github
repository is called origin and the main remote repository that is the source of official releases is
called upstream.
To add a remote repository:
First verify your remote is correct
cd
~/repos/a301_extrasgit remote -vv
This should print something like:
origin yourgithubid:yourgithubid/a301_extras (fetch) origin yourgithubid:yourgithubid/a301_extras (push)
Next, add my repository as a remote
git remote add upstream https://github.com/phaustin/a301_extras.git
git remote -vv
Now this should print
origin yourgithubid:yourgithubid/a301_extras (fetch) origin yourgithubid:yourgithubid/a301_extras (push) upstream https://github.com/phaustin/a301_extras.git (fetch) upstream https://github.com/phaustin/a301_extras.git (push)
make sure you’re on your own main branch
git branchshows an asterisk next to your current branchgit branch -alists both local and remote branches.git branch -vv(for “very verbose”) shows your current commitsgit remote -vvshows where your origin branch is on github.
move to your main branch
git checkout main git branch -a
which should print out all your branches
fetch the changes I’ve made to the official main branch on upstream
git fetch upstream
update your main branch with my changes using rebase
git rebase upstream/main
push your new rebased main to your github remote
git push git branch -vv
which should show you your updated local branch
you’ll need to continue working on your personal branch (which we named with your initials), rebase it on the new main branch
git checkout yourinitials git rebase origin/main git push git branch -vv
On github you should see a new week10 folder on your personal branch that should look like mine:
phaustin/a301_extras – you’ll be able to edit and track changes in this notebook on collab
If instead you are done with your personal branch, delete it from github and delete it from your local repository
git push -d origin yourinitials git checkout main git branch -d yourinitials git branch -vv
Github and Collab#
To edit my week10 Collab notebook first log into collab:
click on
open collaband then from thefiledropdown click onopen notebookclick on the github tab, and enter your github username
select the
a301_extrasrepository, and your personal branchselect
read_landsat_ee.ipynbnow any changes you save will appear as github commits to this file
Alternatively, you could copy the file to your google drive, or upload it, but then you couldn’t track/recover changes
work through read_landsat_ee.ipynb
Doppler notes#
Two short reviews on phase and the unit circle
Read for Friday#
my doppler notes (note my disagreement with Stull Figure 8.32, which doesn’t show a phase shift in the reflected wave. See slide 6 of these slides. It won’t matter for pulse-pair doppler radar however, because we are comparing two pulses that have both been reflected off of water drops.
Day 31 Friday#
Important concepts from Stull 8.3.1 and 8.3.2
Size of radar sample volume
Maximum unambiguous range (MUR)
Z-RR relationship
Radar equation
bright band
Review my Notes on the radar equation questions
Review my doppler notes
Compare the Nexrad radar (700,000 Watts, 8.5 meter diameter dish) with the Earthcare satellite
Do for Monday#
Finish - Assignment 7
Week 11#
Day 32 Monday#
Do for Wednesday#
Start on the Assignment 8 doppler problem using the NOAA Doppler notes
Day 33 Wednesday#
Go over how to approach the the Assignment 8 doppler problem using the first guess/second guess phasor discussion from the NOAA Doppler notes
Introduce the earthcare cases: Reading earthcare level1b data
Do for Friday#
Use code in the Combining goes and landsat data using rioxarray notebook to find a GOES 16 image that is taken as close as possible to your earthcare radar segment. Plot the truecolor image using the goes2go rgb module, clip it to a reasonable lat, lon square and overlay your earthcare groundtrack
Day 34 Friday#
Week 12#
Day 35 Monday#
Day 36 Wednesday#
Day 37 Friday#
FYI: Interesting links we didn’t have time for
Go over 2014 final solutions
For Monday#
Send me an email on canvas with your preferred start day and time for your 4 day window. Needs to be between Monday April 7 and Tuesday April 15.
Week 13#
Go over Assignment 8 doppler solution
Go over Assignment 8 solution
Added the 2010 final exam
do by Wednesday#
hand in your update Assignment 8 part b satellite notebook for partial credit (and to get ready for the takehome exam)
send me your start time for the takehome via canvas email
do before final#
post your solutions to final exam practice questions on piazza