Expanding regridding capabilities of the earth system modeling framework
1 / 17

Expanding Regridding Capabilities of the Earth System Modeling Framework - PowerPoint PPT Presentation

  • Uploaded on

Expanding Regridding Capabilities of the Earth System Modeling Framework. Andrew Scholbrock University of Colorado – Boulder Robert Oehmke NOAA/CIRES. Outline. Introduction Background Information Incorporating LibCF Regridding into ESMF Current Status Future Work. Introduction.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Expanding Regridding Capabilities of the Earth System Modeling Framework' - orsin

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Expanding regridding capabilities of the earth system modeling framework

Expanding Regridding Capabilities of the Earth System Modeling Framework

Andrew Scholbrock

University of Colorado – Boulder

Robert Oehmke


Outline Modeling Framework

  • Introduction

  • Background Information

  • Incorporating LibCF Regridding into ESMF

  • Current Status

  • Future Work

Introduction Modeling Framework

  • This project aims to allow regridding software that follows a proposed metadata standard (Gridspec) to be used within the Earth System Modeling Framework (ESMF)

  • As new regridding capabilities are developed they will be automatically available through ESMF

ESMF Modeling Framework

  • Framework developed by a multi-agency consortium [1]

  • Provides standard interfaces for model components

  • Provides standard structure for transferring data between model components

  • Provides a range of utilities to ease coupling

    • Data regridding

    • Data redistribution

    • Time management

    • Error handling

Gridspec Modeling Framework

  • Metadata convention developed at NOAA GFDL [2]

  • Proposed for inclusion in the Climate and Forecast (CF) [3] conventions

  • Gridspec represents grids as mosaics and tiles

    • Mosaic files contain a list of tile files and how they are connected

    • Tile files contain actual grid coordinate information


LibCF Modeling Framework

  • Utility library developed at Unidata

  • Built on top of NetCDF [4] Climate and Forecast (CF) conventions

  • LibCF [3] includes the capability to:

    • Manipulate Gridspec metadata on a NetCDF file

    • Create Gridspec files

    • Regrid between different Gridspec files

  • LibCF is still in alpha release mode

Regridding overview
Regridding Overview Modeling Framework

  • Climate and other models require coupling of modeling components (e.g. atmosphere, ocean)

  • Different modeling components may require different grids

    • e.g. different shapes or different resolutions

  • Regridding needs to be performed to move data between components on different grids

  • Steps involved in regridding:

    • Generate interpolation weights

    • Apply weights to interpolate field using a sparse matrix multiply

Esmf regridding
ESMF Regridding Modeling Framework

  • Methods of accessing regridding:

    • Online

      • Subroutine calls which calculate weights during a model run

      • Can get weights or feed directly into ESMF sparse matrix multiply

    • Offline

      • Application which generates a netCDF interpolation weight file from two netCDF grid files

  • Computation of weights can be done in parallel

  • Supported grids:

    • 2D meshes composed of triangles or quadrilaterals

    • 3D meshes composed of hexahedra

    • 2D/3D logically rectangular grids

    • Cubed sphere

  • Supported interpolation methods:

    • Bilinear

    • Higher order finite element patch recovery [5][6]

    • Conservative (beta version)

  • Not all combinations of the above are supported

Libcf regridding
LibCF Regridding Modeling Framework

  • LibCF takes Gridspec files and field data files as input to generate weights and interpolate data

    • If just Gridspec files are specified then only interpolation weights are generated

  • LibCF supports regridding between mosaics of logically rectangular grid tiles (e.g. cubed sphere, single tile logically rectangular)

  • Currently first order conservative interpolation methods are supported, and some specific bilinear cases

Combining esmf and libcf
Combining ESMF and LibCF Modeling Framework

  • LibCF was introduced into the ESMF online regridding software.

  • This was somewhat awkward because LibCF requires Gridspec files as input, but ESMF online regridding holds grid descriptions in memory.

  • As a result, ESMF must convert its grid descriptions to Gridspec files and then have LibCF read them in.

  • This works, but more efficient connections could be made with regridding libraries that did not require file input.

Implementation steps getting interpolation weights
Implementation Steps: Modeling FrameworkGetting Interpolation Weights

  • Write ESMF grids to NetCDF files

    • Take an existing ESMF grid and get the coordinate information out of it

    • Write out the coordinate information to a NetCDF file

      • Done using ESMF I/O functionality

    • Create mosaic files from the NetCDF grid

      • Done using LibCF’s make_mosaic function

  • Get interpolation weights from LibCF

    • Call LibCF’s regridding function through ESMF calls

    • Read in LibCF’s interpolation weights into ESMF

    • Convert interpolation data to a form that ESMF’s sparse matrix multiply can use

Implementation steps weight application
Implementation Steps: Modeling FrameworkWeight Application

  • Apply LibCF interpolation weights to field data using the ESMF sparse matrix multiply call

  • Future regrid calls to updated field data can bypass the LibCF interpolation weight generation step

    • This holds as long as the grids involved remain the same

Libcf esmf regridding flow
LibCF Modeling Framework/ESMF Regridding Flow


Destination Grid

Source Grid

Weight Matrix

Create Mosaic

Write Tile

Create Weights

Read Weights




Source Variable Data

Destination Variable Data


File I/O


NetCDF File

Destination Tile

Source Tile

Source Mosaic

Destination Mosaic

Remap File

API Call


Esmf user interface for regridding with libcf
ESMF User Interface for Regridding with LibCF Modeling Framework

  • Actual interface that users employ contains two steps:

    • ESMF_FieldRegridStore(): Provide source/destination grids and receive interpolation weights

    • ESMF_FieldRegrid(): Provide interpolation weights and source field data to receive interpolated field data corresponding to the destination grid

  • This is the same sequence of calls used for pure ESMF regridding

Current status
Current Status Modeling Framework

  • Can read interpolation weight information generated by LibCF into ESMF sparse matrix representation and perform a regrid.

  • Can write ESMF grid structures to Gridspec files

  • ESMF restriction:

    • Writing Gridpsec files from ESMF is serial and thus restricts the scaling of the final code

  • Intersection of LibCF/ESMF capabilities:

    • Only supports single tile logically rectangular grids

  • LibCF restriction:

    • Only supports first order conservative remapping for this geometry

Future work
Future Work Modeling Framework

  • Parallel I/O for writing Gridspec files

  • Switch to non-file based interface if LibCF develops one

  • Allow for regridding of more complicated grids including the cubed sphere

References Modeling Framework

  • Hill, C., C. DeLuca, V. Balaji, M. Suarez, and A. da Silva (2004). Architecture of the Earth System Modeling Framework. Computing in Science and Engineering, Volume 6, Number 1, pp. 18-28.

  • Balaji, V., Liang, Z. Gridspec: A Standard for the Description of Grids Used in Earth System Models. http://www.gfdl.noaa.gov/~vb/gridstd/gridstd.html

  • The CF Library Users Guide. http://www.unidata.ucar.edu/software/libcf/docs/libcf.html

  • Hartnett, E. and Rew, R., Experience with an enhanced netCDF data model and interface for scientific data access, 88th AMS Annual Meeting, 24th Conference on IIPS, 2008.

  • Khoei S.A., Gharehbaghi A. R. The superconvergent patch recovery technique and data transfer operators in 3d plasticity problems. Finite Elements in Analysis and Design, 43(8), 2007.

  • Hung K.C, Gu H., Zong Z. A modified superconvergent patch recovery method and its application to large deformation problems. Finite Elements in Analysis and Design, 40(5-6), 2004.


    [email protected]