subroutine f_esmf_compexecute(comp, method, importState, exportState, clock, &
syncflag, phase, timeout, userRc, rc)
use ESMF_UtilTypesMod ! ESMF utility types
use ESMF_BaseMod ! ESMF base class
use ESMF_ClockMod
use ESMF_ClockTypeMod
use ESMF_StateMod
use ESMF_CompMod
use ESMF_GridCompMod
use ESMF_InitMacrosMod
implicit none
type(ESMF_CWrap) :: comp
type(ESMF_Method_Flag):: method
type(ESMF_State) :: importState
type(ESMF_State) :: exportState
type(ESMF_Clock) :: clock
type(ESMF_Sync_Flag) :: syncflag
integer :: phase
integer :: timeout
integer :: userRc
integer :: rc
type(ESMF_Clock) :: local_clock
type(ESMF_Pointer) :: this
! Initialize return code; assume routine not implemented
rc = ESMF_RC_NOT_IMPL
! Construct a local copy of the incoming clock with initializers
call ESMF_ClockGetThis(clock, this, rc=rc)
call ESMF_ClockSetThis(local_clock, this, rc=rc)
call ESMF_ClockSetInitCreated(local_clock)
call ESMF_CompExecute(comp%compp, method=method, importState=importState, &
exportState=exportState, clock=local_clock, &
syncflag=syncflag, phase=phase, timeout=timeout, userRc=userRc, rc=rc)
end subroutine f_esmf_compexecute