f_esmf_arrayspecgetrank Subroutine

subroutine f_esmf_arrayspecgetrank(arrayspec, rank, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_ArraySpec) :: arrayspec
integer :: rank
integer :: rc

Source Code

  subroutine f_esmf_arrayspecgetrank(arrayspec, rank, rc)
#undef  ESMF_METHOD
#define ESMF_METHOD "f_esmf_arrayspecgetrank()"
    use ESMF_ArraySpecMod
    use ESMF_UtilTypesMod
    use ESMF_LogErrMod

    implicit none

    type(ESMF_ArraySpec) :: arrayspec
    integer :: rank
    integer :: rc

    integer                 :: localrc      ! local return code

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    rc = ESMF_RC_NOT_IMPL

    call ESMF_ArraySpecGet(arrayspec=arrayspec, rank=rank, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, &
      rcToReturn=rc)) return

    ! return successfully
    rc = ESMF_SUCCESS

  end subroutine f_esmf_arrayspecgetrank