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
Jose Enrique Ruiz
 
PPTX
Virtual Science in the Cloud
thetfoot
 
PDF
Scientific Applications with Python
Enthought, Inc.
 
PDF
A Whirlwind Tour Of Python
Asia Smith
 
PPTX
DATA SCIENCE PPT.pptx
vikashyadav23235277
 
PDF
Data Analysis Python For Environmental Science Hayden Van Der Post
unidosmungwe
 
PPTX
Python for data science
Tanzeel Ahmad Mujahid
 
PDF
Python webinar 4th june
Edureka!
 
VO web-services-based astronomy workflows
Jose Enrique Ruiz
 
Virtual Science in the Cloud
thetfoot
 
Scientific Applications with Python
Enthought, Inc.
 
A Whirlwind Tour Of Python
Asia Smith
 
DATA SCIENCE PPT.pptx
vikashyadav23235277
 
Data Analysis Python For Environmental Science Hayden Van Der Post
unidosmungwe
 
Python for data science
Tanzeel Ahmad Mujahid
 
Python webinar 4th june
Edureka!
 

Similar to Python in the Atmospheric sciences (20)

PDF
Python for Data Science: A Comprehensive Guide
Uncodemy
 
PDF
Scikit-learn : Machine Learning in Python
Ajay Ohri
 
PPTX
Python PPT
Edureka!
 
PPTX
Python for Big Data Analytics
Edureka!
 
PPTX
Make your data great again - Ver 2
Daniel JACOB
 
PDF
Python in Scientific Computing.pdf
AmirKhan811717
 
PDF
Python on Science ? Yes, We can.
Marcel Caraciolo
 
PPTX
Adarsh_Masekar(2GP19CS003).pptx
hkabir55
 
PPT
Exploring Linked Data
Roberto García
 
PDF
The Joy of SciPy, Part I
Dinu Gherman
 
PDF
Anaconda vs Python: Understanding the differences
Julie Bowie
 
PPTX
Computer vision, machine, and deep learning
Igi Ardiyanto
 
PPTX
Deroure Repo3
guestd9aa5
 
PPTX
Deroure Repo3
guru122
 
PDF
'Scikit-project': How open source is empowering open science – and vice versa
Nathan Shammah
 
PPTX
Software Sustainability: Better Software Better Science
Carole Goble
 
PDF
Why should I learn python
grinu
 
PPTX
Sheldon challenge
Andrea Nuzzolese
 
PDF
Array computing and the evolution of SciPy, NumPy, and PyData
Travis Oliphant
 
KEY
Crab - A Python Framework for Building Recommendation Systems
Marcel Caraciolo
 
Python for Data Science: A Comprehensive Guide
Uncodemy
 
Scikit-learn : Machine Learning in Python
Ajay Ohri
 
Python PPT
Edureka!
 
Python for Big Data Analytics
Edureka!
 
Make your data great again - Ver 2
Daniel JACOB
 
Python in Scientific Computing.pdf
AmirKhan811717
 
Python on Science ? Yes, We can.
Marcel Caraciolo
 
Adarsh_Masekar(2GP19CS003).pptx
hkabir55
 
Exploring Linked Data
Roberto García
 
The Joy of SciPy, Part I
Dinu Gherman
 
Anaconda vs Python: Understanding the differences
Julie Bowie
 
Computer vision, machine, and deep learning
Igi Ardiyanto
 
Deroure Repo3
guestd9aa5
 
Deroure Repo3
guru122
 
'Scikit-project': How open source is empowering open science – and vice versa
Nathan Shammah
 
Software Sustainability: Better Software Better Science
Carole Goble
 
Why should I learn python
grinu
 
Sheldon challenge
Andrea Nuzzolese
 
Array computing and the evolution of SciPy, NumPy, and PyData
Travis Oliphant
 
Crab - A Python Framework for Building Recommendation Systems
Marcel Caraciolo
 
Ad

Recently uploaded (20)

