PyGChem

A tentative brigde between GEOS-Chem and the Python Scientific (SciPy) Stack.

Benoît Bovy -- GIRPAS (AGO) Université de Liège

bbovy@ulg.ac.be | https://github.com/benbovy


SEAS - Harvard (September 2014)

About myself...

  • PhD in geosciences (geomorphology)
    • Numerical modelling of erosion processes (C/Python dev)
  • Since 2012 at the InfraRed Group of Atmospheric and Solar Physics (GIRPAS)
    • At the same time, the group joined the GC community
  • Part of my job:
    • Set up a computing environment for the modelling tasks
    • Facilitating the integration and the use of various softwares (including GC)


**DISCLAIMER**:

  • I don't have much experience in running GC simulations (so far)
  • I'm not a specialist in the field of atmospheric chemistry (so far)
  • I use Python (and its scientific libraries) a lot in my research

Interacting with GEOS-Chem


GC user-interface: for what purposes?

  • Pre/post processing, format conversion, output analysis
  • Visualization
  • Run / manage GC simulations
  • Model development: prototyping, testing
  • Interfacing with other codes (models, libraries, applications...)
  • ...

GC user-interface: what matters (ideally)?

  • Interactivity interactive
  • Richness of the computing environment features
  • Ease-of-use, less error-prone user-friendly
  • Public availability availability
  • Hardware / Platform availability availability
  • Interaction with the GC community collaboration
  • Reproducible experiments reproducibility
  • Reliability maturity
  • Dealing with big amounts of data parallel

GC user-interface: Existing tools

Referenced on the GEOS-Chem wiki:

  • IDL: GAMAP maturity features user-friendly availability
  • NCL: NC4GC
  • R: a few scripts for dataset analysis
  • Python: a few packages (mainly for reading bpch files)

And also:

  • IDL, R, Matlab, Python, etc...: GC community researchers's own recipes reproducibility collaboration

The Python Scientific (SciPy) Stack

The Python language (and the CPython implementation)

  • Open-source, cross-platform availability
  • Language inherent characteristics user-friendly interactive
    • Readability, introspection, multi-paradigm...
  • Integrates well with other languages (C/C++, Fortran...)
  • Includes natively a huge number of libraries features
    • OS, network, web, testing, debugging, profiling, file formats...
  • Very active, growing scientific community features collaboration

The SciPy Stack

The SciPy Stack

  • Dependencies user-friendly ?? reproducibility ??
    • but recent solutions...
  • A lot of new packages in development maturity ??

Packages specific to the atmospheric sciences community

PyGChem

  • Avoid reinventing the wheel: "just" connect GEOS-Chem to the SciPy Stack (in a "pythonic fashion")

  • Provide a consistent, full data model (and its implementation) for GEOS-Chem outputs and inputs
    • not only for datasets (HEMCO settings, globchem, input file...)
  • Provide access to GEOS-Chem components from within Python ?
    • prototyping, tests...

On the roadmap

  • Needs more testing (unit tests)
  • Compatibility with Python 3.x
  • Datasets
    • CF-Conventions vs. COARDS Conventions ?
    • Handling datasets with CDAT (cdms), cf-python, ESMPy ?
  • Chemistry (KPP format)
  • Input parameters, managing GC runs
  • Suggestions, pull requests and/or issue reports are welcome!!

https://github.com/benbovy/PyGChem