GriddedComponentDriver.F90 Source File


This file depends on

sourcefile~~griddedcomponentdriver.f90~~EfferentGraph sourcefile~griddedcomponentdriver.f90 GriddedComponentDriver.F90 sourcefile~componentdriver.f90 ComponentDriver.F90 sourcefile~griddedcomponentdriver.f90->sourcefile~componentdriver.f90 sourcefile~componentdrivervector.f90 ComponentDriverVector.F90 sourcefile~griddedcomponentdriver.f90->sourcefile~componentdrivervector.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~griddedcomponentdriver.f90->sourcefile~errorhandling.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~griddedcomponentdriver.f90->sourcefile~keywordenforcer.f90 sourcefile~multistate.f90 MultiState.F90 sourcefile~griddedcomponentdriver.f90->sourcefile~multistate.f90 sourcefile~componentdriver.f90->sourcefile~errorhandling.f90 sourcefile~componentdriver.f90->sourcefile~multistate.f90 sourcefile~maplshared.f90 MaplShared.F90 sourcefile~componentdriver.f90->sourcefile~maplshared.f90 sourcefile~componentdrivervector.f90->sourcefile~componentdriver.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~multistate.f90->sourcefile~errorhandling.f90 sourcefile~multistate.f90->sourcefile~keywordenforcer.f90 sourcefile~esmf_utilities.f90 ESMF_Utilities.F90 sourcefile~multistate.f90->sourcefile~esmf_utilities.f90 sourcefile~esmf_utilities.f90->sourcefile~errorhandling.f90 sourcefile~maplshared.f90->sourcefile~errorhandling.f90 sourcefile~maplshared.f90->sourcefile~keywordenforcer.f90 sourcefile~maplshared.f90->sourcefile~mapl_throw.f90 sourcefile~abstractcommsplitter.f90 AbstractCommSplitter.F90 sourcefile~maplshared.f90->sourcefile~abstractcommsplitter.f90 sourcefile~commgroupdescription.f90 CommGroupDescription.F90 sourcefile~maplshared.f90->sourcefile~commgroupdescription.f90 sourcefile~constants.f90 Constants.F90 sourcefile~maplshared.f90->sourcefile~constants.f90 sourcefile~downbit.f90 DownBit.F90 sourcefile~maplshared.f90->sourcefile~downbit.f90 sourcefile~dso_utilities.f90 DSO_Utilities.F90 sourcefile~maplshared.f90->sourcefile~dso_utilities.f90 sourcefile~filesystemutilities.f90 FileSystemUtilities.F90 sourcefile~maplshared.f90->sourcefile~filesystemutilities.f90 sourcefile~interp.f90 Interp.F90 sourcefile~maplshared.f90->sourcefile~interp.f90 sourcefile~mapl_dirpath.f90 MAPL_DirPath.F90 sourcefile~maplshared.f90->sourcefile~mapl_dirpath.f90 sourcefile~mapl_hash.f90 MAPL_Hash.F90 sourcefile~maplshared.f90->sourcefile~mapl_hash.f90 sourcefile~mapl_loadbalance.f90 MAPL_LoadBalance.F90 sourcefile~maplshared.f90->sourcefile~mapl_loadbalance.f90 sourcefile~mapl_minmax.f90 MAPL_MinMax.F90 sourcefile~maplshared.f90->sourcefile~mapl_minmax.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~maplshared.f90->sourcefile~mapl_range.f90 sourcefile~mapl_sleep.f90 MAPL_Sleep.F90 sourcefile~maplshared.f90->sourcefile~mapl_sleep.f90 sourcefile~mapl_sort.f90 MAPL_Sort.F90 sourcefile~maplshared.f90->sourcefile~mapl_sort.f90 sourcefile~shmem.f90 Shmem.F90 sourcefile~maplshared.f90->sourcefile~shmem.f90 sourcefile~simplecommsplitter.f90 SimpleCommSplitter.F90 sourcefile~maplshared.f90->sourcefile~simplecommsplitter.f90 sourcefile~splitcommunicator.f90 SplitCommunicator.F90 sourcefile~maplshared.f90->sourcefile~splitcommunicator.f90 sourcefile~string.f90 String.F90 sourcefile~maplshared.f90->sourcefile~string.f90 sourcefile~commgroupdescription.f90->sourcefile~keywordenforcer.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~commgroupdescription.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~internalconstants.f90 InternalConstants.F90 sourcefile~constants.f90->sourcefile~internalconstants.f90 sourcefile~mathconstants.f90 MathConstants.F90 sourcefile~constants.f90->sourcefile~mathconstants.f90 sourcefile~physicalconstants.f90 PhysicalConstants.F90 sourcefile~constants.f90->sourcefile~physicalconstants.f90 sourcefile~downbit.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~dso_utilities.f90->sourcefile~filesystemutilities.f90 sourcefile~mapl_dirpath.f90->sourcefile~keywordenforcer.f90 sourcefile~mapl_dirpath.f90->sourcefile~constants.f90 sourcefile~mapl_hash.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_loadbalance.f90->sourcefile~constants.f90 sourcefile~mapl_loadbalance.f90->sourcefile~mapl_sort.f90 sourcefile~mapl_loadbalance.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_range.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_sort.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~shmem.f90->sourcefile~constants.f90 sourcefile~simplecommsplitter.f90->sourcefile~keywordenforcer.f90 sourcefile~simplecommsplitter.f90->sourcefile~abstractcommsplitter.f90 sourcefile~simplecommsplitter.f90->sourcefile~commgroupdescription.f90 sourcefile~simplecommsplitter.f90->sourcefile~splitcommunicator.f90 sourcefile~simplecommsplitter.f90->sourcefile~mapl_exceptionhandling.f90

