Earth System Modeling Framework Python Interface (ESMP) October 2011 Ryan O’Kuinghttons Robert Oehmke Cecelia DeLuca.

Slides:



Advertisements
Similar presentations
Expanding Regridding Capabilities of the Earth System Modeling Framework Andrew Scholbrock University of Colorado – Boulder Robert Oehmke NOAA/CIRES 1.
Advertisements

Question Bank. Explain the syntax of if else statement? Define Union Define global and local variables with example Concept of recursion with example.
Enhancing Spotfire with the Power of R
Python for Science Shane Grigsby. What is python? Why python? Interpreted, object oriented language Free and open source Focus is on readability Fast.
Utilizing the GDB debugger to analyze programs Background and application.
ESMPy: The Python Interface to the Earth System Modeling Framework Ryan O’Kuinghttons, Robert Oehmke Cecelia DeLuca, Gerhard Theurich Peggy Li, Joseph.
ESMPy and OpenClimateGIS: Python Interfaces for High Performance Grid Remapping and Geospatial Dataset Manipulation Ryan O’Kuinghttons, Ben Koziol, Robert.
–Streamline / organize Improve readability of code Decrease code volume/line count Simplify mechanisms Improve maintainability & clarity Decrease development.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Community infrastructure for building and coupling high performance climate, weather, and coastal models Cecelia DeLuca NOAA / CIRES University of Colorado,
Metadata Creation with the Earth System Modeling Framework Ryan O’Kuinghttons – NESII/CIRES/NOAA Kathy Saint – NESII/CSG July 22, 2014.
Fast Parallel Grid Remapping for Unstructured and Structured Grids Robert Oehmke NOAA Cooperative Institute for Research in Environmental Sciences University.
Distributed-Memory Programming Using MPIGAP Vladimir Janjic International Workhsop “Parallel Programming in GAP” Aug 2013.
What is ESMF and what does it mean to adopt it? 3 rd ESMF Community Meeting Cecelia DeLuca Nancy Collins
Metadata for the Coupled Ocean/Atmosphere Mesoscale Prediction System (COAMPS) using the Earth System Modeling Framework (ESMF) Peter Bosler University.
NE II NOAA Environmental Software Infrastructure and Interoperability Program Cecelia DeLuca Sylvia Murphy V. Balaji GO-ESSP August 13, 2009 Germany NE.
Cecelia DeLuca, Don Stark, Chris Hill Arctic System Model Workshop May 20, 2008 Earth System Modeling Framework.
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
ESMF Development Status and Plans ESMF 4 th Community Meeting Cecelia DeLuca July 21, 2005 Climate Data Assimilation Weather.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
Computational Design of the CCSM Next Generation Coupler Tom Bettge Tony Craig Brian Kauffman National Center for Atmospheric Research Boulder, Colorado.
A Metadata Based Approach For Supporting Subsetting Queries Over Parallel HDF5 Datasets Vignesh Santhanagopalan Graduate Student Department Of CSE.
Flexibility and user-friendliness of grid portals: the PROGRESS approach Michal Kosiedowski
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Initial Results from the Integration of Earth and Space Frameworks Cecelia DeLuca/NCAR, Alan Sussman/University of Maryland, Gabor Toth/University of Michigan.
Parallel Interactive Computing with PyTrilinos and IPython Bill Spotz, SNL (Brian Granger, Tech-X Corporation) November 8, 2007 Trilinos Users Group Meeting.
ESMF Code Generation Rocky Dunlap Spencer Rugaber Leo Mark Georgia Tech College of Computing.
Model Coupling Environmental Library. Goals Develop a framework where geophysical models can be easily coupled together –Work across multiple platforms,
The use of modeling frameworks to facilitate interoperability Cecelia DeLuca/NCAR (ESMF) Bill Putman/NASA GSFC (MAPL) David Neckels/NCAR.
Introduction to Computer Programming Using C Session 23 - Review.
Integrated Grid workflow for mesoscale weather modeling and visualization Zhizhin, M., A. Polyakov, D. Medvedev, A. Poyda, S. Berezin Space Research Institute.
Earth System Modeling Framework Status Cecelia DeLuca NOAA Cooperative Institute for Research in Environmental Sciences University of Colorado, Boulder.
_______________________________________________________________CMAQ Libraries and Utilities ___________________________________________________Community.
May 2003National Coastal Data Development Center Brief Introduction Two components Data Exchange Infrastructure (DEI) Spatial Data Model (SDM) Together,
Copyright © 2012 UNICOM Systems, Inc. Confidential Information z/Ware Product Overview illustro Systems International A Division of UNICOM Global.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
Strategic Plan Implementation Cecelia DeLuca/NCAR (ESMF) December 17, 2008 ESMF Board/Interagency Meeting.
NSF NCAR / NASA GSFC / DOE LANL ANL / NOAA NCEP GFDL / MIT / U MICH May 15, 2003 Nancy Collins, NCAR 2nd Community Meeting, Princeton, NJ Earth System.
NCEP ESMF GFS Global Spectral Forecast Model Weiyu Yang, Mike Young and Joe Sela ESMF Community Meeting MIT, Cambridge, MA July 21, 2005.
NSF NCAR / NASA GSFC / DOE LANL ANL / NOAA NCEP GFDL / MIT / U MICH 15 May 2003 Cecelia DeLuca / NCAR 2 nd ESMF Community Meeting Princeton, NJ NSIPP Seasonal.
ESMF Strategic Discussion Cecelia DeLuca NOAA ESRL/University of Colorado ESMF Executive Board/Interagency Meeting June 12, 2014.
ESMF Regridding Update Robert Oehmke, Peggy Li, Ryan O’Kuinghttons, Mat Rothstein, Joseph Jacob NOAA Cooperative Institute for Research in Environmental.
UNIX Unit 1- Architecture of Unix - By Pratima.
ESMF Regridding Update Robert Oehmke Ryan O’Kuinghttons Amik St. Cyr.
SIMO Python/XML Simulator Current situation 28/10/2005 SIMO Seminar Antti Mäkinen Dept. of Forest Resource Management / University of Helsinki.
Progress on Component-Based Subsurface Simulation I: Smooth Particle Hydrodynamics Bruce Palmer Pacific Northwest National Laboratory Richland, WA.
Chapter 2. System Structures
Curator: Gap Analysis (from a schema perspective) Rocky Dunlap Spencer Rugaber Georgia Tech.
ESMF,WRF and ROMS. Purposes Not a tutorial Not a tutorial Educational and conceptual Educational and conceptual Relation to our work Relation to our work.
Using ESMF Regridding Tools as an Observation Operator Presenter: Mathew V. Rothstein Software Engineer, NOAA/CNT Training at NRL Monterey August 5-6,
ESMF and the future of end-to-end modeling Sylvia Murphy National Center for Atmospheric Research
A TIME-GCM CAM Multi-executable Coupled Model Using ESMF and InterComm Robert Oehmke, Michael Wiltberger, Alan Sussman, Wenbin Wang, and Norman Lo.
LonWorks Introduction Hwayoung Chae.
Options for Framework Connectivity Cecelia DeLuca NOAA Environmental Software Infrastructure and Interoperability February.
Functions of Operating Systems V1.0 (22/10/2005).
A Quick Tour of the NOAA Environmental Software Infrastructure and Interoperability Group Cecelia DeLuca Dr. Robert Detrick visit March 28, 2012
GMAO Seasonal Forecast
Chapter 7 Text Input/Output Objectives
Chapter 7 Text Input/Output Objectives
z/Ware 2.0 Technical Overview
Chapter 7 Text Input/Output Objectives
In-situ Visualization using VisIt
Programmable Logic Controllers (PLCs) An Overview.
Serial Data Hub (Proj Dec13-13).
ESMF Regridding Update
Operating Systems Tasks 04/04/2019.
OpenClimateGIS: A Python Library for Geospatial Manipulations of CF Climate Datasets Ben Koziol1, Ryan O’Kuinghttons1, Robert Oehmke1, Richard Rood2, Cecelia.
Operating Systems Tasks 05/08/2019.
Presentation transcript:

