subroutine ESMF_CplCompGet(cplcomp, keywordEnforcer, configIsPresent, config, &
configFileIsPresent, configFile, clockIsPresent, clock, localPet, &
petCount, contextflag, currentMethod, currentPhase, vmIsPresent, &
vm, name, rc)
!
! !ARGUMENTS:
type(ESMF_CplComp), intent(in) :: cplcomp
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
logical, intent(out), optional :: configIsPresent
type(ESMF_Config), intent(out), optional :: config
logical, intent(out), optional :: configFileIsPresent
character(len=*), intent(out), optional :: configFile
logical, intent(out), optional :: clockIsPresent
type(ESMF_Clock), intent(out), optional :: clock
integer, intent(out), optional :: localPet
integer, intent(out), optional :: petCount
type(ESMF_Context_Flag), intent(out), optional :: contextflag
type(ESMF_Method_Flag), intent(out), optional :: currentMethod
integer, intent(out), optional :: currentPhase
logical, intent(out), optional :: vmIsPresent
type(ESMF_VM), intent(out), optional :: vm
character(len=*), intent(out), optional :: name
integer, intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
! Get information about an {\tt ESMF\_CplComp} object.
!
! The arguments are:
! \begin{description}
! \item[cplcomp]
! The {\tt ESMF\_CplComp} object being queried.
! \item[{[configIsPresent]}]
! {\tt .true.} if {\tt config} was set in CplComp object,
! {\tt .false.} otherwise.
! \item[{[config]}]
! Return the associated Config.
! It is an error to query for the Config if none is associated with
! the CplComp. If unsure, get {\tt configIsPresent} first to determine
! the status.
! \item[{[configFileIsPresent]}]
! {\tt .true.} if {\tt configFile} was set in CplComp object,
! {\tt .false.} otherwise.
! \item[{[configFile]}]
! Return the associated configuration filename.
! It is an error to query for the configuration filename if none is associated with
! the CplComp. If unsure, get {\tt configFileIsPresent} first to determine
! the status.
! \item[{[clockIsPresent]}]
! {\tt .true.} if {\tt clock} was set in CplComp object,
! {\tt .false.} otherwise.
! \item[{[clock]}]
! Return the associated Clock.
! It is an error to query for the Clock if none is associated with
! the CplComp. If unsure, get {\tt clockIsPresent} first to determine
! the status.
! \item[{[localPet]}]
! Return the local PET id within the {\tt ESMF\_CplComp} object.
! \item[{[petCount]}]
! Return the number of PETs in the the {\tt ESMF\_CplComp} object.
! \item[{[contextflag]}]
! Return the {\tt ESMF\_Context\_Flag} for this {\tt ESMF\_CplComp}.
! See section \ref{const:contextflag} for a complete list of valid flags.
! \item[{[currentMethod]}]
! Return the current {\tt ESMF\_Method\_Flag} of the {\tt ESMF\_CplComp} execution.
! See section \ref{const:method} for a complete list of valid options.
! \item[{[currentPhase]}]
! Return the current {\tt phase} of the {\tt ESMF\_CplComp} execution.
! \item[{[vmIsPresent]}]
! {\tt .true.} if {\tt vm} was set in CplComp object,
! {\tt .false.} otherwise.
! \item[{[vm]}]
! Return the associated VM.
! It is an error to query for the VM if none is associated with
! the CplComp. If unsure, get {\tt vmIsPresent} first to determine
! the status.
! \item[{[name]}]
! Return the name of the {\tt ESMF\_CplComp}.
! \item[{[rc]}]
! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
! \end{description}
!
!EOP
!------------------------------------------------------------------------------
integer :: localrc ! local return code
type(ESMF_CompStatus) :: compStatus
! initialize return code; assume routine not implemented
if (present(rc)) rc = ESMF_RC_NOT_IMPL
localrc = ESMF_RC_NOT_IMPL
ESMF_INIT_CHECK_DEEP(ESMF_CplCompGetInit,cplcomp,rc)
! call Comp method
call ESMF_CompGet(cplcomp%compp, name=name, vm=vm, contextflag=contextflag,&
clock=clock, configFile=configFile, config=config, &
currentMethod=currentMethod, currentPhase=currentPhase, &
localPet=localPet, petCount=petCount, compStatus=compStatus, rc=localrc)
if (ESMF_LogFoundError(localrc, &
ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
if (cplcomp%isNamedAlias .and. present(name)) then
! access NamedAlias name
name = trim(cplcomp%name)
endif
! call Comp method
call ESMF_CompStatusGet(compStatus, &
clockIsPresent = clockIsPresent, &
configIsPresent = configIsPresent, &
configFileIsPresent = configFileIsPresent, &
vmIsPresent = vmIsPresent, &
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_CplCompGet