Files dependent on this one

sourcefile~~griddedcomponentdriver.f90~~AfferentGraph sourcefile~griddedcomponentdriver.f90 GriddedComponentDriver.F90 sourcefile~actualptcomponentdrivermap.f90 ActualPtComponentDriverMap.F90 sourcefile~actualptcomponentdrivermap.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~add_export_coupler.f90 add_export_coupler.F90 sourcefile~add_export_coupler.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~add_import_coupler.f90 add_import_coupler.F90 sourcefile~add_import_coupler.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~clock_advance.f90 clock_advance.F90 sourcefile~clock_advance.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~couplermetacomponent.f90 CouplerMetaComponent.F90 sourcefile~couplermetacomponent.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~finalize.f90~2 finalize.F90 sourcefile~finalize.f90~2->sourcefile~griddedcomponentdriver.f90 sourcefile~generic3g.f90 Generic3g.F90 sourcefile~generic3g.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~genericgridcomp.f90 GenericGridComp.F90 sourcefile~genericgridcomp.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~get_clock.f90 get_clock.F90 sourcefile~get_clock.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~get_gridcomp.f90~2 get_gridcomp.F90 sourcefile~get_gridcomp.f90~2->sourcefile~griddedcomponentdriver.f90 sourcefile~get_name.f90~2 get_name.F90 sourcefile~get_name.f90~2->sourcefile~griddedcomponentdriver.f90 sourcefile~get_states.f90 get_states.F90 sourcefile~get_states.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~griddedcomponentdrivermap.f90 GriddedComponentDriverMap.F90 sourcefile~griddedcomponentdrivermap.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~initialize.f90~2 initialize.F90 sourcefile~initialize.f90~2->sourcefile~griddedcomponentdriver.f90 sourcefile~mapl_generic.f90~2 MAPL_Generic.F90 sourcefile~mapl_generic.f90~2->sourcefile~griddedcomponentdriver.f90 sourcefile~new_griddedcomponentdriver.f90 new_GriddedComponentDriver.F90 sourcefile~new_griddedcomponentdriver.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~outermetacomponent.f90 OuterMetaComponent.F90 sourcefile~outermetacomponent.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~read_restart.f90 read_restart.F90 sourcefile~read_restart.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~run.f90 run.F90 sourcefile~run.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~run_export_couplers.f90 run_export_couplers.F90 sourcefile~run_export_couplers.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~run_import_couplers.f90 run_import_couplers.F90 sourcefile~run_import_couplers.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~set_clock.f90 set_clock.F90 sourcefile~set_clock.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~simpleconnection.f90 SimpleConnection.F90 sourcefile~simpleconnection.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~stateitemextension.f90 StateItemExtension.F90 sourcefile~stateitemextension.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~stateregistry.f90 StateRegistry.F90 sourcefile~stateregistry.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~test_configurablegridcomp.pf Test_ConfigurableGridComp.pf sourcefile~test_configurablegridcomp.pf->sourcefile~griddedcomponentdriver.f90 sourcefile~test_scenarios.pf Test_Scenarios.pf sourcefile~test_scenarios.pf->sourcefile~griddedcomponentdriver.f90 sourcefile~write_restart.f90~2 write_restart.F90 sourcefile~write_restart.f90~2->sourcefile~griddedcomponentdriver.f90

