Skip to content

modern-tools-workshop/AGU-python-workshop-2022

Repository files navigation

Python for Earth Sciences

Instructor: Rebekah Esmaili, PhD


A crash course in Python focusing on reading and visualizing data-sets used in Earth sciences.

This code is interactive! Click here: Binder


Getting Started

This workshop will cover:

  • Launching Jupyter Notebooks
  • Working with arrays using the Numpy package
  • Importing text datasets using the Pandas package
  • Creating simple graphics with Matplotlib
  • Importing scientific data formats, such as netCDF and GRIB2
  • Creating maps from datasets

Installation Requirements

"I am really new to Python!"

  • I recommend launching binder, which is a "cloud version" of this course. No installation required! Binder
    • Need help with Binder? Video tutorial on YouTube.

"I have used Python before!"

  • If you wish to run the examples locally, I recommend installing Anaconda. If you are having trouble with your installation, contact the instructor before the course or use binder.
    • Need help installing Anaconda? Video tutorial on YouTube.
  • Download the contents of this GitHub repository to your computer.
  • Launch Jupyter Notebooks from the Anaconda Navigator. This will open a window in your default browser. Navigate to the folder that contains the notebooks (*.ipynb) and click on the tutorial for the day.
    • New to Jupyter? Here's a video tutorial on YouTube.
  • Additional packages:
    • Launch the Anaconda Prompt (Windows) or Terminal (MacOS/Linux).

    • Use the environments.yml to install the necessary packages. You can do this in the terminal using:

      conda env create -f environment.yml
    • Then, switch to the new environment once the installation is complete:

      conda activate python-workshop
    • Note: The default environment is called 'base.' If you close the terminal, you will have to switch back to the environment using the above command again.

I do not recommend:

  • Using Python on a remote server for this tutorial (I cannot help troubleshoot)
  • Using your operating system's Python or a shared Python installations unless you are advanced!

Course Philosophy

  • Increase accessibility of satellite data and analysis
  • Teach Python using practical examples and real-world datasets
  • Promote reproducible and transparent scientific research

Resources

Packages and Tutorials

Pandas


Matplotlib


Import/Export

NetCDF files

HDF files

GRIB/GRIB2 files

BUFR files

  • Another common table-driven format.
  • Open with python-bufr, part of the pytroll project.

General Python Resources

Beginner Tutorials

Intermediate Tutorials

Granting Permission for Reuse

These course materials are designed for use as part of the AGU Scientific Workshop and are the intellectual property of the instructor. However, I encourage others to reuse or adapt the material for their research communities or use cases. If you do not significantly modify the original material, please send me an email letting me know and acknowledge me in your content.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published