This is a two-part (morning and afternoon) interactive workshop on using the Python programming language to perform data ingest, analysis, and visualization. The workshop is a part of the RECCS program at CU Boulder.
The workshop will not teach the details of Python--others have done this (see "Resources" below), and it takes more time than we have. The goal of this workshop is to show how a working geoscientist might use some of the plentiful scientific libraries available in Python.
- Computer
- Web browser
- Internet access
- Coffee (optional, but recommended)
The workshop is divided into morning and afternoon sessions.
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 help those with less experience.
Topics:
- Introductions
- Why Python?
- Logging in to EarthscapeHub
- Using Jupyter Notebook
- Python fundamentals
- Importing Python libraries
- Reading data from a csv file with pandas
- Exercises and discussion
The afternoon session runs from 1 pm until 4 pm, with a break around the midpoint. It covers more advanced topics.
Topics:
- Loops, conditionals,
try
statement, functions - Reading data from a NetCDF file with scipy
- Analyzing and visualizing data with Basemap and matplotlib
- Exercises and discussion
Given time, some additional topics that can be covered.
Topics:
- Exporting a notebook to a PDF file
- Using shell commands in a terminal
- Anaconda and conda
- Using Python modules
Python:
- Software Carpentry, especially the Programming with Python lesson
- Data Carpentry
- The official Python tutorial is somewhat advanced, but has a lot of information
- The TutorialsPoint Python tutorial is also well done, and perhaps easier to follow
- When I have a Python question, usually someone on Stack Overflow has an answer
- The Matplotlib Gallery
- The CSDMS Ivy course material
CU Boulder:
- Community Surface Dynamics Modeling System (CSDMS)
- Cooperative Institute for Research in Environmental Sciences (CIRES)
- Institute for Arctic and Alpine Research (INSTAAR)
CSDMS is supported by the National Science Foundation under Award No. 1831623, Community Facility Support: The Community Surface Dynamics Modeling System (CSDMS).
Portions of the Python language fundamentals section were derived from material that is copyright Software Carpentry and remixed under their license.
NEON (National Ecological Observatory Network). 2D wind speed and direction (DP1.00001.001). https://data.neonscience.org (accessed May 26, 2021)
20th Century Reanalysis V2 data provided by the NOAA/OAR/ESRL PSL, Boulder, Colorado, USA, from their website at https://psl.noaa.gov/data/gridded/data.20thC_ReanV2.html.