ESMF_ArraySetDefault Subroutine

private subroutine ESMF_ArraySetDefault(array, keywordEnforcer, computationalLWidth, computationalUWidth, name, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Array), intent(inout) :: array
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(in), optional :: computationalLWidth(:,:)
integer, intent(in), optional :: computationalUWidth(:,:)
character(len=*), intent(in), optional :: name
integer, intent(out), optional :: rc

Calls

proc~~esmf_arraysetdefault~~CallsGraph proc~esmf_arraysetdefault ESMF_ArraySetDefault c_esmc_arrayset c_esmc_arrayset proc~esmf_arraysetdefault->c_esmc_arrayset c_esmc_setname c_esmc_setname proc~esmf_arraysetdefault->c_esmc_setname esmf_arraygetinit esmf_arraygetinit proc~esmf_arraysetdefault->esmf_arraygetinit interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_arraysetdefault->interface~esmf_interarraycreate proc~esmf_imerr ESMF_IMErr proc~esmf_arraysetdefault->proc~esmf_imerr proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_arraysetdefault->proc~esmf_interarraydestroy proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_arraysetdefault->proc~esmf_logfounderror proc~esmf_interarraycreateptr ESMF_InterArrayCreatePtr interface~esmf_interarraycreate->proc~esmf_interarraycreateptr proc~esmf_interarraycreatetrg ESMF_InterArrayCreateTrg interface~esmf_interarraycreate->proc~esmf_interarraycreatetrg proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~esmf_interarraydestroy->proc~esmf_logfounddeallocerror 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

Called by

proc~~esmf_arraysetdefault~~CalledByGraph proc~esmf_arraysetdefault ESMF_ArraySetDefault interface~esmf_arrayset ESMF_ArraySet interface~esmf_arrayset->proc~esmf_arraysetdefault proc~testarraynamedalias TestArrayNamedAlias proc~testarraynamedalias->interface~esmf_arrayset proc~user_init~13 user_init proc~user_init~13->interface~esmf_arrayset proc~user_init~15 user_init proc~user_init~15->interface~esmf_arrayset proc~user_init~20 user_init proc~user_init~20->interface~esmf_arrayset proc~user_init~25 user_init proc~user_init~25->interface~esmf_arrayset proc~user_init~26 user_init proc~user_init~26->interface~esmf_arrayset proc~user_init~32 user_init proc~user_init~32->interface~esmf_arrayset proc~user_init~39 user_init proc~user_init~39->interface~esmf_arrayset proc~user_init~41 user_init proc~user_init~41->interface~esmf_arrayset proc~user_init~44 user_init proc~user_init~44->interface~esmf_arrayset proc~user_init~5 user_init proc~user_init~5->interface~esmf_arrayset proc~user_init~50 user_init proc~user_init~50->interface~esmf_arrayset proc~user_init~58 user_init proc~user_init~58->interface~esmf_arrayset proc~user_init~78 user_init proc~user_init~78->interface~esmf_arrayset proc~user_init~79 user_init proc~user_init~79->interface~esmf_arrayset proc~user_init~82 user_init proc~user_init~82->interface~esmf_arrayset proc~x_comp_grid_diag x_comp_grid_diag proc~x_comp_grid_diag->interface~esmf_arrayset program~esmf_arraycreategetutest ESMF_ArrayCreateGetUTest program~esmf_arraycreategetutest->interface~esmf_arrayset proc~realize Realize proc~realize->proc~x_comp_grid_diag program~esmf_namedaliasutest ESMF_NamedAliasUTest program~esmf_namedaliasutest->proc~testarraynamedalias

Source Code

  subroutine ESMF_ArraySetDefault(array, keywordEnforcer, computationalLWidth, &
    computationalUWidth, name, rc)

!
! !ARGUMENTS:
    type(ESMF_Array),   intent(inout)         :: array
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,            intent(in),  optional :: computationalLWidth(:,:)
    integer,            intent(in),  optional :: computationalUWidth(:,:)
    character(len = *), intent(in),  optional :: name
    integer,            intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
!     Sets adjustable settings in an {\tt ESMF\_Array} object. Arrays with
!     tensor dimensions will set values for {\em all} tensor components.
!
!     The arguments are:
!     \begin{description}
!     \item [array]
!       {\tt ESMF\_Array} object for which to set properties.
!     \item[{[computationalLWidth]}] 
!       \begin{sloppypar}
!       This argument must have of size {\tt (dimCount, localDeCount)}.
!       {\tt computationalLWidth} specifies the lower corner of the
!       computational region with respect to the lower corner of the exclusive
!       region for all local DEs.
!       \end{sloppypar}
!     \item[{[computationalUWidth]}] 
!       \begin{sloppypar}
!       This argument must have of size {\tt (dimCount, localDeCount)}.
!       {\tt computationalUWidth} specifies the upper corner of the
!       computational region with respect to the upper corner of the exclusive
!       region for all local DEs.
!       \end{sloppypar}
!     \item [{[name]}]
!       The Array name.
!     \item [{[rc]}]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOP
!------------------------------------------------------------------------------
    integer                 :: localrc                ! local return code
    type(ESMF_InterArray)   :: computationalLWidthArg ! helper variable
    type(ESMF_InterArray)   :: computationalUWidthArg ! helper variable

    ! initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL
    
    ! Check init status of arguments
    ESMF_INIT_CHECK_DEEP(ESMF_ArrayGetInit, array, rc)
    
    ! Set the name in Base object
    if (present(name)) then
      if (array%isNamedAlias) then
        array%name = trim(name)
      else
        call c_ESMC_SetName(array, "Array", name, localrc)
        if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
          ESMF_CONTEXT, rcToReturn=rc)) return
      endif
    endif

    ! Deal with (optional) array arguments
    computationalLWidthArg = &
      ESMF_InterArrayCreate(farray2D=computationalLWidth, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    computationalUWidthArg = &
      ESMF_InterArrayCreate(farray2D=computationalUWidth, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Call into the C++ interface, which will sort out optional arguments
    call c_ESMC_ArraySet(array, computationalLWidthArg, &
      computationalUWidthArg, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    
    ! Garbage collection
    call ESMF_InterArrayDestroy(computationalLWidthArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return
    call ESMF_InterArrayDestroy(computationalUWidthArg, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

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

  end subroutine ESMF_ArraySetDefault