dcf.cymru stimulus sheet · Computer Science · Year 8

Afon Glyn flood sensor readings and trainee flowchart

Please do not write on this sheet so another pair can use it next lesson.

1. Official Natural Resources Wales safety specification (what the sensor SHOULD do)

The ultrasonic gauge on Pont Glyn bridge measures two inputs at the start of every hour: the river depth level (in metres) and the rainfall rate rain (in millimetres per hour). The control box must output one of three messages:

2. The trainee programmer’s faulty flowchart (contains 2 logic bugs)

When you complete Step 1 on your worksheet, follow the arrows and conditions in this diagram strictly as they are written below:

START: INPUT level, rain Diamond D1 Is level < 2.0 ? Yes OUTPUT “GREEN: Normal” No Diamond D2 Is level >= 3.2 OR rain >= 15 ? Yes OUTPUT “RED: Evacuate” No Diamond D3 Is level < 2.4 ? Yes OUTPUT “AMBER: Flood warning” No OUTPUT “GREEN: Normal”

3. Storm log: 8 hourly sensor readings at Pont Glyn (16 October)

Time River depth level (m) Rainfall rain (mm/hr) Observer notes on the riverbank
01:00 1.4 2 River well within its channel; light drizzle.
02:00 1.7 5 Steady rain starts; water still well below the footpath (2.4 m).
03:00 1.9 11 Heavy rain on the hills; river rising but still below 2.0 m.
04:00 2.6 18 Cloudburst overhead (18 mm/hr). Water covers the riverside footpath (above 2.4 m), but is 0.6 m below the 3.2 m village flood wall.
05:00 3.3 19 River reaches 3.3 m while intense rain continues (19 mm/hr). Immediate evacuation required.
06:00 3.4 16 Peak river height of 3.4 m with heavy rain (16 mm/hr). Evacuation remains active.
07:00 2.8 9 Rain eases to 9 mm/hr, so evacuation danger has passed, but water is still 2.8 m deep across the footpath and car park (above 2.4 m).
08:00 1.8 3 River drops back into its main channel below 2.0 m. Safe to reopen.