ESMF_ArrayBundleRedistStoreI8 Subroutine

private subroutine ESMF_ArrayBundleRedistStoreI8(srcArrayBundle, dstArrayBundle, routehandle, factor, keywordEnforcer, ignoreUnmatchedIndicesFlag, srcToDstTransposeMap, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_ArrayBundle), intent(in) :: srcArrayBundle
type(ESMF_ArrayBundle), intent(inout) :: dstArrayBundle
type(ESMF_RouteHandle), intent(inout) :: routehandle
integer(kind=ESMF_KIND_I8), intent(in) :: factor
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
logical, intent(in), optional :: ignoreUnmatchedIndicesFlag(:)
integer, intent(in), optional :: srcToDstTransposeMap(:)
integer, intent(out), optional :: rc

Calls

proc~~esmf_arraybundlerediststorei8~~CallsGraph proc~esmf_arraybundlerediststorei8 ESMF_ArrayBundleRedistStoreI8 interface~c_esmc_arraybundlerediststore c_ESMC_ArrayBundleRedistStore proc~esmf_arraybundlerediststorei8->interface~c_esmc_arraybundlerediststore interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_arraybundlerediststorei8->interface~esmf_interarraycreate proc~esmf_arraybundlegetinit ESMF_ArrayBundleGetInit proc~esmf_arraybundlerediststorei8->proc~esmf_arraybundlegetinit proc~esmf_imerr ESMF_IMErr proc~esmf_arraybundlerediststorei8->proc~esmf_imerr proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_arraybundlerediststorei8->proc~esmf_interarraydestroy proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_arraybundlerediststorei8->proc~esmf_logfounderror proc~esmf_logseterror ESMF_LogSetError proc~esmf_arraybundlerediststorei8->proc~esmf_logseterror proc~esmf_routehandlesetinitcreated ESMF_RouteHandleSetInitCreated proc~esmf_arraybundlerediststorei8->proc~esmf_routehandlesetinitcreated proc~esmf_interarraycreateptr ESMF_InterArrayCreatePtr interface~esmf_interarraycreate->proc~esmf_interarraycreateptr proc~esmf_interarraycreatetrg ESMF_InterArrayCreateTrg interface~esmf_interarraycreate->proc~esmf_interarraycreatetrg proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~esmf_interarraydestroy->proc~esmf_logfounddeallocerror esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite proc~esmf_logseterror->esmf_breakpoint proc~esmf_logseterror->proc~esmf_logrc2msg proc~esmf_logseterror->proc~esmf_logwrite

Called by

proc~~esmf_arraybundlerediststorei8~~CalledByGraph proc~esmf_arraybundlerediststorei8 ESMF_ArrayBundleRedistStoreI8 interface~esmf_arraybundlerediststore ESMF_ArrayBundleRedistStore interface~esmf_arraybundlerediststore->proc~esmf_arraybundlerediststorei8 proc~esmf_gridcreatecopyfromnewdg ESMF_GridCreateCopyFromNewDG proc~esmf_gridcreatecopyfromnewdg->interface~esmf_arraybundlerediststore proc~esmf_locstreamcreatefromnewdg ESMF_LocStreamCreateFromNewDG proc~esmf_locstreamcreatefromnewdg->interface~esmf_arraybundlerediststore proc~user_init~2 user_init proc~user_init~2->interface~esmf_arraybundlerediststore program~esmf_arraybundleredistutest ESMF_ArrayBundleRedistUTest program~esmf_arraybundleredistutest->interface~esmf_arraybundlerediststore interface~esmf_gridcreate ESMF_GridCreate interface~esmf_gridcreate->proc~esmf_gridcreatecopyfromnewdg interface~esmf_locstreamcreate ESMF_LocStreamCreate interface~esmf_locstreamcreate->proc~esmf_locstreamcreatefromnewdg proc~esmf_gridcreatefrmncfile ESMF_GridCreateFrmNCFile proc~esmf_gridcreatefrmncfile->proc~esmf_gridcreatecopyfromnewdg proc~esmf_gridcreatefrmncfiledg ESMF_GridCreateFrmNCFileDG proc~esmf_gridcreatefrmncfiledg->proc~esmf_gridcreatecopyfromnewdg proc~esmf_locstreamcreatepetlist ESMF_LocStreamCreatePetList proc~esmf_locstreamcreatepetlist->proc~esmf_locstreamcreatefromnewdg

Source Code

  subroutine ESMF_ArrayBundleRedistStoreI8(srcArrayBundle, dstArrayBundle, &
    routehandle, factor, keywordEnforcer, ignoreUnmatchedIndicesFlag, &
    srcToDstTransposeMap, rc)
!
! !ARGUMENTS:
    type(ESMF_ArrayBundle), intent(in)            :: srcArrayBundle
    type(ESMF_ArrayBundle), intent(inout)         :: dstArrayBundle
    type(ESMF_RouteHandle), intent(inout)         :: routehandle
    integer(ESMF_KIND_I8),  intent(in)            :: factor
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    logical,                intent(in),  optional :: ignoreUnmatchedIndicesFlag(:)
    integer,                intent(in),  optional :: srcToDstTransposeMap(:)
    integer,                intent(out), optional :: rc
!
!EOPI
!------------------------------------------------------------------------------
    integer                       :: localrc      ! local return code
    type(ESMF_Logical), pointer   :: opt_ignoreUnmatched(:)
    type(ESMF_Logical), target    :: def_ignoreUnmatched(1)
    integer                       :: len_ignoreUnmatched
    type(ESMF_InterArray)         :: srcToDstTransposeMapArg

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_ArrayBundleGetInit, srcArrayBundle, rc)
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_ArrayBundleGetInit, dstArrayBundle, rc)
    
    ! Deal with ignoreUnmatchedIndicesFlag
    def_ignoreUnmatched(1) = .false.
    if (present(ignoreUnmatchedIndicesFlag)) then
      if (size(ignoreUnmatchedIndicesFlag)==0) then
        call ESMF_LogSetError(rcToCheck=ESMF_RC_ARG_SIZE, &
          msg="Size of 'ignoreUnmatchedIndicesFlag' argument must not be zero.",&
          ESMF_CONTEXT, rcToReturn=rc)
        return ! bail out
      endif
      allocate(opt_ignoreUnmatched(size(ignoreUnmatchedIndicesFlag)))
      opt_ignoreUnmatched(:) = ignoreUnmatchedIndicesFlag(:)
    else
      opt_ignoreUnmatched => def_ignoreUnmatched
    endif
    len_ignoreUnmatched = size(opt_ignoreUnmatched)

    ! Deal with srcToDstTransposeMap
    srcToDstTransposeMapArg = ESMF_InterArrayCreate(srcToDstTransposeMap, &
      rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Call into the C++ interface, which will sort out optional arguments
    call c_ESMC_ArrayBundleRedistStore(srcArrayBundle, dstArrayBundle, &
      routehandle, opt_ignoreUnmatched(1), len_ignoreUnmatched, &
      srcToDstTransposeMapArg, ESMF_TYPEKIND_I8, factor, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    
    ! Mark routehandle object as being created
    call ESMF_RouteHandleSetInitCreated(routehandle, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    
    ! garbage collection
    call ESMF_InterArrayDestroy(srcToDstTransposeMapArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    if (present(ignoreUnmatchedIndicesFlag)) then
      deallocate(opt_ignoreUnmatched)
    endif

    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end subroutine ESMF_ArrayBundleRedistStoreI8