Earth System Modeling Framework Python Interface (ESMP) October 2011 Ryan O’Kuinghttons Robert Oehmke Cecelia DeLuca

Architecture Low Level Utilities Fields and Grids Layer Model Layer Components Layer Gridded Components Coupler Components ESMF Infrastructure User Code ESMF Superstructure MPI, NetCDF, … External Libraries ESMF provides a superstructure for assembling geophysical components into applications. ESMF also provides an infrastructure that modelers use to – Generate and apply interpolation weights – Handle metadata, time management, data I/O and communications, and other functions – Access third party libraries The purpose of the ESMF Python interface (ESMP) is to provide access to ESMF Field Regridding.

Python Interface Features ESMF related features: Unstructured Mesh Field built on Mesh Parallel regridding (bilinear, higher order, or conservative) Python related features: Numpy arrays for data representation in Python Pythonic approach to error handling and multiple return values Automatic documentation via Pydoc Other neat features: Open source and freely available!

Limitations Data StructuresFortranCPython Componentxx Statexx FieldBundlexx Fieldxxx ArrayBundlexx Arrayxx Gridx Meshxxx Attributesx Logx VMxxx Time Manager xx ESMP is in an early BETA stage! The Python interface is currently not on the ESMF task list. If you would like to see more functionality included, please contact ESMF support so this can be made a priority with the ESMF Change Review Board. Data structure related: -No logically rectangular grid representation -No FieldBundle class, only single Fields -No access to Mesh coordinates -No access to Field bounds Testing related: -Only tested on Darwin/gfortran platform -Parallel implementation is not fully tested -Does not undergo nightly ESMF regression testing

