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

GriddedComponentDriver.F90wActualPtComponentDriverMap.F90
w
wadd_export_coupler.F90
w
wadd_import_coupler.F90
w
wBasicVerticalGrid.F90
w
wclock_advance.F90
w
wCouplerMetaComponent.F90
w
wFieldSpec.F90
w
wfinalize.F90
w
wFixedLevelsVerticalGrid.F90
w
wGeneric3g.F90
w
wGenericCoupler.F90
w
wGenericGridComp.F90
w
wget_clock.F90
w
wget_gridcomp.F90
w
wget_name.F90
w
wget_states.F90
w
wGriddedComponentDriverMap.F90
w
winitialize.F90
w
wMAPL_Generic.F90
w
wMirrorVerticalGrid.F90
w
wModelVerticalGrid.F90
w
wnew_GriddedComponentDriver.F90
w
wOuterMetaComponent.F90
w
wread_restart.F90
w
wrun.F90
w
wrun_export_couplers.F90
w
wrun_import_couplers.F90
w
wset_clock.F90
w
wSimpleConnection.F90
w
wStateItemExtension.F90
w
wStateRegistry.F90
w
wTest_ModelVerticalGrid.pf
w
wTest_RunChild.pf
w
wTest_Scenarios.pf
w
wTest_SimpleParentGridComp.pf
w
wVerticalRegridAction.F90
w
wwrite_restart.F90
w

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