SlideShare a Scribd company logo
ENVIRONMENTAL
SCIENCE
DIVISION
PYTHON IN THE ATMOSPHERIC AND OCEANOGRAPHIC
SCIENCES… AND WHY YOU SHOULD CARE
SCOTT COLLIS
Python Nerd
Argonne National Laboratory and
Northwestern University
Name of Facility, Division, etc
ENVIRONMENTAL SCIENCE DIVISION
Snakes and people….
 I might be rehashing a little of what
you know…
 I want to give some perspective of
why the Python programming
language is “Special”.
 Provide some context of my own
journey into open source community
code.
 Perhaps indoctrinate a few of you into
a cult.
THIS TALK….
ENVIRONMENTAL SCIENCE DIVISION
 I did a PhD in Physics, in a lab setting. I made
heavy use of IDL and FORTRAN.
 Lived near the mountains so made a hobby of
using model output to pick the best day to go
skiing (my PhD took some time…).
 Made my hobby my profession joining the
Australian Bureau of Meteorology as a
forecaster in 2007. No IDL license meant I
taught myself Python.
 Really got into it when I had to design retrieval
systems for DOE-ARM at Argonne National
Laboratory.
MY PYTHON JOURNEY
ENVIRONMENTAL SCIENCE DIVISION
A language built on the philosophy of readability.
 Python is an interpreted, object-oriented,
high-level programming language.
 Its high-level built in data structures,
combined with dynamic typing and
dynamic binding, make it very attractive
for Rapid Application Development, as well
as for use as a scripting or glue language
to connect existing components together.
 Python's simple, easy to learn syntax
emphasizes readability and therefore
reduces the cost of program maintenance.
WHAT IS PYTHON?
ENVIRONMENTAL SCIENCE DIVISION
Python is so ubiquitous it tends to be the go-to scripting language
 As the Python ecosystem has grown
and due to the readability, openness
and ubiquities of the language.
 If it can’t be done in a shell script
Python is the natural next step.
 In terms of data analytics it has seen
a particularly dramatic uptake in the
financial sector.
WHERE IS PYTHON USED?
https://www.capitalone.com/tech/software-engineering/building-python-user-
community-among-capital-ones-data-analysts/
ENVIRONMENTAL SCIENCE DIVISION
Sustainable Software Engineering. Things for your CV
 Version Control. Learn Git.
 Social coding. Git and VC is the first
step.. There is a culture to pull
requests etc.. And then there is
GitHub and Bitbucket which exposes
your code to the community and
allows interaction.
 Test Driven Design and unit testing.
Ideally write the test before the
code… ideally…
 Continuous integration and family..
SO I USE PYTHON? WHAT ELSE DO I NEED TO
BE AWESOME?
ENVIRONMENTAL SCIENCE DIVISION
Python is Python.. Needs modules.
 Just firing up Python only gives
you the core modules. Python is
not a scientific programming
language.
 Scientific Python is the term given
to the ecosystem of packages
enabling science in Python.
 The modularity and namespace
abilities of Python allows users
and developers to “roll their own”
stack.
SCIENTIFIC PYTHON STACK
ENVIRONMENTAL SCIENCE DIVISION
Master the art of vectorization!
 At the core of Numpy (nee Numerical
Python) is a powerful array object.
 This builds on Python’s List object but
endows it with some highly optimized
computations under the hood in C.
 Avoid loops in Numpy! If you can
break down your code into a series of
array operations things can be nice
and fast.
 MASSIVE community effort.
NUMPY – MAKES PYTHON FAST
ENVIRONMENTAL SCIENCE DIVISION
Highly customizable publication quality graphics.
 Matplotlib is a highly scriptable
comprehensive library for creating
plots and visualizations.
 Acts as a backbone to many other
libraries! Can take some wrestling to
get what you want due to the focus on
flexibility.
 Great fonts.
 Recent focus on CVD friendly
colormaps.
MATPLOTLIB – MAKES PYTHON PRETTY
ENVIRONMENTAL SCIENCE DIVISION
Highly customizable publication quality graphics.
 Matplotlib is a highly scriptable
comprehensive library for creating
plots and visualizations.
 Acts as a backbone to many other
