! $Header: /home/ubuntu/mnt/e9_copy/MITgcm_contrib/PRM/prmtop_mod.dir/src/main.F90,v 1.2 2005/04/08 14:55:40 cnh Exp $ ! $Name: $ ! Top level ESMF based driver for PRM embedded model configuration ! A PRM configuration consists of one coarse grid model configuration ! and one or more fine grid configurations that span a subset of the ! physical grid in the coarse grid configuration at higher resolution. ! In addition special pieces of code that couple the coarse model ! to the fine model and the fine model to the coarse model are part ! of the setup. Each of these pieces (the coarse grid model, the fine ! grid models and the coarse to fine and fine to coarse coupling code) ! is called a component. The setup is controlled by a top-level file of ! settings that specifies the number of components to create and ! associates names with those components that are used to distinguish ! their roles. ! ! == Global data == ! PRMTop :: top level module for PRM driver. ! EEsmf_Mod :: ESMF extras module USE PRMTop USE EEsmf_Mod ! == Local data == ! theComponents :: List of "components" that make up a ! :: PRM configuration. TYPE( EEsmfComponentList ), POINTER :: theComponents ! Boot up ESMF ! Calls ESMF initialization and reads in settings from ! top-level startup file. ! This creates the default VM which spans the entire set ! of PET's (processors) available. CALL EEsmfBoot( 'eesmf.rc' ) ! Setup the components. Returns an EEsmfComponentList ! variable containing all the components that make up ! the PRM configuration. These will be partitioned over ! the PET's according to the PRM comfiguration file. CALL ComponentsInit( theComponents ) ! Run the components. Pass down the component list that ! contains all the components that are to be executed in this ! PRM configuration. CALL ComponentsRun( theComponents ) ! Clean up as needed ! Deallocate memory and write out remaining I/O. CALL ComponentsFinalize( theComponents ) END