-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worksheet 3 revisions for v2 #24
Labels
Comments
hsteptoe
changed the title
Changes to Worksheet 2a/b for v2 release.
Worksheet 2a/b revisions for v2.0
Nov 9, 2018
hsteptoe
changed the title
Worksheet 2a/b revisions for v2.0
Worksheet 2a/b revisions for v2
Nov 9, 2018
|
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')) |
Add figure to help explain why we need to weight latitudes when finding areas averages |
hsteptoe
changed the title
Worksheet 2a/b revisions for v2
Worksheet 3 revisions for v2
Jan 15, 2019
this probably needs a review since the updates to use CORDEX data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To do list for changes to Worksheets 2a & 2b for v2 release.
The text was updated successfully, but these errors were encountered: