160 likes | 319 Views
ESMF-based applications with the National Unified Operational Prediction Capability. Tim Campbell Naval Research Laboratory. Outline.
E N D
ESMF-based applications with the National Unified Operational Prediction Capability Tim Campbell Naval Research Laboratory
Outline Describe how NUOPC Layer is implemented in Navy ESM systems (focus on regional ESM). Hopefully, illuminate how NUOPC improves interoperability. Describe some areas that still need work. • Overview of COAMPS • Specialization of NUOPC Generic Components • Initialization Sequencing • Field Brokering • Further Developments in NUOPC
Coupled Ocean-Atmosphere Mesoscale Prediction System Regional coupled atmosphere/ocean/wave prediction system with data-assimilation.
Current Design with ESMF COAMPS_Driver ATM (internal surface layer) ESMF_GridComp (Initialize, Run, Finalize) Model connections controlled by COAMPS_Driver WAV OCN • No brokering of inter-model connections (set by input list of coupling fields) • COAMPS specific field names hardwired into models • Difficult to add new models and new coupling fields
Current Design with NUOPC-ESMF COAMPS_Driver (derived from NUOPC_Driver) ATM (internal surface layer) NUOPC_Connector (connect import state to export state, compute & execute regridrouteHandle(s)) NUOPC_Model (Multiphase Intialize, Run, Finalize) WAV OCN • Brokering of inter-model connections (NUOPC_Connector) • Coupling determined by model import fields (model specified BCs) • Field names obtained from NUOPC_FieldDictionary
Future Design with NUOPC-ESMF COAMPS_Driver (derived from NUOPC_Driver) ATM NUOPC_Model (Multiphase Intialize, Run, Finalize) NUOPC_Connector (connect import state to export state, compute & execute regridrouteHandle(s)) NUOPC_Mediator (flux calculations) MED ICE OCN WAV • Brokering of inter-model connections (NUOPC_Connector) • Coupling determined by model import fields (model specified BCs) • Field names obtained from NUOPC_FieldDictionary
Specialization from NUOPC_Driver use NUOPC_Driver, only: & routine_SetServices, & type_InternalState, & label_InternalState, & label_SetModelCount, & label_SetModelPetLists, & label_SetModelServices Required Methods: SetServices – set entry points for driver methods Specializing Methods: SetModelCount – set number of models controlled by driver SetModelPetLists – set processor layout for each model SetModelServices – call into SetServices for each model, define run sequence The run sequence encodes the order in which models and connectors are executed. Knowledge of inter-model data-dependencies is required.
Specialization from NUOPC_Model use NUOPC_Model, only: & routine_SetServices, & type_InternalState, & label_InternalState, & label_DataInitialize, & label_SetClock, & label_Advance Required Methods: SetServices – set entry points for model methods InitializeP0 – set version of NUOPC initialization sequence InitializeP1 – advertise import & exportable fields InitializeP2 – realize import fields & connected export fields Specializing Methods: SetClock – set internal clock DataInitialize – initialize export fields ModelAdvance – advance model in time
Specialization from NUOPC_Connector use NUOPC_Connector, only: & routine_SetServices, & type_InternalState, & label_InternalState, & label_ComputeRouteHandle, & label_ExecuteRouteHandle, & label_ReleaseRouteHandle Required Methods: SetServices – set entry points for connector methods Specializing Methods: ComputeRH – create & store export-to-import data routing ExecuteRH – execute export-to-import data routing ReleaseRH – destroy export-to-import data routing
ESMF to ESMF-NUOPC • Refactor code in each model’s ESMF layer • change single initialize phase into multiple phases and specializing attachable methods • change run phase to ModelAdvance method • acceptable amount of code change • resulting code is improved in that each method has a well-defined purpose that is understood by the driver • Implement new driver specialized from NUOPC_Driver • new driver is more streamlined and flexible • same driver will be used in several Navy ESM systems • Main challenge was in understanding the NUOPC API
Initialize Sequence – Satisfying Inter-model Data Dependencies ATM SST WIND WAV OCN SSH, SSC • OCN does not require import fields to compute initial state • ATM requires SST to compute initial state • WAV requires WIND, SSH and SSC to compute initial state
Initialize Sequence – Satisfying Inter-model Data Dependencies • Each model “knows” what is required in order to compute its initial state and export fields (e.g., WAV requires wind and currents) • In DataInitialize method each model: • checks time-stamp on import fields required to compute export fields • sets “Updated” attribute on updated export fields • Connector ExecuteRH method time-stamps import fields that are mapped from “Updated” export fields • Driver cycles Connector ExecuteRH and model DataInitialize methods until all models declare that initialize data-dependencies are satisfied or until a dead-lock is detected.
Initialize Sequence – Satisfying Inter-model Data Dependencies 2 ATM SST 3 WIND 2 1 2 3 WAV OCN SSH, SSC • Three steps of ExecuteRH & DataInitialize required • Each model only encodes its own required data dependencies • Driver executes generic sequence and detects dead-lock (no progress)
Field Brokering • Pre-NUOPC enabled COAMPS: • Fields do not have attributes • Inter-model connections imposed by driver using field name • COAMPS specific field names encoded into each model • NUOPC enabled COAMPS: • Fields have attributes (StandardName, Units, etc) • Inter-model connections based on StandardNames • NUOPC Field StandardNames encoded into each model • Models can query NUOPC FieldDictionary to obtain CanonicalUnits and default ShortName
Further Developments in NUOPC • Field Brokering • Establish a method for constructing StandardNames that uniquely identify fields • CF, CSDMS? • Establish method by with the run sequence can be determined from Model attributes. • similar to the initialize phase definition
Thank-You Questions?