subroutine ESMF_FieldRedistStoreR4(srcField, dstField, &
routehandle, factor, keywordEnforcer, srcToDstTransposeMap, &
ignoreUnmatchedIndices, rc)
! input arguments
type(ESMF_Field), intent(in) :: srcField
type(ESMF_Field), intent(inout) :: dstField
type(ESMF_RouteHandle), intent(inout) :: routehandle
real(ESMF_KIND_R4), intent(in) :: factor
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
integer, intent(in), optional :: srcToDstTransposeMap(:)
logical, intent(in), optional :: ignoreUnmatchedIndices
integer, intent(out), optional :: rc
!EOPI
! local variables as temporary input/output arguments
! internal local variables
integer :: localrc
type(ESMF_Array) :: srcArray, dstArray
! Initialize return code; assume routine not implemented
localrc = ESMF_RC_NOT_IMPL
if(present(rc)) rc = ESMF_RC_NOT_IMPL
! check variable: focus on field and farray
! rely on ArrayRedist to check the sanity of other variables
ESMF_INIT_CHECK_DEEP(ESMF_FieldGetInit, srcField, rc)
ESMF_INIT_CHECK_DEEP(ESMF_FieldGetInit, dstField, rc)
! Retrieve source and destination arrays.
call ESMF_FieldGet(srcField, array=srcArray, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
call ESMF_FieldGet(dstField, array=dstArray, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
! perform redist through array
! For performance consideration:
! Rely on ArrayRedist to perform sanity checking of the other parameters
call ESMF_ArrayRedistStore(srcArray, dstArray, routehandle, factor, &
srcToDstTransposeMap=srcToDstTransposeMap, &
ignoreUnmatchedIndices=ignoreUnmatchedIndices, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
if (present(rc)) rc = ESMF_SUCCESS
end subroutine ESMF_FieldRedistStoreR4