ESMF_PointListCreateFrmInput Function

private function ESMF_PointListCreateFrmInput(maxpts, numdims, origCoordDim, origCoordSys, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: maxpts
integer, intent(in) :: numdims
integer, intent(in), optional :: origCoordDim
type(ESMF_CoordSys_Flag), intent(in), optional :: origCoordSys
integer, intent(out), optional :: rc

Return Value type(ESMF_PointList)


Source Code

  function ESMF_PointListCreateFrmInput(maxpts, numdims, &
       origCoordDim, origCoordSys, rc)
!
! !RETURN VALUE:
    type(ESMF_PointList) :: ESMF_PointListCreateFrmInput
!
! !ARGUMENTS:
    integer, intent(in)                            :: maxpts, numdims
    integer, intent(in), optional                  :: origCoordDim
    type(ESMF_CoordSys_Flag), intent(in), optional :: origCoordSys
    integer, intent(out), optional                 :: rc
!
! !DESCRIPTION:
!   Allocates memory for a new {\tt ESMF\_PointList} object and
!   constructs its internals from test input
!
!   The arguments are:
!   \begin{description}
!   \item[{maxpts}]
!     The maximum number of points to hold in the PointList.
!   \item[{numdims}]
!     The number of dimensions for points in the PointList.
!   \item[{[origCoordDim]}]
!     The number of dimensions for original (i.e. before conversion to Cart.) coords
!     If not specified or specified to 0, then no original coordinates are stored.     
!   \item[{[origCoordSys]}]
!    The coordinate system of the original coordinates.
!   \item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer             :: localrc      ! local return code
    type(ESMF_PointList)  :: pointlist

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

    ! Call C++ create code
    call c_ESMC_PointListCreateFrmInput(maxpts, numdims, pointlist, &
         origCoordDim, origCoordSys, localrc)

    if (ESMF_LogFoundError(localrc, &
      ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set return values
    ESMF_PointListCreateFrmInput = pointlist

    ESMF_INIT_SET_CREATED(ESMF_PointListCreateFrmInput)

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

  end function ESMF_PointListCreateFrmInput