Data Validation Pipelines
Quality Flag Summary
Gate a Report
A quality flag can combine several validation checks into one report decision.
Program
Play the program to choose how many warnings are tolerated before the report changes state.
quality_flag_summary.f90
Replay: real traced execution (multi-file project)
program quality_flag_summary_demo
implicit none
integer :: warning_count
integer :: missing_count
integer :: tolerance
logical :: report_ok
character(len=8) :: status
warning_count = 2
missing_count = 1
tolerance = 3
report_ok = warning_count + missing_count <= tolerance
if (report_ok) then
status = 'accept'
else
status = 'review'
end if
print '(A, 1X, I0)', trim(status), warning_count + missing_count
end program quality_flag_summary_demo
program quality_flag_summary_demo
implicit none
integer :: warning_count
integer :: missing_count
integer :: tolerance
logical :: report_ok
character(len=8) :: status
warning_count = 2
missing_count = 1
tolerance = 1
report_ok = warning_count + missing_count <= tolerance
if (report_ok) then
status = 'accept'
else
status = 'review'
end if
print '(A, 1X, I0)', trim(status), warning_count + missing_count
end program quality_flag_summary_demo
program quality_flag_summary_demo
implicit none
integer :: warning_count
integer :: missing_count
integer :: tolerance
logical :: report_ok
character(len=8) :: status
warning_count = 2
missing_count = 1
tolerance = 4
report_ok = warning_count + missing_count <= tolerance
if (report_ok) then
status = 'accept'
else
status = 'review'
end if
print '(A, 1X, I0)', trim(status), warning_count + missing_count
end program quality_flag_summary_demo
warning_count ← 2
9warning_count = 210missing_count = 1values this step2warning_countmissing_count ← 1
9warning_count = 210missing_count = 111tolerance = 3values this step1missing_counttolerance ← 3
10missing_count = 111tolerance = 312report_ok = warning_count + missing_count <= tolerancevalues this step3tolerancereport_ok ← .true.
11tolerance = 312report_ok = warning_count + missing_count <= tolerance13if (report_ok) thenvalues this step.true.report_ok2warning_count1missing_count3tolerancestatus ← accept
13if (report_ok) then14 status = 'accept'15elsevalues this stepacceptstatusprint '(A, 1X, I0)', trim(status), warning_count + missing_count
17 end if18 print '(A, 1X, I0)', trim(status), warning_count + missing_count19end program quality_flag_summary_demooutputaccept 3values this stepacceptstatus3total_flags
warning_count ← 2
9warning_count = 210missing_count = 1values this step2warning_countmissing_count ← 1
9warning_count = 210missing_count = 111tolerance = 1values this step1missing_counttolerance ← 1
10missing_count = 111tolerance = 112report_ok = warning_count + missing_count <= tolerancevalues this step1tolerancereport_ok ← .false.
11tolerance = 112report_ok = warning_count + missing_count <= tolerance13if (report_ok) thenvalues this step.false.report_ok2warning_count1missing_count1tolerancestatus ← review
15else16 status = 'review'17end ifvalues this stepreviewstatusprint '(A, 1X, I0)', trim(status), warning_count + missing_count
17 end if18 print '(A, 1X, I0)', trim(status), warning_count + missing_count19end program quality_flag_summary_demooutputreview 3values this stepreviewstatus3total_flags
warning_count ← 2
9warning_count = 210missing_count = 1values this step2warning_countmissing_count ← 1
9warning_count = 210missing_count = 111tolerance = 4values this step1missing_counttolerance ← 4
10missing_count = 111tolerance = 412report_ok = warning_count + missing_count <= tolerancevalues this step4tolerancereport_ok ← .true.
11tolerance = 412report_ok = warning_count + missing_count <= tolerance13if (report_ok) thenvalues this step.true.report_ok2warning_count1missing_count4tolerancestatus ← accept
13if (report_ok) then14 status = 'accept'15elsevalues this stepacceptstatusprint '(A, 1X, I0)', trim(status), warning_count + missing_count
17 end if18 print '(A, 1X, I0)', trim(status), warning_count + missing_count19end program quality_flag_summary_demooutputaccept 3values this stepacceptstatus3total_flags
flag total
Multiple validation counts can be combined into one total.
gate
`report_ok` records whether the report should continue.
status
A short label makes the validation decision visible in the trace.