libraries! Can take some wrestling to
get what you want due to the focus on
flexibility.
 Great fonts.
 Recent focus on CVD friendly
colormaps.
MATPLOTLIB – MAKES PYTHON PRETTY
ENVIRONMENTAL SCIENCE DIVISION
Master the art of the GroupBy!
 Pandas adds some smarts to the
array object.
 It works with ”labels”.
 Great for time series analysis.
 Great for data exploration with
visualization methods built in.
 Gateway for those who have used
Stata, S and R.
PANDAS – MAKES PYTHON SMART
ENVIRONMENTAL SCIENCE DIVISION
N-Dimensional labelled arrays!
 Xarray makes n-dimensional arrays
label aware.
 This is extremely useful for CF
compliant data files. Xarray can
detect axes and slicing becomes
intuitive and code becomes readable.
 Easy bindings to Matplotlib and
cartopy.
XARRAY – MAKES PYTHON AWESOME
ENVIRONMENTAL SCIENCE DIVISION
By Scientists, for Scientists.
 The Atmospheric and Oceanic
community have really come together
to build a AOS specific stack.
 This includes Radar, Meteorology,
Satellite, retrievals, visualization R2O
(eg scheduling) etc…
 Yearly symposium at the AMS annual
meeting. Abstracts OPEN!
PY-AOS ECOSYSTEM
ENVIRONMENTAL SCIENCE DIVISION
It is what it says! Python
for Meteorologists.
 Loaded with great meteorological
goodness. Lots of calculations etc…
 Great mapping… Layer on top of
cartopy.
 Aims to replace Gempack.
METPY
ENVIRONMENTAL SCIENCE DIVISION 15
Philosophy: It’s all about the data model.
https://github.com/ARM-DOE/pyart
 Py-ART’s central core is a data model for gated
data with pointing information.
 Py-ART created a way of representing radar
data in the Python programming language that
mirrors the CF-Radial standard.
 Py-ART has a cloud functions to correct,
retrieve and grid radar data.
 By keeping a limited scope Py-ART aims to “do
less better”.
 There is now a rich ecosystem of packages
that interact: ART-View, CSU tools, PyTDA,
Multidop to name a few. Oh and we are working
on TINT!
THE PYTHON ARM RADAR TOOLKIT
Animation courtesy of users Marcus van Lier-Walqui
and Sara E. Lytle
Data: Andrei Lindenmaeir – ARM Mentor
Python in the Atmospheric sciences
ENVIRONMENTAL SCIENCE DIVISION
The power of community software.. But, you need standards, unit testing and
continuous integration.
Only scollis, jjhelmus, zssherman, rcjackson and rumpkie
have received ARM funds. The other 28 have not…
ENVIRONMENTAL SCIENCE DIVISION
We are all in this together…
 Python efforts in Radar Meteorology nucleated
in parallel in Europe and the USA.
 In addition the long standing TITAN software
cloud received NSF support for a modernization
surge.
 A short course at ERAD 2014 led to a co-written
paper which lead to a rotating course between
ERAD and the AMS radar conference.
 We now have a web presence and a growing
ecosystem of identified packages.
OPEN RADAR PARTNERSHIP
ENVIRONMENTAL SCIENCE DIVISION
2014 Germany2016
Turkey
2018 Netherlands
2017 Chicago
2018 Melbourne
2019 Melbourne
2019 Japan
2015 Oklahoma
ENVIRONMENTAL SCIENCE DIVISION
PyDDA, RainyMotion,
CSU Radar Tools… etc…
AND MORE…
ENVIRONMENTAL SCIENCE DIVISION
Python is the community
the breaks down the barriers
between domains.
 Python is a programming language.
 Scientific Python and the Py-AOS
stack represents the sum of the
knowledge given by those who have
been kind enough to work on them.
 Using Python is great and a great
way of increasing your employability.
 Developing Python is better and will
all but ensure you get a job 
SO, IN THE END, WHAT IS PYTHON?
ENVIRONMENTAL SCIENCE DIVISION
FINAL WORDS OF ADVICE….
ENVIRONMENTAL SCIENCE DIVISION
THANK YOU FOR YOUR TIME
– scollis@anl.gov - Email
– cyclogenesis_au -Twitter
– scollis – GitHub

