recursive subroutine dispatchPhaseChecks(prefix, comp, methodflag, &
phaseIndex, importState, exportState, clock, prologue, rc)
character(*), intent(in) :: prefix
type(ESMF_GridComp) :: comp
type(ESMF_Method_Flag), intent(in) :: methodflag
integer, intent(in) :: phaseIndex
type(ESMF_State) :: importState, exportState
type(ESMF_Clock) :: clock
logical :: prologue
integer, intent(out) :: rc
! local variables
character(NUOPC_PhaseMapStringLength) :: phaseLabel
rc = ESMF_SUCCESS
call NUOPC_CompSearchPhaseMapByIndex(comp, &
methodflag, phaseIndex, phaseLabel, &
attributeToCheck="InternalInitializePhaseMap", rc=rc)
if (ESMF_LogFoundError(rc, &
line=__LINE__, &
file=FILENAME)) &
return ! bail out
if (prologue) then
! nothing yet
else ! epilogue
if (methodflag==ESMF_METHOD_INITIALIZE) then
if (index(event_AllFieldsRealized, trim(phaseLabel)) > 0) then
call checkEpi_FieldsRealized(prefix, comp, importState, &
exportState, clock, rc=rc)
if (ESMF_LogFoundError(rc, &
line=__LINE__, &
file=FILENAME)) &
return ! bail out
endif
endif
endif
end subroutine dispatchPhaseChecks