main Program

Uses

  • program~~main~8~~UsesGraph program~main~8 main ESMF ESMF program~main~8->ESMF module~mapl_abstractcomponent mapl_AbstractComponent program~main~8->module~mapl_abstractcomponent module~mapl_abstractframeworkcomponent mapl_AbstractFrameworkComponent program~main~8->module~mapl_abstractframeworkcomponent module~mapl_compositecomponent mapl_CompositeComponent program~main~8->module~mapl_compositecomponent module~mapl_concretecomposite mapl_ConcreteComposite program~main~8->module~mapl_concretecomposite module~mapl_maplgenericcomponent mapl_MaplGenericComponent program~main~8->module~mapl_maplgenericcomponent module~usercomponent_mod UserComponent_mod program~main~8->module~usercomponent_mod module~mapl_surrogateframeworkcomponent mapl_SurrogateFrameworkComponent module~mapl_abstractframeworkcomponent->module~mapl_surrogateframeworkcomponent module~mapl_compositecomponent->module~mapl_abstractframeworkcomponent module~mapl_compositecomponent->module~mapl_concretecomposite module~mapl_abstractcomposite mapl_AbstractComposite module~mapl_compositecomponent->module~mapl_abstractcomposite module~mapl_concretecomposite->module~mapl_abstractframeworkcomponent gFTL_StringVector gFTL_StringVector module~mapl_concretecomposite->gFTL_StringVector module~mapl_concretecomposite->module~mapl_abstractcomposite module~mapl_stringcompositemap mapl_StringCompositeMap module~mapl_concretecomposite->module~mapl_stringcompositemap module~mapl_maplgenericcomponent->ESMF module~mapl_maplgenericcomponent->module~mapl_abstractcomponent module~mapl_maplgenericcomponent->module~mapl_abstractframeworkcomponent module~mapl_maplgenericcomponent->module~mapl_compositecomponent module~mapl_maplgenericcomponent->module~mapl_concretecomposite module~mapl_baseframeworkcomponent mapl_BaseFrameworkComponent module~mapl_maplgenericcomponent->module~mapl_baseframeworkcomponent module~mapl_entrypointvector MAPL_EntryPointVector module~mapl_maplgenericcomponent->module~mapl_entrypointvector module~mapl_errorhandlingmod mapl_ErrorHandlingMod module~mapl_maplgenericcomponent->module~mapl_errorhandlingmod module~mapl_keywordenforcermod mapl_KeywordEnforcerMod module~mapl_maplgenericcomponent->module~mapl_keywordenforcermod module~mapl_maplcomponent mapl_MaplComponent module~mapl_maplgenericcomponent->module~mapl_maplcomponent module~mapl_maplgrid mapl_MaplGrid module~mapl_maplgenericcomponent->module~mapl_maplgrid module~mapl_openmp_support MAPL_OpenMP_Support module~mapl_maplgenericcomponent->module~mapl_openmp_support module~mapl_runentrypoint MAPL_RunEntryPoint module~mapl_maplgenericcomponent->module~mapl_runentrypoint module~pflogger pflogger module~mapl_maplgenericcomponent->module~pflogger module~usercomponent_mod->ESMF module~usercomponent_mod->module~mapl_errorhandlingmod module~usercomponent_mod->module~mapl_keywordenforcermod module~usercomponent_mod->module~mapl_maplcomponent module~mapl_baseframeworkcomponent->ESMF module~mapl_baseframeworkcomponent->module~mapl_abstractcomponent module~mapl_baseframeworkcomponent->module~mapl_abstractframeworkcomponent module~mapl_baseframeworkcomponent->module~mapl_compositecomponent module~mapl_baseframeworkcomponent->module~mapl_maplgrid module~mapl_baseframeworkcomponent->module~mapl_surrogateframeworkcomponent module~mapl_componentspecification mapl_ComponentSpecification module~mapl_baseframeworkcomponent->module~mapl_componentspecification module~mapl_entrypointvector->module~mapl_runentrypoint module~mapl_errorhandling mapl_ErrorHandling module~mapl_errorhandlingmod->module~mapl_errorhandling module~mapl_keywordenforcer mapl_KeywordEnforcer module~mapl_keywordenforcermod->module~mapl_keywordenforcer module~mapl_maplcomponent->ESMF module~mapl_maplcomponent->module~mapl_errorhandlingmod module~mapl_maplcomponent->module~mapl_keywordenforcermod module~mapl_maplcomponent->module~mapl_surrogateframeworkcomponent module~mapl_maplcomponent->module~pflogger module~mapl_basecomponent mapl_BaseComponent module~mapl_maplcomponent->module~mapl_basecomponent module~mapl_maplgrid->ESMF module~mapl_maplgrid->module~mapl_errorhandlingmod module~mapl_maplgrid->module~mapl_keywordenforcermod module~mapl_maplgrid->module~pflogger module~mapl_constantsmod MAPL_ConstantsMod module~mapl_maplgrid->module~mapl_constantsmod module~mapl_openmp_support->ESMF module~mapl_openmp_support->module~mapl_keywordenforcermod module~mapl_openmp_support->module~mapl_maplgrid module~mapl_exceptionhandling MAPL_ExceptionHandling module~mapl_openmp_support->module~mapl_exceptionhandling module~mapl_stringcompositemap->module~mapl_abstractcomposite module~pfl_keywordenforcermod PFL_KeywordEnforcerMod module~pflogger->module~pfl_keywordenforcermod module~pfl_logger PFL_Logger module~pflogger->module~pfl_logger module~pfl_loggermanager PFL_LoggerManager module~pflogger->module~pfl_loggermanager module~pfl_severitylevels PFL_SeverityLevels module~pflogger->module~pfl_severitylevels module~pfl_wraparray PFL_WrapArray module~pflogger->module~pfl_wraparray

