ESMF_GridGetItemIntoArray Subroutine

private subroutine ESMF_GridGetItemIntoArray(grid, itemflag, staggerloc, array, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Grid), intent(in) :: grid
type(ESMF_GridItem_Flag), intent(in) :: itemflag
type(ESMF_StaggerLoc), intent(in), optional :: staggerloc
type(ESMF_Array), intent(out) :: array
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Calls

proc~~esmf_gridgetitemintoarray~~CallsGraph proc~esmf_gridgetitemintoarray ESMF_GridGetItemIntoArray c_esmc_gridgetitemintoarray c_esmc_gridgetitemintoarray proc~esmf_gridgetitemintoarray->c_esmc_gridgetitemintoarray esmf_arraysetinitcreated esmf_arraysetinitcreated proc~esmf_gridgetitemintoarray->esmf_arraysetinitcreated proc~esmf_gridgetinit ESMF_GridGetInit proc~esmf_gridgetitemintoarray->proc~esmf_gridgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_gridgetitemintoarray->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_gridgetitemintoarray->proc~esmf_logfounderror proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_gridgetitemintoarray~~CalledByGraph proc~esmf_gridgetitemintoarray ESMF_GridGetItemIntoArray interface~esmf_gridgetitem ESMF_GridGetItem interface~esmf_gridgetitem->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem1di4 ESMF_GridGetItem1DI4 proc~esmf_gridgetitem1di4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem1dr4 ESMF_GridGetItem1DR4 proc~esmf_gridgetitem1dr4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem1dr8 ESMF_GridGetItem1DR8 proc~esmf_gridgetitem1dr8->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem2di4 ESMF_GridGetItem2DI4 proc~esmf_gridgetitem2di4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem2dr4 ESMF_GridGetItem2DR4 proc~esmf_gridgetitem2dr4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem2dr8 ESMF_GridGetItem2DR8 proc~esmf_gridgetitem2dr8->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem3di4 ESMF_GridGetItem3DI4 proc~esmf_gridgetitem3di4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem3dr4 ESMF_GridGetItem3DR4 proc~esmf_gridgetitem3dr4->proc~esmf_gridgetitemintoarray proc~esmf_gridgetitem3dr8 ESMF_GridGetItem3DR8 proc~esmf_gridgetitem3dr8->proc~esmf_gridgetitemintoarray

Source Code

      subroutine ESMF_GridGetItemIntoArray(grid, itemflag,  staggerloc, &
        array, keywordEnforcer, rc)
!
! !ARGUMENTS:
      type(ESMF_Grid),           intent(in)            :: grid
      type (ESMF_GridItem_Flag), intent(in)            :: itemflag
      type (ESMF_StaggerLoc),    intent(in),  optional :: staggerloc
      type(ESMF_Array),          intent(out)           :: array
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer,                   intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
!    This method allows the user to get access to the ESMF Array holding
!    item data at a particular stagger location. This is useful, for example,
!    to set the item values. To have an Array to access, the item Array
!    must have already been allocated, for example by {\tt ESMF\_GridAddItem} or
!    {\tt ESMF\_GridSetItem}.
!
!     The arguments are:
!     \begin{description}
!     \item[grid]
!          Grid to get the information from.
!     \item[itemflag]
!          The item from which to get the arrays. Please see Section~\ref{const:griditem} for a
!          list of valid items.
!     \item[{[staggerloc]}]
!          The stagger location from which to get the arrays.
!          Please see Section~\ref{const:staggerloc} for a list
!          of predefined stagger locations. If not present, defaults to ESMF\_STAGGERLOC\_CENTER.
!     \item[array]
!          An array into which to put the item information.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP

    integer :: tmp_staggerloc
    integer :: localrc ! local error status
    type(ESMF_DataCopy_Flag) :: datacopyflag

    ! Initialize return code; assume failure until success is certain
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP_SHORT(ESMF_GridGetInit, grid, rc)

    ! handle staggerloc
    if (present(staggerloc)) then
       tmp_staggerloc=staggerloc%staggerloc
    else
       tmp_staggerloc=ESMF_STAGGERLOC_CENTER%staggerloc
    endif

    ! Init datacopyflag
    datacopyflag=ESMF_DATACOPY_REFERENCE

    ! Call C++ Subroutine
    call c_ESMC_gridgetitemintoarray(grid%this,tmp_staggerloc, itemflag,  &
      array, datacopyflag, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return


    ! Set Array as created
    call ESMF_ArraySetInitCreated(array,localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    if (present(rc)) rc = ESMF_SUCCESS

      end subroutine ESMF_GridGetItemIntoArray