Data Representation – Numpy Numpy – scientific computing with Python, a piece of Scipy -Used to represent data arrays on the Python front-end -Numpy arrays are passed in and out of ESMP interfaces -Input parameters in Numpy arrays are copied into internal ESMP data structures, but referenced out of internal ESMP data structures. Declare a Numpy array ungriddedLBoundN = Numpy.array([1,1]) Create an ESMP_Field, copy data from Numpy array field = ESMP_FieldCreate(...ungriddedLBoundN,...) Get a pointer to Field data as a Numpy array fieldPtr = ESMP_FieldGetPtr(field, 0) Access Field data as a Numpy array, referencing the internal data for i in range(num_node): fieldPtr[i] = 10 Sample Code:

ESMP Field regridding Functions in much the same way as Field regridding in ESMF routehandle = ESMP_FieldRegridStore (srcfield, dstfield, ESMP_REGRIDMETHOD_BILINEAR, ESMP_UNMAPPEDACTION_ERROR) ESMP_FieldRegrid(srcfield, dstfield, routehandle) ESMP_FieldRegridRelease(routehandle) Features: -Fully parallel, and highly scalable -Bilinear, higher order, or conservative -2D or 3D unstructured Meshes -Optional error handling of unmapped destination points File based regridding: -‘remap’ module (from ESMP import remap) -Drives the ESMF_RegridWeightGen application -Inputs: NetCDF grid files -Output: NetCDF weights file -Supports: ESMF and SCRIP file format -Limitations: Serial NetCDF file IO

Automatic documentation Documentation can be generated with the ‘pydoc’ command at terminal prompt: $: pydoc ESMP Help on module ESMP: NAME ESMP - The ESMF Python API... FUNCTIONS ESMP_FieldCreate(mesh, typekind, gridToFieldMap, ungriddedLBound, ungriddedUBound, name) RETURN ESMP_Field :: field ESMP_TypeKind :: typekind Numpy.array :: gridToFieldMap Numpy.array :: ungriddedLBound Numpy.array :: ungriddedUBound string :: name...

Software access and dependencies The software is available for download from the esmfcontrib Sourceforge cvs repository: cvs -z3 co -P -rESMF_5_3_0_beta_snapshot_09 python Dependencies: -Python 2.6 or higher – add top level ESMP directory to PYTHONPATH -Ctypes - -Not supported on AIX -Numpy - -ESMF installation -ESMF_5_3_0_beta_snapshot_09 or higher! -Shared libraries not supported on some platforms (notably Darwin), see the supported platforms table from ESMF for more information: - -ESMFMKFILE environment variable pointing to installation esmf.mk file Optional dependencies: -NetCDF - 'remap' interface to ESMF_RegridWeightGen -LAPACK - higher order patch regridding -GNUMake - terminal helper commands

Specific Questions on ESMP Style and Conventions -Argument returns in ESMP_XXXGet() routines: -Could receive arguments in a tuple of multiple return values -Could receive each piece of info in a single Get call -Could also use Python class structures to pass allocated memory into a Get routine to fill with data -Type forcing of Numpy array input arguments -Could force a specific type for these array inputs -Could cast input array to type needed by ESMF -Error handling -No return codes in ESMP -> Abort on bad ESMF return code -Backtrace from Python -> Send to stdout or ESMF logs? -Any other issues of style or convention?

Future work proposal -Add support for the following: -Get bounds information from a Field -Get coordinate information from a Mesh -Structured grids -Output of numerical results -Mesh and Field information in vtk file format using ESMP_MeshWrite (plot with Visit or Paraview) -NetCDF format? -Support for NetCDF IO of Field data? Serial or Parallel? -Add support for Components and States? -Anything else?