More Related Content

PDF
VO web-services-based astronomy workflows
PPTX
Virtual Science in the Cloud
PDF
Scientific Applications with Python
PPTX
What is Python? An overview of Python for science.
PPTX
Overview
PDF
A Whirlwind Tour Of Python
PDF
Data Analysis Python For Environmental Science Hayden Van Der Post
PDF
Esri International User Conference 2011: Python: Integrating Standard and Thi...
VO web-services-based astronomy workflows
Virtual Science in the Cloud
Scientific Applications with Python
What is Python? An overview of Python for science.
Overview
A Whirlwind Tour Of Python
Data Analysis Python For Environmental Science Hayden Van Der Post
Esri International User Conference 2011: Python: Integrating Standard and Thi...

Similar to Python in the Atmospheric sciences (20)

PDF
Scientific Programming in Python
PDF
London level39
PPTX
Python Awareness for Exploration and Production Students and Professionals
PDF
Lec-1-Introduction to Python.pdf gla University
PDF
A Comprehensive Overview of Python in Real-World Scenarios
PDF
RDM 2020: Python, Numpy, and Pandas
PPTX
Python in geospatial analysis
PDF
Travis Oliphant "Python for Speed, Scale, and Science"
PDF
Samsung SDS OpeniT - The possibility of Python
PPTX
Introduction to python history and platforms
PDF
Why Learning Python is Essential for Computer Science.pdf
PDF
Introduction to Python Syntax and Semantics
PPTX
First of all, what is Python? According t
PDF
Python Programming and GIS
PDF
Python in Industry
PDF
Enviropy Environmental Science With Python Van Der Post Hayden
PDF
Exploring and Using the Python Ecosystem
PDF
Python in Scientific Computing.pdf
PDF
IRJET- Why Python Rocks for Research....???
PDF
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Scientific Programming in Python
London level39
Python Awareness for Exploration and Production Students and Professionals
Lec-1-Introduction to Python.pdf gla University
A Comprehensive Overview of Python in Real-World Scenarios
RDM 2020: Python, Numpy, and Pandas
Python in geospatial analysis
Travis Oliphant "Python for Speed, Scale, and Science"
Samsung SDS OpeniT - The possibility of Python
Introduction to python history and platforms
Why Learning Python is Essential for Computer Science.pdf
Introduction to Python Syntax and Semantics
First of all, what is Python? According t
Python Programming and GIS
Python in Industry
Enviropy Environmental Science With Python Van Der Post Hayden
Exploring and Using the Python Ecosystem
Python in Scientific Computing.pdf
IRJET- Why Python Rocks for Research....???
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Ad

Recently uploaded (20)

PPTX
Taita Taveta Laboratory Technician Workshop Presentation.pptx
PPTX
Comparative Structure of Integument in Vertebrates.pptx
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PPTX
microscope-Lecturecjchchchchcuvuvhc.pptx
PDF
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PDF
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
PDF
Sciences of Europe No 170 (2025)
PDF
bbec55_b34400a7914c42429908233dbd381773.pdf
PDF
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
PPTX
7. General Toxicologyfor clinical phrmacy.pptx
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPTX
2. Earth - The Living Planet earth and life
PDF
Phytochemical Investigation of Miliusa longipes.pdf
PPTX
INTRODUCTION TO EVS | Concept of sustainability
PPTX
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
PDF
HPLC-PPT.docx high performance liquid chromatography
PDF
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
PPTX
Microbiology with diagram medical studies .pptx
PPTX
Introduction to Fisheries Biotechnology_Lesson 1.pptx
Taita Taveta Laboratory Technician Workshop Presentation.pptx
Comparative Structure of Integument in Vertebrates.pptx
Biophysics 2.pdffffffffffffffffffffffffff
microscope-Lecturecjchchchchcuvuvhc.pptx
CAPERS-LRD-z9:AGas-enshroudedLittleRedDotHostingaBroad-lineActive GalacticNuc...
TOTAL hIP ARTHROPLASTY Presentation.pptx
ELS_Q1_Module-11_Formation-of-Rock-Layers_v2.pdf
Sciences of Europe No 170 (2025)
bbec55_b34400a7914c42429908233dbd381773.pdf
Unveiling a 36 billion solar mass black hole at the centre of the Cosmic Hors...
7. General Toxicologyfor clinical phrmacy.pptx
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
2. Earth - The Living Planet earth and life
Phytochemical Investigation of Miliusa longipes.pdf
INTRODUCTION TO EVS | Concept of sustainability
G5Q1W8 PPT SCIENCE.pptx 2025-2026 GRADE 5
HPLC-PPT.docx high performance liquid chromatography
Formation of Supersonic Turbulence in the Primordial Star-forming Cloud
Microbiology with diagram medical studies .pptx
Introduction to Fisheries Biotechnology_Lesson 1.pptx
Ad

