ESMF_GridGetPSlocPTile Subroutine

private subroutine ESMF_GridGetPSlocPTile(grid, tile, staggerloc, keywordEnforcer, minIndex, maxIndex, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Grid), intent(in) :: grid
integer, intent(in) :: tile
type(ESMF_StaggerLoc), intent(in) :: staggerloc
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional, target :: minIndex(:)
integer, intent(out), optional, target :: maxIndex(:)
integer, intent(out), optional :: rc

Calls

proc~~esmf_gridgetpslocptile~~CallsGraph proc~esmf_gridgetpslocptile ESMF_GridGetPSlocPTile c_esmc_gridgetpslocptile c_esmc_gridgetpslocptile proc~esmf_gridgetpslocptile->c_esmc_gridgetpslocptile interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_gridgetpslocptile->interface~esmf_interarraycreate proc~esmf_gridgetinit ESMF_GridGetInit proc~esmf_gridgetpslocptile->proc~esmf_gridgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_gridgetpslocptile->proc~esmf_imerr proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_gridgetpslocptile->proc~esmf_interarraydestroy proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_gridgetpslocptile->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_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_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

Called by

proc~~esmf_gridgetpslocptile~~CalledByGraph proc~esmf_gridgetpslocptile ESMF_GridGetPSlocPTile interface~esmf_gridget ESMF_GridGet interface~esmf_gridget->proc~esmf_gridgetpslocptile

Source Code

      subroutine ESMF_GridGetPSlocPTile(grid, tile, staggerloc, &
        keywordEnforcer, minIndex, maxIndex, rc)

!
! !ARGUMENTS:
      type(ESMF_Grid),        intent(in)            :: grid
      integer,                intent(in)            :: tile
      type (ESMF_StaggerLoc), intent(in)            :: staggerloc
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer,        target, intent(out), optional :: minIndex(:)
      integer,        target, intent(out), optional :: maxIndex(:)
      integer,                intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
!  This method gets information about a particular stagger location.
!  This information is useful for creating an ESMF Array to hold
!  the data at the stagger location.
!
!The arguments are:
!\begin{description}
!\item[grid]
!    Grid to get the information from.
!\item[tile]
!     The tile number to get the data from. Tile numbers range from 1 to TileCount.
!\item[staggerloc]
!     The stagger location to get the information for.
!     Please see Section~\ref{const:staggerloc} for a list
!     of predefined stagger locations.
!\item[{[minIndex]}]
!     Upon return this holds the global lower index of this stagger location.
!     {\tt minIndex} must be allocated to be of size equal to the grid DimCount.
!     Note that this value is only for the first Grid tile, as multigrid support
!     is added, this interface will likely be changed or moved to adapt.
!\item[{[maxIndex]}]
!     Upon return this holds the global upper index of this stagger location.
!     {\tt maxIndex} must be allocated to be of size equal to the grid DimCount.
!     Note that this value is only for the first Grid tile, as multigrid support
!     is added, this interface will likely be changed or moved to adapt.
!\item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!\end{description}
!
!EOP

    integer :: localrc ! local error status
    type(ESMF_InterArray) :: minIndexArg ! helper variable
    type(ESMF_InterArray) :: maxIndexArg ! helper variable
    integer :: tmp_staggerloc

    ! Initialize return code
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_GridGetInit, grid, rc)
    tmp_staggerloc=staggerloc%staggerloc

    ! process optional arguments
    minIndexArg=ESMF_InterArrayCreate(minIndex, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    maxIndexArg=ESMF_InterArrayCreate(maxIndex, 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_GridGetPSlocPTile(grid, tile, tmp_staggerLoc, &
         minIndexArg, maxIndexArg,localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
       ESMF_CONTEXT, rcToReturn=rc)) return

    ! Deallocate interface ints
    call ESMF_InterArrayDestroy(minIndexArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_InterArrayDestroy(maxIndexArg, 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_GridGetPSlocPTile