ESMF_InterArrayGet Subroutine

public recursive subroutine ESMF_InterArrayGet(array, farray1D, farray2D, farray3D, farray1DI8, farray2DI8, farray3DI8, farray1DR8, farray2DR8, farray3DR8, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_InterArray), intent(in) :: array
integer, optional, pointer :: farray1D(:)
integer, optional, pointer :: farray2D(:,:)
integer, optional, pointer :: farray3D(:,:,:)
integer(kind=ESMF_KIND_I8), optional, pointer :: farray1DI8(:)
integer(kind=ESMF_KIND_I8), optional, pointer :: farray2DI8(:,:)
integer(kind=ESMF_KIND_I8), optional, pointer :: farray3DI8(:,:,:)
real(kind=ESMF_KIND_R8), optional, pointer :: farray1DR8(:)
real(kind=ESMF_KIND_R8), optional, pointer :: farray2DR8(:,:)
real(kind=ESMF_KIND_R8), optional, pointer :: farray3DR8(:,:,:)
integer, intent(out), optional :: rc

Source Code

  recursive subroutine ESMF_InterArrayGet(array, farray1D, farray2D, farray3D, &
    farray1DI8, farray2DI8, farray3DI8, farray1DR8, farray2DR8, farray3DR8, rc)
!
! !ARGUMENTS:
    type(ESMF_InterArray), intent(in)              :: array
    integer,                 pointer,     optional :: farray1D(:)
    integer,                 pointer,     optional :: farray2D(:,:)
    integer,                 pointer,     optional :: farray3D(:,:,:)
    integer(ESMF_KIND_I8),   pointer,     optional :: farray1DI8(:)
    integer(ESMF_KIND_I8),   pointer,     optional :: farray2DI8(:,:)
    integer(ESMF_KIND_I8),   pointer,     optional :: farray3DI8(:,:,:)
    real(ESMF_KIND_R8),      pointer,     optional :: farray1DR8(:)
    real(ESMF_KIND_R8),      pointer,     optional :: farray2DR8(:,:)
    real(ESMF_KIND_R8),      pointer,     optional :: farray3DR8(:,:,:)
    integer,                 intent(out), optional :: rc
!
!
! !DESCRIPTION:
!   Get pointer out of an {\tt ESMF\_InterArray} object.
!
!   The arguments are:
!   \begin{description}
!   \item[array]
!     {\tt ESMF\_InterArray} object.
!   \item[{[farray1D]}]
!     1D Fortran array of default integer kind.
!   \item[{[farray2D]}]
!     2D Fortran array of default integer kind.
!   \item[{[farray3D]}]
!     3D Fortran array of default integer kind.
!   \item[{[farray1DI8]}]
!     1D Fortran array of ESMF_TYPEKIND_I8.
!   \item[{[farray2DI8]}]
!     2D Fortran array of ESMF_TYPEKIND_I8.
!   \item[{[farray3DI8]}]
!     3D Fortran array of ESMF_TYPEKIND_I8.
!   \item[{[farray1DR8]}]
!     1D Fortran array of ESMF_TYPEKIND_R8.
!   \item[{[farray2DR8]}]
!     2D Fortran array of ESMF_TYPEKIND_R8.
!   \item[{[farray3DR8]}]
!     3D Fortran array of ESMF_TYPEKIND_R8.
!   \item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                 :: localrc      ! local return code
    integer                 :: stat         ! Fortran return code

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

    if (present(farray1D)) farray1D => array%farray1D
    if (present(farray2D)) farray2D => array%farray2D
    if (present(farray3D)) farray3D => array%farray3D
    if (present(farray1DI8)) farray1DI8 => array%farray1DI8
    if (present(farray2DI8)) farray2DI8 => array%farray2DI8
    if (present(farray3DI8)) farray3DI8 => array%farray3DI8
    if (present(farray1DR8)) farray1DR8 => array%farray1DR8
    if (present(farray2DR8)) farray2DR8 => array%farray2DR8
    if (present(farray3DR8)) farray3DR8 => array%farray3DR8

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

  end subroutine ESMF_InterArrayGet