f_esmf_localarrayslice Subroutine

subroutine f_esmf_localarrayslice(arrayPtr, trailingTensorSlice, rankIn, rankOut, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Pointer) :: arrayPtr
type(ESMF_InterArray) :: trailingTensorSlice
integer :: rankIn
integer :: rankOut
integer :: rc

Source Code

subroutine f_esmf_localarrayslice(arrayPtr, trailingTensorSlice, rankIn, rankOut, rc)
  use ESMF_UtilTypesMod     ! ESMF base class
  use ESMF_BaseMod          ! ESMF base class
  use ESMF_LogErrMod        ! ESMF error logging
  use ESMF_LocalArrayMod
  use ESMF_F90InterfaceMod

  implicit none

  type(ESMF_Pointer) :: arrayPtr
  type(ESMF_InterArray) :: trailingTensorSlice
  integer :: rankIn, rankOut
  integer :: rc

  type(ESMF_LocalArray) :: array

  array%this = arrayPtr         ! the incoming LocalArray
  ESMF_INIT_SET_CREATED(array)

  call ESMF_LocalArraySlice(array, trailingTensorSlice, rankIn, rankOut, rc=rc)
  if (ESMF_LogFoundError(rcToCheck=rc, &
    ESMF_ERR_PASSTHRU, &
    ESMF_CONTEXT)) return

  arrayPtr = array%this         ! the outgoing LocalArray

end subroutine f_esmf_localarrayslice