5.4 The Python Interface to the Earth System Modeling Framework

Tuesday, 8 January 2013: 2:15 PM
Room 12B (Austin Convention Center)
Ryan O'Kuinghttons, CIRES/Univ. of Colorado, Boulder, CO; and C. DeLuca and R. Oehmke

The Earth System Modeling Framework (http://www.earthsystemmodeling.org) is open source software for building modeling components, and coupling them together to form weather prediction, climate, coastal, and other applications. ESMF is supported by a diverse customer base, which includes modeling groups from universities, NCAR and other major U.S. research centers, the National Weather Service, the Department of Defense, and NASA. The ESMF package contains a superstructure of coupling tools and component wrappers with standard interfaces, and an infrastructure of utilities for common functions, including calendar management, message logging, data communications, and grid transformations. ESMF has both a Fortran and a C interface to the core functionality, and also a Python interface to the ESMF regridding utility and related functionality (ESMP). The Python interface was motivated by the need to read, write, and interpolate large sets of Earth system data with a scalable high performance Python package. ESMP is currently in a prototype phase, and the package name and calling interfaces are likely to change.

Regridding, also called remapping or interpolation, is the process of changing the grid underneath field data values while preserving qualities of the original data. Regridding may be needed when communicating data between Earth system model components such as land and atmosphere, or between different data sets to support analysis or visualization. Regridding can be broken into two stages: 1) generation of an interpolation weight matrix that describes how points in the source grid contribute to points in the destination grid, and 2) multiplication of values on the source grid by the interpolation weight matrix to produce the appropriate values on the destination grid.

ESMP supports bilinear, finite element patch recovery and first-order conservative regridding. There is also an option to ignore unmapped destination points and mask out points on either the source or destination. Regridding on the sphere takes place in 3D Cartesian space, so the pole problem is not an issue as it can be with other Earth system grid remapping software. ESMP supports a single-tile logically rectangular discretization type called Grid and an unstructured discretization type called Mesh (ESMF also supports observational data streams). Grid and Mesh objects can be created in 2D or 3D space, and regridding between the two is fully supported, including 3D first-order conservative regridding.

The basic requirements for ESMP are a Python 2.6 (or later) implementation with numpy and ctypes and an ESMF installation. Numpy arrays and callable objects are used to access and modify object data allocated from within the ESMF library. ESMP is regression tested nightly, and is supported on Darwin, Linux and Cray systems with the GNU compiler suite and OpenMPI communications.

The ESMP user base has grown quickly, and it is being incorporated into several other software tools and frameworks. These include the Ultrascale Visualization Climate Data Analysis Tools (UV-CDAT), a data visualization package, and the Community Surface Dynamics Modeling System.

Present work with ESMP is directed at reading and writing Grids and Meshes using evolving Climate and Forecast (CF) GridSpec and UGRID conventions to structure NetCDF files. The PIO package developed jointly by staff from the National Center for Atmospheric Research and Department of Energy is being used for parallel IO.

Upcoming development plans for ESMP involve incorporation of observational data streams, higher order conservative regridding, and support for other ESMF utilities like time keeping and components. Improvement of the training materials is also anticipated. The calling interfaces are likely to be reworked so that they are more natural to the Python language.

ESMP is part of the greater ESMF project, which is distinguished by its strong emphasis on open source and access, community governance, and distributed development.

- Indicates paper has been withdrawn from meeting
- Indicates an Award Winner