PyPRECIS icon indicating copy to clipboard operation
PyPRECIS copied to clipboard

Worksheet 3 revisions for v2

Open hsteptoe opened this issue 6 years ago • 4 comments

To do list for changes to Worksheets 2a & 2b for v2 release.

hsteptoe avatar Nov 09 '18 09:11 hsteptoe

  • [ ] More formative assessment questions are needed, especially in 2b.
  • [ ] Do we need separate learning objectives for worksheet 2b? Or are they the same as for 2a (this is what we've currently decided)
  • [ ] Think through the purpose and learning points of 2.11 (in 2.b). Why is it useful?

hsteptoe avatar Nov 09 '18 09:11 hsteptoe

Add notebook widgets to help explore rotated poles:

import matplotlib.pyplot as plt
import cartopy.crs as ccrs
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets

def plotrp(pole_lat, pole_lon):
    rotated_pole = ccrs.RotatedPole(pole_longitude=pole_lon, pole_latitude=pole_lat)

    box_top = 30
    x, y = [-44, -44, 45, 45, -44], [-45, box_top, box_top, -45, -45]

    fig = plt.figure(figsize=(20,10))

    ax = fig.add_subplot(1, 2, 1, projection=rotated_pole)
    ax.stock_img()
    ax.coastlines()
    ax.plot(x, y, marker='o', transform=rotated_pole)
    ax.fill(x, y, color='coral', transform=rotated_pole, alpha=0.4)
    ax.gridlines()

    ax = fig.add_subplot(1, 2, 2, projection=ccrs.PlateCarree())
    ax.stock_img()
    ax.coastlines()
    ax.plot(x, y, marker='o', transform=rotated_pole)
    ax.fill(x, y, transform=rotated_pole, color='coral', alpha=0.4)
    ax.gridlines()
    plt.show()

# def on_button_click(a):
#     plotrp(pole_lat.value, pole_lon.value)
    
# pole_lat = widgets.IntSlider(value=45, min=0, max=90, step=1, description='Pole Latitude')
# pole_lon = widgets.IntSlider(value=180, min=0, max=360, step=1, description='Pole Longitude')
# display(pole_lat)
# display(pole_lon)

# button = widgets.Button(description="Plot")
# display(button)
# button.on_click(on_button_click)

interact_manual(plotrp, pole_lat=widgets.IntSlider(value=45, min=0, max=90, step=1, description='Pole Latitude'), 
                        pole_lon=widgets.IntSlider(value=180, min=0, max=360, step=1, description='Pole Longitude'))

hsteptoe avatar Jan 11 '19 14:01 hsteptoe

Add figure to help explain why we need to weight latitudes when finding areas averages

hsteptoe avatar Jan 15 '19 10:01 hsteptoe

this probably needs a review since the updates to use CORDEX data

nhsavage avatar Jul 25 '23 15:07 nhsavage