f_esmf_xgridgetcentroid Subroutine

subroutine f_esmf_xgridgetcentroid(xgrid, elemCount, dimCount, centroid, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_XGrid) :: xgrid
integer, intent(in) :: elemCount
integer, intent(in) :: dimCount
real(kind=ESMF_KIND_R8) :: centroid(1:elemCount,1:dimCount)
integer, intent(out) :: rc

Source Code

  subroutine f_esmf_xgridgetcentroid(xgrid, elemCount, dimCount, centroid, rc)

    use ESMF_XGridMod
    use ESMF_XGridGetMod
    use ESMF_XGridCreateMod
    use ESMF_XGridGeomBaseMod
    use ESMF_UtilTypesMod
    use ESMF_BaseMod
    use ESMF_LogErrMod
! XMRKX !
    implicit none

    type(ESMF_XGrid)               :: xgrid
    integer, intent(in)            :: elemCount
    integer, intent(in)            :: dimCount
    real(ESMF_KIND_R8)             :: centroid(1:elemCount,1:dimCount)
    integer, intent(out)           :: rc              

    ! Init rc
    rc = ESMF_RC_NOT_IMPL

    ! Get info
    call ESMF_XGridGet(xgrid, centroid=centroid, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! set rc to success
    rc = ESMF_SUCCESS
  
  end subroutine f_esmf_xgridgetcentroid