ESMF_ContainerRemove Subroutine

public subroutine ESMF_ContainerRemove(container, itemNameList, keywordEnforcer, multiflag, relaxedflag, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Container), intent(in) :: container
character(len=*), intent(in) :: itemNameList(:)
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
logical, intent(in), optional :: multiflag
logical, intent(in), optional :: relaxedflag
integer, intent(out), optional :: rc

Calls

proc~~esmf_containerremove~~CallsGraph proc~esmf_containerremove ESMF_ContainerRemove c_esmc_containerremove c_esmc_containerremove proc~esmf_containerremove->c_esmc_containerremove proc~esmf_containergetinit ESMF_ContainerGetInit proc~esmf_containerremove->proc~esmf_containergetinit proc~esmf_imerr ESMF_IMErr proc~esmf_containerremove->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_containerremove->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_containerremove~~CalledByGraph proc~esmf_containerremove ESMF_ContainerRemove proc~nuopc_fielddictionaryegestyamli NUOPC_FieldDictionaryEgestYAMLI proc~nuopc_fielddictionaryegestyamli->proc~esmf_containerremove program~esmf_containerutest ESMF_ContainerUTest program~esmf_containerutest->proc~esmf_containerremove proc~nuopc_fielddictionaryegesti NUOPC_FieldDictionaryEgestI proc~nuopc_fielddictionaryegesti->proc~nuopc_fielddictionaryegestyamli proc~nuopc_fielddictionaryegest NUOPC_FieldDictionaryEgest proc~nuopc_fielddictionaryegest->proc~nuopc_fielddictionaryegesti program~esmf_nuopc_utest ESMF_NUOPC_UTest program~esmf_nuopc_utest->proc~nuopc_fielddictionaryegest

Source Code

  subroutine ESMF_ContainerRemove(container, itemNameList, keywordEnforcer, &
    multiflag, relaxedflag, rc)
!
! !ARGUMENTS:
    type(ESMF_Container), intent(in)            :: container
    character(len=*),     intent(in)            :: itemNameList(:)
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    logical,              intent(in),  optional :: multiflag
    logical,              intent(in),  optional :: relaxedflag
    integer,              intent(out), optional :: rc
!         
! !DESCRIPTION:
!   Remove items from a {\tt ESMF\_Container} object.
!
!   This method defines garbage as those elements that were removed from the
!   container as a result of this operation. Garbage can be generated in both
!   relaxed and strict mode.
!
!   The arguments are:
!   \begin{description}
!   \item[container]
!     {\tt ESMF\_Container} object to be queried.
!   \item[itemNameList]
!     The names of the items to remove
!   \item [{[multiflag]}]
!     A setting of {\tt .true.} allows multiple items with the same name
!     to be removed from {\tt container}. For {\tt .false.}, items to be removed
!     must have unique names. The default setting is {\tt .false.}.
!   \item [{[relaxedflag]}]
!     A setting of {\tt .true.} indicates a relaxed definition of "remove"
!     where it is {\em not} an error if {\tt itemNameList} contains item
!     names that are not found in {\tt container}. For {\tt .false.} this is 
!     treated as an error condition. 
!     Further, in {\tt multiflag=.false.} mode, the relaxed definition of
!     "remove" also covers the case where there are multiple items in
!     {\tt container} that match a single entry in {\tt itemNameList}.
!     For {\tt relaxedflag=.false.} this is treated as an error condition.
!     The default setting is {\tt .false.}.
!   \item[{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI
!------------------------------------------------------------------------------
    integer                     :: localrc      ! local return code
    type(ESMF_Logical)          :: multiflagArg
    type(ESMF_Logical)          :: relaxedflagArg
    integer                     :: i
    character(len=ESMF_MAXSTR)  :: name

    ! 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_ContainerGetInit, container, rc)
    
    if (present(multiflag)) then
      multiflagArg = multiflag
    else
      multiflagArg = ESMF_FALSE
    endif
    if (present(relaxedflag)) then
      relaxedflagArg = relaxedflag
    else
      relaxedflagArg = ESMF_FALSE
    endif
    
    do i=1, size(itemNameList)
      ! Call into the C++ interface layer
      call c_ESMC_ContainerRemove(container, trim(itemNameList(i)), &
        multiflagArg, relaxedflagArg, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return
    enddo
 
    ! Return successfully
    if (present(rc)) rc = ESMF_SUCCESS
 
  end subroutine ESMF_ContainerRemove