Calls

program~~main~8~~CallsGraph program~main~8 main add_child_component add_child_component program~main~8->add_child_component none~get_component ConcreteComposite%get_component program~main~8->none~get_component none~set_name~3 BaseComponent%set_name program~main~8->none~set_name~3 run_child run_child program~main~8->run_child set_composite set_composite program~main~8->set_composite

Variables

Type Attributes Name Initial
integer :: status
type(ESMF_Clock) :: clock
class(AbstractFrameworkComponent), pointer :: child_a => null()
class(AbstractFrameworkComponent), pointer :: child_o => null()
class(AbstractFrameworkComponent), pointer :: grandchild
class(AbstractFrameworkComponent), pointer :: root
type(ConcreteComposite), target :: root_composite
type(MaplGenericComponent), target :: tmp
type(UserComponent) :: agcm
type(UserComponent) :: dynamics
type(UserComponent) :: gcm
type(UserComponent) :: ogcm
type(UserComponent) :: physics

Source Code

program main
   use ESMF
   use mapl_MaplGenericComponent
   use mapl_ConcreteComposite
   use UserComponent_mod
   use mapl_AbstractComponent
   use mapl_AbstractFrameworkComponent
   use mapl_CompositeComponent
   implicit none

   type(MaplGenericComponent), target :: tmp
   class(AbstractFrameworkComponent), pointer :: child_o => null()
   class(AbstractFrameworkComponent), pointer :: child_a => null()
   class(AbstractFrameworkComponent), pointer :: grandchild
   type(UserComponent) :: gcm
   type(UserComponent) :: agcm, ogcm
   type(UserComponent) :: dynamics, physics
   type(ESMF_Clock) :: clock
   integer :: status

   type(ConcreteComposite), target :: root_composite
   class(AbstractFrameworkComponent), pointer :: root

   call gcm%set_name('GCM')
   call agcm%set_name('AGCM')
   call ogcm%set_name('OGCM')
   call dynamics%set_name('DYN')
   call physics%set_name('PHYSICS')


   root_composite = ConcreteComposite(tmp)
   root => root_composite%get_component()
   call root%set_composite(root_composite) ! close the circular structure

   child_a => root%add_child_component('agcm', agcm)
   grandchild => child_a%add_child_component('dynamics', dynamics)
   grandchild => child_a%add_child_component('physics', physics)

   child_o => root%add_child_component('ogcm', ogcm)

   call root%run_child('agcm', clock, 'phase', rc=status)

   call child_a%run_child('dynamics', clock, 'phase', rc=status)
   call child_a%run_child('physics', clock, 'phase', rc=status)

   call root%run_child('ogcm', clock, 'phase', rc=status)
   
end program main