Skip to content
August 16, 2017 / Damien Irving

A PyAOS masterclass

Immediately prior to the joint AMOS / ICSHMO conference in Sydney next February, I’ll be running a one day Python masterclass. The class will be targeted at people who are already using Python in the atmosphere and ocean sciences (i.e. “PyAOS”). They don’t necessarily need to be highly proficient in Python, but a strong familiarity with the syntax and basic constructs such as loops, lists and conditionals (i.e. if statements) is required.

In thinking about what topics to cover at the masterclass, I’ve decided to focus on a suite of programming concepts and best practices that aren’t so easy to glean from a quick Google search. In other words, we aren’t going spend time learning the specifics of how to create a beautiful plot using the iris library or calculate a monthly anomaly timeseries using xarray (although people will be exposed to some of this stuff along the way), because those are things that people can easily look up for themselves (e.g. here and here, in this case).

The basic rationale behind this decision is that the main difference between being an “adequate” and “advanced” Python programmer is not how familiar you are with the specifics of any particular library. Instead, it is your ability to (a) write readable, reusable and testable code, (b) construct workflows that are reproducible, and (c) to understand the scope, strengths and limitations of the scientific Python ecosystem. The latter is important not only for picking the right library for the right job, but also for understanding what is (and isn’t) possible in your data analysis.

Here’s an overview what I’m thinking of teaching at the moment. It’s basically a selection of short tutorials that I’ve written for other audiences over the past few years and lessons taken directly from Software Carpentry. I’m hoping the class will be something of a two-way conversation between myself and the attendees, as I certainly don’t profess to know everything there is to know in this area. Comments are very welcome!

  1. Managing your Python environment with Conda
  2. Interacting with Python: A quick overview of the various Interactive Development Environments and the Jupyter notebook
  3. Introduction to functions and modular code
  4. Version control using Git
  5. A practical data analysis example (which covers data management, data provenance and writing Python scripts that can be executed from the command line)
  6. Debugging and profiling
  7. Testing and defensive programming
  8. Tour of the PyAOS software stack

If time permits (and it probably won’t) I’d probably finish with a lesson on workflow management using Make.

As the AMOS / ICSHMO conference gets closer, I’ll be collating the content above into a complete one-day course for AOS scientists hosted by Data Carpentry. This is a sibling organisation to Software Carpentry that focuses on discipline specific lessons, and I’m hoping that by hosting the materials with them others can use the lessons and collaborate with me on their development into the future.



Leave a Comment
  1. Greg Wilson / Aug 18 2017 20:20

    I think this looks really cool – the only change I’d make would be to show only one tool for coding (probably the Notebook), since you’ll only use one yourself through the rest of the lessons, and it’ll confuse people to have something different on their desktop from what you’re teaching with. Share the lesson repos when you have them? thx

    • Damien Irving / Aug 20 2017 07:55

      Thanks, Greg. Sometime between now and the conference I’ll pull all the materials together into the Data Carpentry repo – will let you know when it’s up 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: