carpentries-lab / python-aos-lesson

Python for Atmosphere and Ocean Scientists
https://carpentries-lab.github.io/python-aos-lesson/
Other
87 stars 49 forks source link

Add example of zoomed in lat/lon in addition to the global plot #39

Open juliaengdahl opened 3 years ago

juliaengdahl commented 3 years ago

Showing a zoomed in portion of the global map can provide further examples of using cartopy features such as:

  1. using the dataframe.sel(lat=x,lon=y,method='nearest') method to select the lat/lon extent.
  2. resolving the coastlines to cartopy.feature.coastlines('10m'), which will show coastlines at 10m resolution. This is good if you are plotting a specific region.
  3. If zoomed in on the mid Atlantic bight you could use cartopy.feature.STATES to show state lines.

This can be accomplished by doing ax.add_feature(cartopy.feature.STATES) or ax.coastlines('10m').

This is an important aspect for oceanographers because we often analyze data in specific regions, unless the study is specific to global data, and showing these features allows for better interpretation for data location.