ESMF Regridding Update Robert Oehmke Ryan OKuinghttons Amik
ESMF Regridding Update Robert Oehmke Ryan O’Kuinghttons Amik St. Cyr
ESMF Regridding • This overview describes ESMF 4. 0. 0 r which came out in October • Methods of accessing regridding: – Online • Subroutine calls which calculate weights during run • Can get weights or feed directly into ESMF Sparse Mat. Mult. • Requires LAPACK if higher order interpolation is used – Offline • Application which generates a net. CDF weight file from two net. CDF grid files • Requires pnet. CDF and LAPACK • Computation of weights: – Parallel • Have tested scaling up to 2048 procs. • Requires MPI library – Serial – New faster tree-based search (order of magnitude faster than old search)
Online Regridding Supports • Regridding between any combination of: – 2 D Meshes composed of triangles and quadrilaterals – 2 D logically rectangular Grids composed of a single patch • Regridding between any combination of: – 3 D Meshes composed of hexahedrons – 3 D logically rectangular Grids composed of a single patch • Regridding between a pair of 2 D Grids mapped to a sphere – One pole option: pole value is average of all source points around pole • Interpolation Types: – Bilinear – Higher order (patch recovery, a finite element method, described later)
Online Regridding Testing • Regression testing – Mostly sanity tests • Source Field set to simple linear function (e. g. x+y+20) • After interpolation check that dest. Field is point wise close to function (e. g. within. 0001) – Bilinear interpolation between these cases regression tested • • • Pair of 2 D Grids mapped to sphere Pair of 3 D structured Grids Pair of 2 D Grids with destination masks Pair of 2 D Grids with source masks (Also higher order interpolation) Pair of 2 D Grids mapped to sphere with source masks (Also higher order interpolation) 2 D Mesh (triangles and quadrilaterals) to Grid 2 D Grid to Mesh (triangles and quadrilaterals) Pair of 2 D Mesh (triangles and quadrilaterals) 3 D Mesh (triangles and quadrilaterals) to Grid • Manual testing – More in depth tests • Source Field set to range of functions (e. g. (1 -xy)sin(3πx)cos(2πy)+2 ) • After interpolation check L 1, L 2 and max error of dest. Field and derivative of dest. Field – Bilinear and higher order interpolation between these cases tested
Offline Regridding • Offline application can be automatically built as part of ESMF • Regridding between a pair of 2 D Grids mapped to a sphere • Pole options (for spherical grids): – Full circle average: artificial pole is average of all source points next to pole – N-point average: artificial pole is average of n top source neighbors of dest point – No pole: error if destination point lies above top row of source points • Interpolation Types: – Higher order (patch recovery, a finite element method, described later)
Offline Regridding Testing • Interior regridding functionality is tested along with online regridding • Offline testing is testing higher order interpolation • Manual testing – Performed using the SCRIP weight testing application • Application scrip_test which comes packaged with SCRIP weight generation application • See Section 2. 3 in the SCRIP user’s guide for more information – Mostly using source field set to 2+cos 2 cos(2 ) (Field option 2 in scrip_test) – Mostly focused on a few cases provided by CCSM • T 62 CAM grid to a 1 -degree POP ocean grid • Fv 1. 9 x 2. 5 grid to a 1 -degree POP ocean grid – Single and multiple processor cases
Higher Order Interpolation • Based on “patch recovery” used in finite element modeling • Typically results in better approx. to values and derivatives than bilinear interpolation • A patch is a 2 nd order n-D polynomial representing source data • Patches generated for each corner of source cell • Each patch created by least-square fit through source data in cells surrounding corner • Destination value is weighted average of patch values • Longer description in ESMF v 4. 0. 0 r Reference Manual
Future work • Coming soon (within a couple of months): – Extrapolation: generating values for points outside unmasked source region – More regression testing – More regridding options • Regional Grid with Grid mapped to a sphere • Tetrahedral unstructured Meshes – Unifying capabilities of offline and online • Mostly just a matter of interfaces, internal functionality is available – Conservative interpolation: parallel, no derivatives needed • Longer term: – Shortcuts for additional grids: • Tripole • Multi-tile (e. g. Cube sphere) • Note: both can be done now via unstructured grids
References • Patch Interpolation: – Khoei S. A. , Gharehbaghi A. R. The superconvergent patch recovery technique and data transfer operators in 3 d 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. Questions?
- Slides: 9