240 likes | 366 Views
USE OF ESMF IN THE GEOS-5 MODELING AND ASSIMILATION SYSTEM. GEOS-5 ESMF Design Overview THE GEOS-Generic Library 21 JULY 2005. GEOS-5 ESMF DESIGN.
E N D
USE OF ESMF IN THE GEOS-5MODELING AND ASSIMILATION SYSTEM GEOS-5 ESMF Design Overview THE GEOS-Generic Library 21 JULY 2005
GEOS-5 ESMF DESIGN • In GEOS-5 we chose to use a fine-grain component design –– ESMF components are used down to the parameterization level; they must therefore be fairly light-weight. • We use a hierarchical topology, using Composite Components, and so we are concerned with the relations (couplings) between parents and children, and between siblings, cousins, etc.
Composite Components Composite Components (CCs) are ESMF Gridded Components GCs) that can spawn instances of other components by having USE association to their SetServices methods. CCs create instances of their children, declare their import and export states, and control the execution of their ESMF registered methods. Further, since CCs own the children’s import and export states, they can move data amongst them. They can thus serve “couplers”
Composite Components The children actually instanciated by a CC and the number of instances of each can be dynamic––it is decided when the CC’s SetServices is invoked and can be controlled from a resource file. In particular, the number of instances of a child can be zero. Invoking the CC’s SetServices or any of its ESMF-registered methods, invokes them in all instances of its children and in all their progeny.
Composite Components In ESMF, GCs can be created with an optional grid and configuration specified by the parent. All GEOS-5 GCs expect to inherit both a grid and a configuration. The inherited configuration is treated in GEOS-5analogously to the environment in Unix.
ESMF Gridded Component ESMF Coupler Component Hierarchical Component Structure Small, light-weight gridded components based on GEOS_Generic services “Cap” COMPOSITE COMPONENTS (“physical” Couplers) “True” couplers Can be generic BASE COMPONENTS
GEOS-5 AGCM COMPONENT STRUCTURE CAP HISTORY AGCM COLUMN PHYSICS DYNAMICS (qv, ql, qi, cl,…) MOIST RADIATION FVCORE GWD TURB CHEM (u, v, T, p) SOLAR IR SURFACE LAKE LAND ICE (Ts,Fi...) (Ts,Fi...) CATCH OCEAN VEGDYN (Tc, qc, Td,...)
SINGLE-COLUMN MODEL CAP CAP AGCM DYNAMICS COLUMN PHYSICS DYNAMICS (qv, ql, qi, cl,…) MOIST RADIATION SURFACE FVCORE GWD CHEM TURB (u, v, T, p) SOLAR (ro3,…) IR SURFACE LAND LAKE (Ts,Fi...) (Tc, qc, Td,...) DATA OCEAN
GEOS-5 AGCM COMPONENT STRUCTURE CAP HISTORY AGCM COLUMN PHYSICS DYNAMICS MOIST RADIATION DYNAMICS TURB SOLAR FVCORE GWD IR SURFACE SURFACE CHEM LAKE LAND ICE (Ts,Fi...) (Ts,Fi...) CATCH OCEAN VEGDYN (Tc, qc, Td,...)
GEOS-5 AGCM COMPONENT STRUCTURE CAP HISTORY AGCM COLUMN PHYSICS DYNAMICS MOIST RADIATION DYNAMICS TURB SOLAR FVCORE GWD IR SURFACE SURFACE CHEM LAKE LAND ICE (Ts,Fi...) (Ts,Fi...) CATCH OCEAN VEGDYN (Tc, qc, Td,...)
COLUMN PHYSICS DYNAMICS MOIST RADIATION DYNAMICS TURB SOLAR FVCORE GWD IR SURFACE SURFACE CHEM LAKE LAND ICE (Ts,Fi...) CATCH (Ts,Fi...) OCEAN VEGDYN GEOS-5 COUPLED MODEL STRUCTURE HISTORY CAP COUPLED AGCM OGCM AGCM OGCM
COLUMN PHYSICS DYNAMICS MOIST RADIATION DYNAMICS TURB SOLAR FVCORE GWD IR SURFACE SURFACE CHEM LAKE LAND ICE (Ts,Fi...) CATCH (Ts,Fi...) OCEAN VEGDYN GEOS-5 Stand-Alone Ocean HISTORY CAP COUPLED AGCM OGCM AGCM OGCM Poseidon OBIO
COLUMN PHYSICS DYNAMICS MOIST RADIATION DYNAMICS TURB SOLAR FVCORE GWD IR SURFACE SURFACE CHEM LAKE LAND ICE (Ts,Fi...) CATCH (Ts,Fi...) OCEAN VEGDYN GEOS-5 Ocean DAS HISTORY CAP COUPLED AGCM AGCM OGCM AGCM OGCM OGCM OGCM OGCM OGCM OGCM OGCM OGCM OGCM OGCM OGCM
GEOS-GENERIC EXTENSIONS • Three major extensions of ESMF concepts: • GEOS Generic provides default Initialize, Run, and Finalize methods and a Generic SetServices to do ESMF “boilerplate” • In GEOS Generic, SetServices is extended to provide data and connectivity services. • GEOS Generic defines an InternalState
Inside an Instance of a GC ESMF Gridded Component Grid Config - - User Internal State(s) - - - - GEOS_Generic Object -”ESMF” Internal State
GEOS-GENERIC EXTENSIONS • Three major extensions of ESMF concepts: • GEOS Generic provides default Initialize, Run, and Finalize methods and a Generic SetServices to do ESMF “boilerplate” • In GEOS Generic, SetServices is extended to provide data and connectivity services. • GEOS Generic defines an Internal State
DATA SERVICES AND THE THREE STATES • Data services allow you to describe your import, export and internal states, giving each variable attributes like names, units, dimensionality, usage attributes, grid associations, etc. • Import states are read only to you. Export states are read only to others. This allows the passing of pointers rather than copies and so lightens the coupling. • GEOS Generic creates, allocates and initializes, as appropriate, variables in all three states, putting them in ESMF classes (Arrays, Fields, Bundles, States) that are used by the infrastructure. • Import and Internal states are optionally checkpointed and restarted by Generic Initialize and Generic Finalize.
CONNECTIVITY SERVICES • The connectivity services include: • declaration of children • control of how child’s and self’s imports and exports are connected to each other and to the outside • declaration of special “friendly” relationships between components that must operate on large or open-ended sets of state variables, etc. • Restrictions apply.
HISTORY Children’s imports are satisfied among by siblings or added to parent’s imports, until the reach the cap. Exports are passed up from child to parent, until they reach the cap, where they can be written out. CAP COLUMN PHYSICS MOIST RADIATION TURB CHEM SOLAR IR
GEOS-GENERIC EXTENSIONS • Three major extensions of ESMF concepts: • GEOS Generic provides default Initialize, Run, and Finalize methods and a Generic SetServices to do ESMF “boilerplate” • In GEOS Generic, SetServices is extended to provide data and connectivity services. • GEOS Generic defines an Internal State
AN ESMF GRIDDED COMPONENT module GEOS_DummyGridCompMod use GEOS_Mod, only :: GEOS_GenericSetServices end module GEOS_DummyGridCompMod
module GEOS_GridCompMod use ESMF_Mod use GEOS_Mod implicit none private public SetServices contains Subroutine SetServices(GC,RC) type(ESMF_GridComp), intent(INOUT) :: GC integer, optional, intent(OUT) :: RC call GEOS_GenericSetServices ( GC, RC ) call ESMF_GridCompSetEntryPoint ( GC, ESMF_SETRUN, Run, & ESMF_SINGLEPHASE, RC) ! Do data services ! Do connectivity services End subroutine SetServices Subroutine Run(GC…. ! Do your work End subroutine Run End module GEOS_GridCompMod
SUMMARY • GEOS-5 is a modeling and assimilation system based on many ESMF gridded components. • It uses a highly configurable hierarchical architecture • It relies on an implementation layer (GEOS-Generic) to facilitate the construction and coupling of the ESMF GCs.