ESMF_RouteHandleCreateRH Function

private function ESMF_RouteHandleCreateRH(routehandle, keywordEnforcer, originPetList, targetPetList, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_RouteHandle), intent(in) :: routehandle
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(in), optional :: originPetList(:)
integer, intent(in), optional :: targetPetList(:)
integer, intent(out), optional :: rc

Return Value type(ESMF_RouteHandle)


Calls

proc~~esmf_routehandlecreaterh~~CallsGraph proc~esmf_routehandlecreaterh ESMF_RouteHandleCreateRH c_esmc_routehandlecreaterh c_esmc_routehandlecreaterh proc~esmf_routehandlecreaterh->c_esmc_routehandlecreaterh interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_routehandlecreaterh->interface~esmf_interarraycreate proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_routehandlecreaterh->proc~esmf_interarraydestroy proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_routehandlecreaterh->proc~esmf_logfounderror proc~esmf_interarraycreateptr ESMF_InterArrayCreatePtr interface~esmf_interarraycreate->proc~esmf_interarraycreateptr proc~esmf_interarraycreatetrg ESMF_InterArrayCreateTrg interface~esmf_interarraycreate->proc~esmf_interarraycreatetrg 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_interarraycreateptr->proc~esmf_logfounderror c_esmc_interarraycreate1d c_esmc_interarraycreate1d proc~esmf_interarraycreateptr->c_esmc_interarraycreate1d c_esmc_interarraycreate1di8 c_esmc_interarraycreate1di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate1di8 c_esmc_interarraycreate1dr8 c_esmc_interarraycreate1dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate1dr8 c_esmc_interarraycreate2d c_esmc_interarraycreate2d proc~esmf_interarraycreateptr->c_esmc_interarraycreate2d c_esmc_interarraycreate2di8 c_esmc_interarraycreate2di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate2di8 c_esmc_interarraycreate2dr8 c_esmc_interarraycreate2dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate2dr8 c_esmc_interarraycreate3d c_esmc_interarraycreate3d proc~esmf_interarraycreateptr->c_esmc_interarraycreate3d c_esmc_interarraycreate3di8 c_esmc_interarraycreate3di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate3di8 c_esmc_interarraycreate3dr8 c_esmc_interarraycreate3dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate3dr8 c_esmc_interarraysetinvalid c_esmc_interarraysetinvalid proc~esmf_interarraycreateptr->c_esmc_interarraysetinvalid proc~esmf_logseterror ESMF_LogSetError proc~esmf_interarraycreateptr->proc~esmf_logseterror proc~esmf_interarraycreatetrg->interface~esmf_interarraycreate proc~esmf_interarraycreatetrg->proc~esmf_logfounderror proc~esmf_interarraycreatetrg->c_esmc_interarraysetinvalid proc~esmf_logfounddeallocerror->esmf_breakpoint proc~esmf_logfounddeallocerror->proc~esmf_logrc2msg proc~esmf_logfounddeallocerror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget proc~esmf_logseterror->esmf_breakpoint proc~esmf_logseterror->proc~esmf_logrc2msg proc~esmf_logseterror->proc~esmf_logwrite

Called by

proc~~esmf_routehandlecreaterh~~CalledByGraph proc~esmf_routehandlecreaterh ESMF_RouteHandleCreateRH interface~esmf_routehandlecreate ESMF_RouteHandleCreate interface~esmf_routehandlecreate->proc~esmf_routehandlecreaterh proc~fieldbundlecplstore FieldBundleCplStore proc~fieldbundlecplstore->interface~esmf_routehandlecreate program~esmf_arraybundleredistutest ESMF_ArrayBundleRedistUTest program~esmf_arraybundleredistutest->interface~esmf_routehandlecreate program~esmf_infosyncutest ESMF_InfoSyncUTest program~esmf_infosyncutest->interface~esmf_routehandlecreate program~esmf_rhandlefromfileex ESMF_RHandleFromFileEx program~esmf_rhandlefromfileex->interface~esmf_routehandlecreate program~esmf_rhandlefromrhandleex ESMF_RHandleFromRHandleEx program~esmf_rhandlefromrhandleex->interface~esmf_routehandlecreate program~esmf_routehandleadvancedutest ESMF_RouteHandleAdvancedUTest program~esmf_routehandleadvancedutest->interface~esmf_routehandlecreate program~esmf_routehandleutest ESMF_RouteHandleUTest program~esmf_routehandleutest->interface~esmf_routehandlecreate proc~initializeipdv05p6b InitializeIPDv05p6b proc~initializeipdv05p6b->proc~fieldbundlecplstore proc~initializeipdv00p2b InitializeIPDv00p2b proc~initializeipdv00p2b->proc~initializeipdv05p6b

Source Code

  function ESMF_RouteHandleCreateRH(routehandle, keywordEnforcer, &
    originPetList, targetPetList, rc)
!
! !RETURN VALUE:
    type(ESMF_RouteHandle) :: ESMF_RouteHandleCreateRH
!
! !ARGUMENTS:
    type(ESMF_RouteHandle), intent(in)            :: routehandle
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,                intent(in),  optional :: originPetList(:)
    integer,                intent(in),  optional :: targetPetList(:)
    integer,                intent(out), optional :: rc
!
! !DESCRIPTION:
!   Create a new {\tt ESMF\_RouteHandle} object from and existing RouteHandle.
!   The new RouteHandle can be created to function on a different petList than
!   the incoming RouteHandle.
!
!   The arguments are:
!   \begin{description}
!   \item[routehandle]
!     The RouteHandle object to be duplicated.
!   \item[{[originPetList]}]
!     \begin{sloppypar}
!     The petList on which the incoming {\tt routehandle} is defined to operate.
!     If present, then {\tt targetPetList} must also be present and of the same
!     size. The petLists are used to map origin PETs to target PETs. By
!     convention the petLists are constructed to first list the PETs of the
!     source component, followed by the PETs of the destination component.
!     Defaults, to the petList of the current component context, meaning that
!     the PETs in the RouteHandle are not modified.
!     \end{sloppypar}
!   \item[{[targetPetList]}]
!     \begin{sloppypar}
!     The petList on which the newly created RouteHandle is defined to operate.
!     If present, then {\tt originPetList} must also be present and of the same
!     size. The petLists are used to map origin PETs to target PETs. By
!     convention the petLists are constructed to first list the PETs of the
!     source component, followed by the PETs of the destination component.
!     Defaults, to the petList of the current component context, meaning that
!     the PETs in the RouteHandle are not modified.
!     \end{sloppypar}
!   \item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    type(ESMF_RouteHandle)  :: rhandle
    type(ESMF_InterArray)   :: originPetListArg
    type(ESMF_InterArray)   :: targetPetListArg

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL
    rhandle%this = ESMF_NULL_POINTER
    ESMF_RouteHandleCreateRH = rhandle

    ! Deal with (optional) array arguments
    originPetListArg = ESMF_InterArrayCreate(originPetList, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    targetPetListArg = ESMF_InterArrayCreate(targetPetList, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Call C++ create code
    call c_ESMC_RouteHandleCreateRH(rhandle, routehandle, originPetListArg, &
      targetPetListArg, localrc)
    if (ESMF_LogFoundError(localrc, &
      ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set return values
    ESMF_RouteHandleCreateRH = rhandle

    ! Garbage collection
    call ESMF_InterArrayDestroy(originPetListArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_InterArrayDestroy(targetPetListArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set init code
    ESMF_INIT_SET_CREATED(ESMF_RouteHandleCreateRH)

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

  end function ESMF_RouteHandleCreateRH