can_connect_to.F90 Source File


This file depends on

sourcefile~~can_connect_to.f90~3~~EfferentGraph sourcefile~can_connect_to.f90~3 can_connect_to.F90 sourcefile~basicverticalgrid.f90 BasicVerticalGrid.F90 sourcefile~can_connect_to.f90~3->sourcefile~basicverticalgrid.f90 sourcefile~mirrorverticalgrid.f90 MirrorVerticalGrid.F90 sourcefile~can_connect_to.f90~3->sourcefile~mirrorverticalgrid.f90 sourcefile~modelverticalgrid.f90 ModelVerticalGrid.F90 sourcefile~can_connect_to.f90~3->sourcefile~modelverticalgrid.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~basicverticalgrid.f90->sourcefile~errorhandling.f90 sourcefile~griddedcomponentdriver.f90 GriddedComponentDriver.F90 sourcefile~basicverticalgrid.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~verticaldimspec.f90 VerticalDimSpec.F90 sourcefile~basicverticalgrid.f90->sourcefile~verticaldimspec.f90 sourcefile~verticalgrid.f90 VerticalGrid.F90 sourcefile~basicverticalgrid.f90->sourcefile~verticalgrid.f90 sourcefile~mirrorverticalgrid.f90->sourcefile~errorhandling.f90 sourcefile~mirrorverticalgrid.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~mirrorverticalgrid.f90->sourcefile~verticaldimspec.f90 sourcefile~mirrorverticalgrid.f90->sourcefile~verticalgrid.f90 sourcefile~modelverticalgrid.f90->sourcefile~errorhandling.f90 sourcefile~extensionaction.f90 ExtensionAction.F90 sourcefile~modelverticalgrid.f90->sourcefile~extensionaction.f90 sourcefile~extensionfamily.f90 ExtensionFamily.F90 sourcefile~modelverticalgrid.f90->sourcefile~extensionfamily.f90 sourcefile~fieldspec.f90 FieldSpec.F90 sourcefile~modelverticalgrid.f90->sourcefile~fieldspec.f90 sourcefile~modelverticalgrid.f90->sourcefile~griddedcomponentdriver.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~modelverticalgrid.f90->sourcefile~keywordenforcer.f90 sourcefile~stateitemextension.f90 StateItemExtension.F90 sourcefile~modelverticalgrid.f90->sourcefile~stateitemextension.f90 sourcefile~stateitemspec.f90 StateItemSpec.F90 sourcefile~modelverticalgrid.f90->sourcefile~stateitemspec.f90 sourcefile~stateregistry.f90 StateRegistry.F90 sourcefile~modelverticalgrid.f90->sourcefile~stateregistry.f90 sourcefile~ungriddeddims.f90 UngriddedDims.F90 sourcefile~modelverticalgrid.f90->sourcefile~ungriddeddims.f90 sourcefile~modelverticalgrid.f90->sourcefile~verticaldimspec.f90 sourcefile~modelverticalgrid.f90->sourcefile~verticalgrid.f90 sourcefile~virtualconnectionpt.f90 VirtualConnectionPt.F90 sourcefile~modelverticalgrid.f90->sourcefile~virtualconnectionpt.f90

Source Code

#include "MAPL_ErrLog.h"
submodule (mapl3g_BasicVerticalGrid) can_connect_to_smod
   use mapl3g_MirrorVerticalGrid
   use mapl3g_ModelVerticalGrid

contains

   logical module function can_connect_to(this, src, rc)
      class(BasicVerticalGrid), intent(in) :: this
      class(VerticalGrid), intent(in) :: src
      integer, optional, intent(out) :: rc

      select type(src)
      type is (BasicVerticalGrid)
         can_connect_to = (this%get_num_levels() == src%get_num_levels())
      type is (MirrorVerticalGrid)
         can_connect_to = .true.
      type is (ModelVerticalGrid)
         can_connect_to = (this%get_num_levels() == src%get_num_levels())
      class default
         _FAIL('BasicVerticalGrid can only connect to src BasicVerticalGrid, MirrorVerticalGrid, or ModelVerticalGrid instances.')
      end select

      _RETURN(_SUCCESS)
   end function can_connect_to

end submodule