Skip to content
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

Update for 2022 workshop #3

Merged
merged 5 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a two-part (morning and afternoon) interactive workshop
on using the Python programming language in the geosciences
to perform data analysis and visualization.
to perform data ingest, analysis, and visualization.
The workshop is a part of the [RECCS][reccs] program at CU Boulder.

This workshop will not teach the details of Python--others have done this (see "Resources" below),
Expand All @@ -11,10 +11,9 @@ The goal of this workshop is to show how working geoscientists
use some of the plentiful scientific libraries available in Python.


## Instructors
## Instructor

* [Mark Piper](https://instaar.colorado.edu/people/mark-piper/)
* Jeffrey Schmidt


## Requirements
Expand All @@ -35,22 +34,21 @@ The morning session runs from 9 am until noon,
with a break around the midpoint.
It covers more basic concepts,
but people with experience using Python
can join and help those with less experience.
can help those with less experience.

*Topics:*

* Introductions
* Why Python?
* Logging in to the CSDMS JupyterHub
* Logging in to the OpenEarthscape JupyterHub
* Using Jupyter Notebook
* Python fundamentals
* Importing Python libraries
* Reading data from a csv file with *pandas*
* Plotting data with *matplotlib*
* Saving work to a PDF file
* Exercises and discussion

:arrow_forward: [Run the workshop material on the CSDMS JupyterHub][nbgitpuller-link]
:arrow_forward: [Run the workshop material on the OpenEarthscape JupyterHub][nbgitpuller-link]

### Afternoon

Expand All @@ -60,14 +58,24 @@ It covers more advanced topics.

*Topics:*

* Introductions
* Loops, conditionals, `try` statement, functions
* Reading data from a NetCDF file with *scipy*
* Analyzing and visualizing data with *Basemap* and *matplotlib*
* Saving work to a PDF file
* Exercises and discussion

:arrow_forward: [Run the workshop material on the CSDMS JupyterHub][nbgitpuller-link]
:arrow_forward: [Run the workshop material on the OpenEarthscape JupyterHub][nbgitpuller-link]

### Extra

Given time,
some additional topics that can be covered.

*Topics:*

* Saving work to a PDF file
* Using shell commands in a terminal
* Anaconda and *conda*
* Using Python modules


## Resources
Expand All @@ -78,12 +86,12 @@ Python:
* The official [Python tutorial][python-tutorial] is somewhat advanced, but has a lot of information
* The [TutorialsPoint Python tutorial][tp-tutorial] is also well done, and perhaps easier to follow
* When I have a Python question, usually someone on [Stack Overflow][stack-overflow] has an answer
* The [CSDMS Ivy][ivy] course material

CU Boulder:
* [Community Surface Dynamics Modeling System (CSDMS)][csdms]
* [Cooperative Institute for Research in Environmental Sciences (CIRES)][cires]
* [EarthLab][earthlab]
* [Earth Surface Processes Institute (ESPIn)][espin] summer school


## Acknowledgments
Expand All @@ -109,8 +117,8 @@ from their website at https://psl.noaa.gov/data/gridded/data.20thC_ReanV2.html.
[csdms-award]: https://nsf.gov/awardsearch/showAward?AWD_ID=1831623
[dc]: https://datacarpentry.org/
[earthlab]: https://earthlab.colorado.edu/
[espin]: https://github.com/csdms/espin
[nbgitpuller-link]: https://csdms.rc.colorado.edu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Freccs-2021&urlpath=tree%2Freccs-2021%2Fnotebooks%2F0_overview.ipynb&branch=main
[ivy]: https://github.com/csdms/ivy
[nbgitpuller-link]: https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Freccs&urlpath=lab%2Ftree%2Freccs%2Fnotebooks%2F0_overview.ipynb%3Fautodecode&branch=main
[python-tutorial]: https://docs.python.org/3/tutorial/
[reccs]: https://cires.colorado.edu/outreach/reccs
[swc]: https://software-carpentry.org/
Expand Down
4 changes: 2 additions & 2 deletions notebooks/6_noaa_cires_reanalysis_temperature_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"import calendar\n",
"import math\n",
"import numpy as np\n",
"from scipy.io import netcdf\n",
"from scipy.io import netcdf_file\n",
"from matplotlib import pyplot as plt\n",
"from mpl_toolkits.basemap import Basemap"
]
Expand Down Expand Up @@ -112,7 +112,7 @@
"\n",
" \"\"\"\n",
" try:\n",
" f = netcdf.netcdf_file(reanalysis_file, 'r', mmap=False)\n",
" f = netcdf_file(reanalysis_file, 'r', mmap=False)\n",
" except IOError:\n",
" print('File \"' + reanalysis_file + '\" cannot be read.')\n",
" return\n",
Expand Down