MAPL_DoNotDeferExport Subroutine

public subroutine MAPL_DoNotDeferExport(GC, NAMES, RC)

For each entry in NAMES marks the export spec to not be deferred during MAPL_GenericInitialize.

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp), intent(inout) :: GC
character(len=*), intent(in) :: NAMES(:)
integer, intent(out), optional :: RC

Calls

proc~~mapl_donotdeferexport~~CallsGraph proc~mapl_donotdeferexport MAPL_DoNotDeferExport interface~mapl_assert MAPL_Assert proc~mapl_donotdeferexport->interface~mapl_assert interface~mapl_varspecgetindex MAPL_VarSpecGetIndex proc~mapl_donotdeferexport->interface~mapl_varspecgetindex interface~mapl_varspecset MAPL_VarSpecSet proc~mapl_donotdeferexport->interface~mapl_varspecset proc~mapl_internalstateretrieve MAPL_InternalStateRetrieve proc~mapl_donotdeferexport->proc~mapl_internalstateretrieve proc~mapl_return MAPL_Return proc~mapl_donotdeferexport->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_donotdeferexport->proc~mapl_verify proc~mapl_internalstateretrieve->proc~mapl_return proc~mapl_internalstateretrieve->proc~mapl_verify ESMF_GridCompGet ESMF_GridCompGet proc~mapl_internalstateretrieve->ESMF_GridCompGet ESMF_UserCompGetInternalState ESMF_UserCompGetInternalState proc~mapl_internalstateretrieve->ESMF_UserCompGetInternalState proc~mapl_internalstatecreate MAPL_InternalStateCreate proc~mapl_internalstateretrieve->proc~mapl_internalstatecreate at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception proc~mapl_internalstatecreate->proc~mapl_return proc~mapl_internalstatecreate->proc~mapl_verify proc~mapl_internalstatecreate->ESMF_GridCompGet ESMF_UserCompSetInternalState ESMF_UserCompSetInternalState proc~mapl_internalstatecreate->ESMF_UserCompSetInternalState none~get_component~4 ConcreteComposite%get_component proc~mapl_internalstatecreate->none~get_component~4 none~initialize~19 ConcreteComposite%initialize proc~mapl_internalstatecreate->none~initialize~19 none~set_composite~2 CompositeComponent%set_composite proc~mapl_internalstatecreate->none~set_composite~2

Source Code

   subroutine MAPL_DoNotDeferExport(GC, NAMES, RC)
      ! !ARGUMENTS:

      type (ESMF_GridComp)            , intent(INOUT)   :: GC
      character (len=*)               , intent(IN)      :: NAMES(:)
      integer            , optional   , intent(OUT)     :: RC

      character(len=ESMF_MAXSTR), parameter :: IAm="MAPL_DoNotDeferExport"
      integer                               :: status
      integer                               :: I, J, N, K
      type (MAPL_MetaComp), pointer         :: STATE

      call MAPL_InternalStateRetrieve(GC, STATE, RC=status)
      _VERIFY(status)

      if (associated(STATE%COMPONENT_SPEC%EXPORT%OLD_VAR_SPECS)) then
         N = size(STATE%COMPONENT_SPEC%EXPORT%OLD_VAR_SPECS)
         K = size(NAMES)

         DO I=1,K

            J = MAPL_VarSpecGetIndex(STATE%COMPONENT_SPEC%EXPORT%OLD_VAR_SPECS,NAMES(I))
            _ASSERT(J > 0, 'J is equal or less than 0')
            _ASSERT(J <= N, 'J is greater than N')

            call MAPL_VarSpecSet(STATE%COMPONENT_SPEC%EXPORT%OLD_VAR_SPECS(J),                         &
                 alwaysAllocate = .true.,                                     &
                 RC=status  )
            _VERIFY(status)
         END DO
      end if

      _RETURN(ESMF_SUCCESS)
   end subroutine MAPL_DoNotDeferExport