ESMF_DistGridConnectionInt Subroutine

private subroutine ESMF_DistGridConnectionInt(connection, tileIndexA, tileIndexB, positionVector, keywordEnforcer, orientationVector, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(out), target :: connection(:)
integer, intent(in) :: tileIndexA
integer, intent(in) :: tileIndexB
integer, intent(in) :: positionVector(:)
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(in), optional :: orientationVector(:)
integer, intent(out), optional :: rc

Calls

proc~~esmf_distgridconnectionint~~CallsGraph proc~esmf_distgridconnectionint ESMF_DistGridConnectionInt c_esmc_distgridconnection c_esmc_distgridconnection proc~esmf_distgridconnectionint->c_esmc_distgridconnection interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_distgridconnectionint->interface~esmf_interarraycreate proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_distgridconnectionint->proc~esmf_interarraydestroy proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_distgridconnectionint->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_distgridconnectionint~~CalledByGraph proc~esmf_distgridconnectionint ESMF_DistGridConnectionInt proc~esmf_distgridconnectionset ESMF_DistGridConnectionSet proc~esmf_distgridconnectionset->proc~esmf_distgridconnectionint proc~calculateconnection CalculateConnection proc~calculateconnection->proc~esmf_distgridconnectionset proc~create_distribution create_distribution proc~create_distribution->proc~esmf_distgridconnectionset proc~esmf_gridcreate1peridimufrmb ESMF_GridCreate1PeriDimUfrmB proc~esmf_gridcreate1peridimufrmb->proc~esmf_distgridconnectionset proc~esmf_gridcreatefrmgrid ESMF_GridCreateFrmGrid proc~esmf_gridcreatefrmgrid->proc~esmf_distgridconnectionset proc~esmf_gridcreatemosaicireg ESMF_GridCreateMosaicIReg proc~esmf_gridcreatemosaicireg->proc~esmf_distgridconnectionset proc~esmf_gridcreatemosaicreg ESMF_GridCreateMosaicReg proc~esmf_gridcreatemosaicreg->proc~esmf_distgridconnectionset proc~setup1periodicconn Setup1PeriodicConn proc~setup1periodicconn->proc~esmf_distgridconnectionset proc~setup2periodicconn Setup2PeriodicConn proc~setup2periodicconn->proc~esmf_distgridconnectionset proc~setuptileconn SetupTileConn proc~setuptileconn->proc~esmf_distgridconnectionset proc~test_regrid2tiledg test_regrid2TileDG proc~test_regrid2tiledg->proc~esmf_distgridconnectionset proc~test_regrid2tiledg~2 test_regrid2TileDG proc~test_regrid2tiledg~2->proc~esmf_distgridconnectionset proc~test_regriddgsph test_regridDGSph proc~test_regriddgsph->proc~esmf_distgridconnectionset program~esmf_arrayhaloex ESMF_ArrayHaloEx program~esmf_arrayhaloex->proc~esmf_distgridconnectionset program~esmf_arrayhaloutest ESMF_ArrayHaloUTest program~esmf_arrayhaloutest->proc~esmf_distgridconnectionset program~esmf_distgridcreategetutest ESMF_DistGridCreateGetUTest program~esmf_distgridcreategetutest->proc~esmf_distgridconnectionset program~esmf_distgridex ESMF_DistGridEx program~esmf_distgridex->proc~esmf_distgridconnectionset program~esmf_fieldioutest ESMF_FieldIOUTest program~esmf_fieldioutest->proc~esmf_distgridconnectionset

Source Code

  subroutine ESMF_DistGridConnectionInt(connection, tileIndexA, tileIndexB, &
    positionVector, keywordEnforcer, orientationVector, rc)
!
! !ARGUMENTS:
    integer,        target, intent(out)           :: connection(:)
    integer,                intent(in)            :: tileIndexA
    integer,                intent(in)            :: tileIndexB
    integer,                intent(in)            :: positionVector(:)
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,                intent(in),  optional :: orientationVector(:)
    integer,                intent(out), optional :: rc
!
! !DESCRIPTION:
!   This call helps to construct a DistGrid connection,
!   which is a simple vector of integers, out of its components.
!
!   The arguments are:
!   \begin{description}
!   \item[connection] 
!     Element to be constructed. The provided {\tt connection} array must 
!     be dimensioned to hold exactly the number of integers that result from
!     the input information.
!   \item[tileIndexA] 
!     Index of one of the two tiles that are to be connected.
!   \item[tileIndexB] 
!     Index of one of the two tiles that are to be connected.
!   \item[positionVector] 
!     Position of tile B's minIndex with respect to tile A's minIndex.
!   \item[{[orientationVector]}]
!     Associates each dimension of tile A with a dimension in tile B's 
!     index space. Negative index values may be used to indicate a 
!     reversal in index orientation. It is erroneous to associate multiple
!     dimensions of tile A with the same index in tile B. By default
!     {\tt orientationVector = (/1,2,3,.../)}, i.e. same orientation as tile A.
!   \item[{[rc]}] 
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer               :: localrc      ! local return code
    type(ESMF_InterArray) :: connectionArg        ! helper variable
    type(ESMF_InterArray) :: positionVectorArg    ! helper variable
    type(ESMF_InterArray) :: orientationVectorArg ! helper variable

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL
    
    ! Deal with (optional) array arguments
    connectionArg = ESMF_InterArrayCreate(connection, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    positionVectorArg = ESMF_InterArrayCreate(positionVector, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    orientationVectorArg = ESMF_InterArrayCreate(orientationVector, &
      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_DistGridConnection(connectionArg, &
      tileIndexA, tileIndexB, positionVectorArg, orientationVectorArg, &
      localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
      
    ! garbage collection
    call ESMF_InterArrayDestroy(connectionArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_InterArrayDestroy(positionVectorArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_InterArrayDestroy(orientationVectorArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    
    ! return successfully
    if (present(rc)) rc = ESMF_SUCCESS
 
  end subroutine ESMF_DistGridConnectionInt