# Presentation: 153149

## Code 930 Support for GMI

- Tom Clune (NASA)
- Bigyani Das (CSC)
- Jae-Hoon Kim (CSC)

## Status

- GMI production runs are routinely and capably executed by 930 staff.
- Gaining significant familiarity with code, but still reliant upon LLNL for some code modifications.
- LLNL support continues to be excellent.
- Staffing is currently low (1.5 vs 2.3 FTEs)
- Atmospheric Chemistry is becoming separate “sector”.

## NCCS Resources provided to GMI

- GMI web site
- Data archival and community FTP service
- HEC - HP/CPQ alpha cluster
- Source repository
- Semi-private document bulletin board
- Mailing lists

## NCCS UserIDs

- Required to access the GMI data archive and source repository
- To obtain:
- Fill out online form: <http://nccstag.gsfc.nasa.gov/...>
- Use Sponsor Code Account: “a930b”
- Request access to “sourcemotel” under “other platforms”
- Print, Sign, and Fax forms
- After creation of sourcemotel account contact _[Thomas.L.Clune@nasa.gov](mailto:Thomas.L.Clune@nasa.gov)_ to be added to GMI project (for access to repository and bulletin board)

## Sourcemotel

- Live demonstration?

## Existing Coding Standards (LLNL)

- Any include files need a ".h" suffix; use a ".F" suffix for the other source files.
- Use the "# include" preprocessor declaration to bring in include files.
- Use "implicit none"; declare all variables.
- All real declarations need to be "real*8" (including function returns).
- Change any "e" exponents to "d"; add "d0" to any real numbers that don't have an exponent.
- Do not use the "Real" or "Float" intrinsic function; just assign the variable, etc. to a variable that is declared as real*8.
- Use generic calls for any intrinsic functions (e.g., use Max, not Amax1).
- Use our gmi_phys_constants.h file for all common physical constants.
- Put a "c $Id: README.softw,v 1.1.1.1 2003/06/12 14:24:29 oloso Exp $" at the top of each file that will be archived.

## Coding Standards Document

- Living document to be added to repository.
- Possibly contradicts some extant GMI software.
- Items either mandatory or strongly encouraged.
- Areas of concern:
- Portability/Safety
- Avoid non-standard implementations
- Use implicit none, etc.
- Encapsulation - pass all data through interfaces
- Numerical accuracy
- Parallelization
- Software engineering (where to put things and what to call them).
- ESMF?

## Background

- NASA’s Earth Science Technology Office proposed the creation of anEarth System Modeling Framework (ESMF) in the September 2000 NASA Cooperative Agreement Notice:
- “Increasing Interoperability and Performance of Grand Challenge Applications in the Earth, Space, Life and Microgravity Sciences”
- A large, interagency collaboration with roots in the Common Modeling Infrastructure Working Group proposed three interlinked projects to develop and deploy the ESMF, which were all funded:
- Part I:  Core ESMF Development (PI:  Killeen, NCAR)
- Part II:  Modeling Applications (PI:  Marshall, MIT)
- Part III:  Data Assimilation Applications (PI:  da Silva, NASA GMAO)

## ESMF Project Description

- GOALS: To increase software reuse, interoperability, ease of use and performance portability in climate, weather, and data assimilation applications
- PRODUCTS:
- Core framework:  Software for coupling geophysical components and utilities for building components
- Applications:  Deployment of the ESMF in 15 of the nation’s leading climate and weather models, assembly of 8 new science-motivated applications
- METRICS:
- RESOURCES and TIMELINE: $9.8M over 3 years

| Reuse | Interoperability | Ease of Adoption | Performance  |
| --- | --- | --- | --- |
| 15 applications use ESMF component coupling services and 3+ utilities | 8 new applications comprised of never-before coupled components | 2 codes adopt ESMF with < 2% lines of code changed, or within 120 FTE-hours | No more than 10% overhead in time to solution, no degradation in scaling |

## Architecture

**ESMF provides a toolkit that ****components use to**
**increase interoperability**
**improve performance ****portability**
**abstract common services**

***Becoming an ESMF Component***
**Pack model import and export data into ESMF data structures and conform to a standard calendar.  Use ESMF utilities internally as desired.  Organize model using standard ESMF methods:  Initialize, Run, Finalize, ReadRestart, WriteRestart.  Methods may be multi-phase (Run phase=1, Run phase=2).  Method interfaces are prescribed.**
**Instantiate an ESMF Component with name, type, config information.  Register standard model methods with Component.  If desired, register data.**
**Use ESMF AppDriver to sequence and run Components.**
** **

- ESMF

**Low Level Utilities**

**Fields and Grids Layer**

**Model Layer**

**Components Layer:**
**Gridded Components**
**Coupler Components**

**ESMF Infrastructure**

**User Code**

**ESMF Superstructure**

**BLAS, MPI, NetCDF, ...**

**External Libraries**

## Time Line

| May 2002 | Draft Developer’s Guide and Requirements Document completed
1st Community Requirements Meeting and review held in D.C. |
| --- | --- |
| July 2002 | ESMF VAlidation (EVA) suite assembled  |
| August 2002 | Architecture Document:  major classes and their relationships
Implementation Report:  language strategy and programming model
Software Build and Test Plan:  sequencing and validation |
| May 2003 | ESMF Version 1.0 release, 2nd Community Meeting at GFDL |
| November 2003 | First 3 interoperability experiments completed |
| April 2004 | Second API and production software release, 3rd Community Meeting |
| November 2004 | All interoperability experiments complete; all testbed applications compliant |
| January 2005 | Final delivery of source code and documentation |

- ESMF

## ESMF & GMI

- ESMF superstructure is the preferred technology for coupling *new* components/modules.
- ESMF infrastructure
- Potentially useful
- Considered on case-by-case basis
- Leverage GSFC GMAO support for Lin-Rood dynamical core
- Possibly reduce “technology hysteresis” with contributing members.