ESMF_PointListGet Subroutine

public subroutine ESMF_PointListGet(pointlist, numpts, maxpts, dims, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_PointList), intent(in) :: pointlist
integer, intent(out), optional :: numpts
integer, intent(out), optional :: maxpts
integer, intent(out), optional :: dims
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_PointListGet(pointlist, numpts, maxpts, dims, rc)
!
! !ARGUMENTS:
    type(ESMF_PointList), intent(in) :: pointlist
    integer, intent(out), optional :: numpts
    integer, intent(out), optional :: maxpts
    integer, intent(out), optional :: dims
    integer, intent(out), optional :: rc
!
! !DESCRIPTION:
!     Returns information about an {\tt ESMF\_PointList}.
!
!     The arguments are:
!     \begin{description}
!     \item[pointlist]
!          {\tt ESMF\_PointList} to be queried.
!     \item[{[numpts]}]
!          Returns current number of points.
!     \item[{[maxpts]}]
!          Returns maximum number of points allowed.
!     \item[{[dims]}]
!          Returns number of dimensions for coordinates.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code

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

    ESMF_INIT_CHECK_DEEP(ESMF_PointListGetInit,pointlist,rc)

    if (present(numpts)) then
      call c_ESMC_PointListGetNumPts(pointlist, numpts, localrc)
      if (ESMF_LogFoundError(localrc, &
        ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif

    if (present(maxpts)) then
      call c_ESMC_PointListGetMaxPts(pointlist, maxpts, localrc)
      if (ESMF_LogFoundError(localrc, &
        ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif

    if (present(dims)) then
      call c_ESMC_PointListGetDims(pointlist, dims, localrc)
      if (ESMF_LogFoundError(localrc, &
        ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    endif


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

  end subroutine ESMF_PointListGet