Skip to content

yosunemiquela/AGU-python-workshop-2021

 
 

Repository files navigation

Python for Earth Sciences

Instructor: Rebekah Esmaili


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

This code is interactive! Click: 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 the 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). Then copy/paste and hit enter:
      conda install -c conda-forge cartopy
      conda install -c conda-forge netCDF4
      conda install -c conda-forge xarray
      conda install -c conda-forge pygrib
      
    • If there are no errors, then you are set-up!
    • Alternatively, if you are familiar with environments, you can 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 (conda activate python-workshop) once the installation is complete.

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


Reading self describing file


General Python resources

Beginner Tutorials

* Youtube series for absolute beginners [CS Dojo](https://www.youtube.com/watch?v=Z1Yd7upQsXY&list=PLBZBJbE_rGRWeh5mIBhD-hhDwSEDxogDg)

* [Research Software Engineering with Python](https://merely-useful.tech/py-rse/) Free eBook to enhance your workflow.

Intermediate Tutorials

* Last year's workshop, [Python for Earth Science with Rebekah](https://youtube.com/playlist?list=PLlcgQ3Rl-9fR4oOmfeKPKHuk2Lj57bNJy), is available online. I'll upload this one once available.

* [Python for Climate and Meteorology](https://www.youtube.com/watch?v=uQZAEPnUZ5o) Another tutorial taught at AMS, a little more advanced.

* Learn more about [Python for Atmosphere and Ocean Scientists](https://carpentries-lab.github.io/python-aos-lesson/) using Software Carpentry lesson plans.

* [Earth Observation using Python](https://www.wiley.com/en-us/Earth+Observation+using+Python%3A+A+Practical+Programming+Guide-p-9781119606888) is a book I wrote that builds on the content of the workshop.

Acknowledgements

Special thanks to past contributors, Kriti Bhargava and Eviatar Bach!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Python 0.1%