MAPL Core

From Maplcode.org

Jump to: navigation, search

MAPL_Core refers to those elements of MAPL used to construct a single ESMF Gridded Component or to wrap a legacy code in ESMF. It consists primarily of generic versions of the standard ESMF methods:

Together these four methods constitute a valid ESMF gridded component, albeit one that does no useful work.

Typically, the generic methods are used to aid in the construction of ESMF components. All nontrivial leaf components will have to write a SetServices to register at least one of the three standard (IRF) methods and it is a MAPL requirement that it call GenericSetServices as the last thing before exiting. Components that require only simple initialization or finalization can use the generic Initialize or Finalize method instead of writing their own. Components requiring more complex Initial and Final services would write their own but still call the generic versions to do the simple "boilerplate" work. The generic Run method is useful only in building composite components and is discussed under MAPL_Connect. Refer to the pages on GenericSetServices, GenericInitialize, GenericFinalize, and GenericRun for more details on what these routines do and how to use them.

MAPL_Core also adds an Internal state analogous to ESMF's Import and Export states in which the user can place the component's true state variables. The main logic of MAPL core is that the user registers information about the contents of the three states with MAPL and these are then automatically created, restarted, checkpointed, and destroyed by generic Initialize and Finalize, relieving the user of these tasks.

The Generic methods and the mechanisms to describe the contents of the three states are the main ingredients in MAPL's recipe for building ESMF Gridded Components. Examples and more information on the workings of MAPL_Core can be found An Introduction to MAPL (pdf).