Source Code

#include "MAPL_Generic.h"

module mapl3g_GriddedComponentDriver
   use mapl3g_MultiState
   use mapl3g_ComponentDriver
   use mapl3g_ComponentDriverVector
   use mapl_ErrorHandlingMod
   use mapl_KeywordEnforcer, only: KE => KeywordEnforcer
   use :: esmf
   implicit none
   private

   public :: GriddedComponentDriver

   type, extends(ComponentDriver) :: GriddedComponentDriver
      private
      type(ESMF_GridComp) :: gridcomp
      type(MultiState) :: states
      type(ESMF_Clock) :: clock
      type(ComponentDriverVector) :: export_couplers
      type(ComponentDriverVector) :: import_couplers
   contains
      procedure :: run
      procedure :: initialize
      procedure :: finalize
      procedure :: read_restart
      procedure :: write_restart
      procedure :: clock_advance

      ! Accessors
      procedure :: get_clock
      procedure :: set_clock
      procedure :: get_states
      procedure :: get_gridcomp
      procedure :: get_name

      ! Couplers
      procedure :: run_export_couplers
      procedure :: run_import_couplers
      procedure :: add_export_coupler
      procedure :: add_import_coupler
   end type GriddedComponentDriver

   interface GriddedComponentDriver
      module procedure new_GriddedComponentDriver
   end interface GriddedComponentDriver

   interface

      module recursive subroutine initialize(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine initialize

      ! run_self() is implemented in submodule to avoid circular dependency
      ! on OuterMetaComponent.
      module recursive subroutine run(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine

      module recursive subroutine finalize(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine finalize

      module recursive subroutine read_restart(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine read_restart

      module recursive subroutine write_restart(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine write_restart

      module function get_states(this) result(states)
         type(MultiState) :: states
         class(GriddedComponentDriver), intent(in) :: this
      end function get_states

      module function get_clock(this) result(clock)
         use esmf, only: ESMF_Clock
         type(ESMF_Clock) :: clock
         class(GriddedComponentDriver), intent(in) :: this
      end function get_clock

      module subroutine set_clock(this, clock)
         use esmf, only: ESMF_Clock
         class(GriddedComponentDriver), intent(inout) :: this
         type(ESMF_Clock), intent(in) :: clock
      end subroutine set_clock

      recursive module subroutine run_export_couplers(this, unusable, phase_idx, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         class(KE), optional, intent(in) :: unusable
         integer, optional, intent(in) :: phase_idx
         integer, optional, intent(out) :: rc
      end subroutine run_export_couplers

      recursive module subroutine run_import_couplers(this, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         integer, optional, intent(out) :: rc
      end subroutine run_import_couplers

      module subroutine clock_advance(this, rc)
         class(GriddedComponentDriver), intent(inout) :: this
         integer, optional, intent(out) :: rc
      end subroutine clock_advance

      module function new_GriddedComponentDriver(gridcomp, clock, states) result(child)
         type(GriddedComponentDriver) :: child
         type(ESMF_GridComp), intent(in) :: gridcomp
         type(ESMF_Clock), intent(in) :: clock
         type(MultiState), intent(in) :: states
      end function new_GriddedComponentDriver

      module function get_gridcomp(this) result(gridcomp)
         use esmf, only: ESMF_GridComp
         type(ESMF_GridComp) :: gridcomp 
         class(GriddedComponentDriver), intent(in) :: this
      end function get_gridcomp

      module function get_name(this, rc) result(name)
         character(:), allocatable :: name
         class(GriddedComponentDriver), intent(in) :: this
         integer, optional, intent(out) :: rc
      end function get_name

      module subroutine add_export_coupler(this, driver)
         class(GriddedComponentDriver), intent(inout) :: this
         type(GriddedComponentDriver), intent(in) :: driver
      end subroutine add_export_coupler

      module subroutine add_import_coupler(this, driver)
         class(GriddedComponentDriver), intent(inout) :: this
         type(GriddedComponentDriver), intent(in) :: driver
      end subroutine add_import_coupler

   end interface

end module mapl3g_GriddedComponentDriver