Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(MAPL_MetaComp), | intent(inout) | :: | META | |||
class(KeywordEnforcer), | intent(in), | optional | :: | unusable | ||
integer, | intent(in), | optional | :: | MODE | ||
integer, | intent(out), | optional | :: | RC |
logical function MAPL_RecordAlarmIsRinging(META, unusable, MODE, RC) ! !ARGUMENTS: type (MAPL_MetaComp), intent(inout) :: META class (KeywordEnforcer), optional, intent(in) :: unusable integer, optional, intent(in ) :: MODE ! Writing file mode: disk or ram integer, optional, intent( out) :: RC ! Error code: ! = 0 all is well ! otherwise, error !EOPI ! LOCAL VARIABLES character(len=ESMF_MAXSTR) :: IAm integer :: status integer :: I integer :: mode_ logical :: modePresent !============================================================================= ! Begin... _UNUSED_DUMMY(unusable) Iam = "MAPL_RecordIsAlarmRinging" MAPL_RecordAlarmIsRinging = .false. if (present(MODE)) then mode_ = mode modePresent = .true. else mode_ = MAPL_Write2Disk modePresent = .false. end if ! ------------------ if (associated(META%RECORD)) then RECORDLOOP: DO I = 1, size(META%RECORD%ALARM) if ( ESMF_AlarmIsRinging(META%RECORD%ALARM(I), RC=status) ) then _VERIFY(status) if (.not. modePresent) then MAPL_RecordAlarmIsRinging = .true. exit RECORDLOOP end if if (META%RECORD%FILETYPE(I) == mode_) then MAPL_RecordAlarmIsRinging = .true. exit RECORDLOOP end if end if end DO RECORDLOOP end if _RETURN(ESMF_SUCCESS) end function MAPL_RecordAlarmIsRinging