ESMF_TraceGridCompPhasePrologueEnter Subroutine

private subroutine ESMF_TraceGridCompPhasePrologueEnter(comp, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_GridComp), intent(in) :: comp
integer, intent(out), optional :: rc

Source Code

  subroutine ESMF_TraceGridCompPhasePrologueEnter(comp, rc)
! !ARGUMENTS: 
    type(ESMF_GridComp), intent(in) :: comp
    integer, intent(out), optional  :: rc
!
!EOPI
!-------------------------------------------------------------------------------
    ! locals
    integer :: vmid
    integer :: baseid
    type(ESMF_Method_Flag) :: method
    integer :: method_enum
    integer :: phase

    if (present(rc)) rc = ESMF_SUCCESS 

    call ESMF_TraceGetCompID(comp, vmid, baseid, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

    call ESMF_GridCompGet(comp, currentMethod=method, &
         currentPhase=phase, rc=rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

    method_enum = ESMF_TraceMethodToEnum(method)

    call c_esmftrace_phase_prologue_enter(vmid, baseid, method_enum, phase, rc)
    if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

  end subroutine ESMF_TraceGridCompPhasePrologueEnter