PPTX
Embark on a journey of cell division and it's stages
sakyierhianmontero
 
PPTX
Brain_stem_Medulla oblongata_functions of pons_mid brain
muralinath2
 
PPTX
fghvqwhfugqaifbiqufbiquvbfuqvfuqyvfqvfouiqvfq
PERMISONJERWIN
 
PDF
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
ESUG
 
PPTX
Role of GIS in precision farming.pptx
BikramjitDeuri
 
PPTX
Reticular formation_nuclei_afferent_efferent
muralinath2
 
PPTX
Sleep_pysilogy_types_REM_NREM_duration_Sleep center
muralinath2
 
PPTX
ANTIANGINAL DRUGS.pptx m pharm pharmacology
46JaybhayAshwiniHari
 
PPTX
METABOLIC_SYNDROME Dr Shadab- kgmu lucknow pptx
ShadabAlam169087
 
PPTX
Laboratory design and safe microbiological practices
Akanksha Divkar
 
PPTX
Feeding stratagey for climate change dairy animals.
Dr.Zulfy haq
 
PDF
Paleoseismic activity in the moon’s Taurus-Littrowvalley inferred from boulde...
Sérgio Sacani
 
PPTX
The Toxic Effects of Aflatoxin B1 and Aflatoxin M1 on Kidney through Regulati...
OttokomaBonny
 
PPTX
RED ROT DISEASE OF SUGARCANE.pptx
BikramjitDeuri
 
PDF
High-definition imaging of a filamentary connection between a close quasar pa...
Sérgio Sacani
 
PPTX
Nanofertilizer: Its potential benefits and associated challenges.pptx
BikramjitDeuri
 
PDF
The Cosmic Symphony: How Photons Shape the Universe and Our Place Within It
kutatomoshi
 
PDF
Challenges of Transpiling Smalltalk to JavaScript
ESUG
 
PDF
Control and coordination Class 10 Chapter 6
LataHolkar
 
PDF
Approximating manifold orbits by means of Machine Learning Techniques
Esther Barrabés Vera
 
Embark on a journey of cell division and it's stages
sakyierhianmontero
 
Brain_stem_Medulla oblongata_functions of pons_mid brain
muralinath2
 
fghvqwhfugqaifbiqufbiquvbfuqvfuqyvfqvfouiqvfq
PERMISONJERWIN
 
Migrating Katalon Studio Tests to Playwright with Model Driven Engineering
ESUG
 
Role of GIS in precision farming.pptx
BikramjitDeuri
 
Reticular formation_nuclei_afferent_efferent
muralinath2
 
Sleep_pysilogy_types_REM_NREM_duration_Sleep center
muralinath2
 
ANTIANGINAL DRUGS.pptx m pharm pharmacology
46JaybhayAshwiniHari
 
METABOLIC_SYNDROME Dr Shadab- kgmu lucknow pptx
ShadabAlam169087
 
Laboratory design and safe microbiological practices
Akanksha Divkar
 
Feeding stratagey for climate change dairy animals.
Dr.Zulfy haq
 
Paleoseismic activity in the moon’s Taurus-Littrowvalley inferred from boulde...
Sérgio Sacani
 
The Toxic Effects of Aflatoxin B1 and Aflatoxin M1 on Kidney through Regulati...
OttokomaBonny
 
RED ROT DISEASE OF SUGARCANE.pptx
BikramjitDeuri
 
High-definition imaging of a filamentary connection between a close quasar pa...
Sérgio Sacani
 
Nanofertilizer: Its potential benefits and associated challenges.pptx
BikramjitDeuri
 
The Cosmic Symphony: How Photons Shape the Universe and Our Place Within It
kutatomoshi
 
Challenges of Transpiling Smalltalk to JavaScript
ESUG
 
Control and coordination Class 10 Chapter 6
LataHolkar
 
Approximating manifold orbits by means of Machine Learning Techniques
Esther Barrabés Vera
 
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 – [email protected] - Email – cyclogenesis_au -Twitter – scollis – GitHub