f_esmf_arrayspecgettypekind Subroutine

subroutine f_esmf_arrayspecgettypekind(arrayspec, typekind, rc)

Arguments

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

Source Code

  subroutine f_esmf_arrayspecgettypekind(arrayspec, typekind, rc)
#undef  ESMF_METHOD
#define ESMF_METHOD "f_esmf_arrayspecgettypekind()"
    use ESMF_ArraySpecMod
    use ESMF_UtilTypesMod
    use ESMF_LogErrMod

    implicit none
    
    type(ESMF_ArraySpec) :: arrayspec
    type(ESMF_TypeKind_Flag) :: typekind
    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, typekind=typekind, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, &
      rcToReturn=rc)) return

    ! return successfully
    rc = ESMF_SUCCESS

  end subroutine f_esmf_arrayspecgettypekind