Python in the Atmospheric sciences

  • 1. ENVIRONMENTAL SCIENCE DIVISION PYTHON IN THE ATMOSPHERIC AND OCEANOGRAPHIC SCIENCES… AND WHY YOU SHOULD CARE SCOTT COLLIS Python Nerd Argonne National Laboratory and Northwestern University Name of Facility, Division, etc
  • 2. ENVIRONMENTAL SCIENCE DIVISION Snakes and people….  I might be rehashing a little of what you know…  I want to give some perspective of why the Python programming language is “Special”.  Provide some context of my own journey into open source community code.  Perhaps indoctrinate a few of you into a cult. THIS TALK….
  • 3. ENVIRONMENTAL SCIENCE DIVISION  I did a PhD in Physics, in a lab setting. I made heavy use of IDL and FORTRAN.  Lived near the mountains so made a hobby of using model output to pick the best day to go skiing (my PhD took some time…).  Made my hobby my profession joining the Australian Bureau of Meteorology as a forecaster in 2007. No IDL license meant I taught myself Python.  Really got into it when I had to design retrieval systems for DOE-ARM at Argonne National Laboratory. MY PYTHON JOURNEY
  • 4. ENVIRONMENTAL SCIENCE DIVISION A language built on the philosophy of readability.  Python is an interpreted, object-oriented, high-level programming language.  Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.  Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. WHAT IS PYTHON?
  • 5. ENVIRONMENTAL SCIENCE DIVISION Python is so ubiquitous it tends to be the go-to scripting language  As the Python ecosystem has grown and due to the readability, openness and ubiquities of the language.  If it can’t be done in a shell script Python is the natural next step.  In terms of data analytics it has seen a particularly dramatic uptake in the financial sector. WHERE IS PYTHON USED? https://www.capitalone.com/tech/software-engineering/building-python-user- community-among-capital-ones-data-analysts/
  • 6. ENVIRONMENTAL SCIENCE DIVISION Sustainable Software Engineering. Things for your CV  Version Control. Learn Git.  Social coding. Git and VC is the first step.. There is a culture to pull requests etc.. And then there is GitHub and Bitbucket which exposes your code to the community and allows interaction.  Test Driven Design and unit testing. Ideally write the test before the code… ideally…  Continuous integration and family.. SO I USE PYTHON? WHAT ELSE DO I NEED TO BE AWESOME?
  • 7. ENVIRONMENTAL SCIENCE DIVISION Python is Python.. Needs modules.  Just firing up Python only gives you the core modules. Python is not a scientific programming language.  Scientific Python is the term given to the ecosystem of packages enabling science in Python.  The modularity and namespace abilities of Python allows users and developers to “roll their own” stack. SCIENTIFIC PYTHON STACK
  • 8. ENVIRONMENTAL SCIENCE DIVISION Master the art of vectorization!  At the core of Numpy (nee Numerical Python) is a powerful array object.  This builds on Python’s List object but endows it with some highly optimized computations under the hood in C.  Avoid loops in Numpy! If you can break down your code into a series of array operations things can be nice and fast.  MASSIVE community effort. NUMPY – MAKES PYTHON FAST
  • 9. ENVIRONMENTAL SCIENCE DIVISION Highly customizable publication quality graphics.  Matplotlib is a highly scriptable comprehensive library for creating plots and visualizations.  Acts as a backbone to many other libraries! Can take some wrestling to get what you want due to the focus on flexibility.  Great fonts.  Recent focus on CVD friendly colormaps. MATPLOTLIB – MAKES PYTHON PRETTY
  • 10. ENVIRONMENTAL SCIENCE DIVISION Highly customizable publication quality graphics.  Matplotlib is a highly scriptable comprehensive library for creating plots and visualizations.  Acts as a backbone to many other libraries! Can take some wrestling to get what you want due to the focus on flexibility.  Great fonts.  Recent focus on CVD friendly colormaps. MATPLOTLIB – MAKES PYTHON PRETTY
  • 11. ENVIRONMENTAL SCIENCE DIVISION Master the art of the GroupBy!  Pandas adds some smarts to the array object.  It works with ”labels”.  Great for time series analysis.  Great for data exploration with visualization methods built in.  Gateway for those who have used Stata, S and R. PANDAS – MAKES PYTHON SMART
  • 12. ENVIRONMENTAL SCIENCE DIVISION N-Dimensional labelled arrays!  Xarray makes n-dimensional arrays label aware.  This is extremely useful for CF compliant data files. Xarray can detect axes and slicing becomes intuitive and code becomes readable.  Easy bindings to Matplotlib and cartopy. XARRAY – MAKES PYTHON AWESOME
  • 13. ENVIRONMENTAL SCIENCE DIVISION By Scientists, for Scientists.  The Atmospheric and Oceanic community have really come together to build a AOS specific stack.  This includes Radar, Meteorology, Satellite, retrievals, visualization R2O (eg scheduling) etc…  Yearly symposium at the AMS annual meeting. Abstracts OPEN! PY-AOS ECOSYSTEM
  • 14. ENVIRONMENTAL SCIENCE DIVISION It is what it says! Python for Meteorologists.  Loaded with great meteorological goodness. Lots of calculations etc…  Great mapping… Layer on top of cartopy.  Aims to replace Gempack. METPY
  • 15. ENVIRONMENTAL SCIENCE DIVISION 15 Philosophy: It’s all about the data model. https://github.com/ARM-DOE/pyart  Py-ART’s central core is a data model for gated data with pointing information.  Py-ART created a way of representing radar data in the Python programming language that mirrors the CF-Radial standard.  Py-ART has a cloud functions to correct, retrieve and grid radar data.  By keeping a limited scope Py-ART aims to “do less better”.  There is now a rich ecosystem of packages that interact: ART-View, CSU tools, PyTDA, Multidop to name a few. Oh and we are working on TINT! THE PYTHON ARM RADAR TOOLKIT Animation courtesy of users Marcus van Lier-Walqui and Sara E. Lytle Data: Andrei Lindenmaeir – ARM Mentor
  • 17. ENVIRONMENTAL SCIENCE DIVISION The power of community software.. But, you need standards, unit testing and continuous integration. Only scollis, jjhelmus, zssherman, rcjackson and rumpkie have received ARM funds. The other 28 have not…
  • 18. ENVIRONMENTAL SCIENCE DIVISION We are all in this together…  Python efforts in Radar Meteorology nucleated in parallel in Europe and the USA.  In addition the long standing TITAN software cloud received NSF support for a modernization surge.  A short course at ERAD 2014 led to a co-written paper which lead to a rotating course between ERAD and the AMS radar conference.  We now have a web presence and a growing ecosystem of identified packages. OPEN RADAR PARTNERSHIP
  • 19. ENVIRONMENTAL SCIENCE DIVISION 2014 Germany2016 Turkey 2018 Netherlands 2017 Chicago 2018 Melbourne 2019 Melbourne 2019 Japan 2015 Oklahoma
  • 20. ENVIRONMENTAL SCIENCE DIVISION PyDDA, RainyMotion, CSU Radar Tools… etc… AND MORE…
  • 21. ENVIRONMENTAL SCIENCE DIVISION Python is the community the breaks down the barriers between domains.  Python is a programming language.  Scientific Python and the Py-AOS stack represents the sum of the knowledge given by those who have been kind enough to work on them.  Using Python is great and a great way of increasing your employability.  Developing Python is better and will all but ensure you get a job  SO, IN THE END, WHAT IS PYTHON?
  • 23. ENVIRONMENTAL SCIENCE DIVISION THANK YOU FOR YOUR TIME – scollis@anl.gov - Email – cyclogenesis_au -Twitter – scollis – GitHub