A lesson for students (age 13 and up)

How do we forecast the haze?

Hi, I am Puff, a small cloud of air. Our forecast does not use magic, and it does not use artificial intelligence. It uses physics: one box of air, a lid that goes up and down with the sun, and smoke that travels with the wind. Follow me through 10 short steps. Then try the box lab and the quiz.

What is PM2.5?

PM2.5 means "particulate matter smaller than 2.5 micrometres". These are very small pieces of solid or liquid in the air. One PM2.5 particle is about 30 times thinner than a hair. You cannot see one particle. You can see millions of them as haze.

PM2.5 goes deep into your lungs. Some of it goes into your blood. This is why the haze is bad for your health.

We measure PM2.5 in µg/m³: micrograms of particles in one cubic metre of air. One cubic metre is the air in a big fridge box.

11 µg/m³a normal day in Singapore (median, 2022 to 2024)
196 µg/m³24 September 2015, the worst day: 18 times more than normal
fine sand90 µm a hair70 µm wide pollen20 µm PM10 PM2.5 (2.5 µm) ↑

Sizes to scale. 1 µm (micrometre) = 1 thousandth of a millimetre.

PSI: the number in the news

NEA changes the 24-hour average PM2.5 into the Pollutant Standards Index (PSI). When the 24-hour PM2.5 is above 55.5 µg/m³, the PSI is above 100: unhealthy.

PSI24-hour PM2.5BandAdvice for healthy people (NEA)
0–500–12 µg/m³GoodNormal activities.
51–10013–55 µg/m³ModerateNormal activities.
101–20056–150 µg/m³UnhealthyDo less long or hard exercise outdoors.
201–300151–250 µg/m³Very unhealthyAvoid long or hard exercise outdoors.
above 300above 250 µg/m³HazardousKeep outdoor activity to a minimum.

Older people, children, pregnant women and people with heart or lung disease must be more careful. See haze.gov.sg for the full advice.

Where do the particles come from?

🚗 LocalTraffic, industry, power stations and cooking in Singapore. More in the day, and 17% less on weekends.
🚢 ShipsThousands of ships pass Singapore. Sulphur in their fuel makes tiny sulphate particles.
🌏 BackgroundThe air always brings some particles: sea salt, dust and old pollution from the whole region.
🔥 FiresPeat and forest fires in Sumatra and Borneo. The wind carries the smoke hundreds of kilometres.

The first three sources are always there. Together they give the normal 10 to 15 µg/m³. Fire smoke comes only in some years, mostly from August to October. It causes the big haze days. Our model must include all four sources, because a forecast for a normal day is as important as a forecast for a haze day. See the sources on the map →

The big idea: one box of air

Real air is very complex. So we make it simple. We pretend that the air over Singapore is one box. The air in the box is well mixed, so the PM2.5 is the same everywhere in it. The box is about 56 km long. It goes from the ground up to a lid.

We do not follow every particle. We follow one number: the PM2.5 in the box, C. Each hour, we add what comes in and take away what goes out. Mass cannot appear or disappear. This is conservation of mass.

change in the box = what comes in − what goes out

BathtubBox of air
💧 Water levelPM2.5 in the box, Cthe number we follow
🚰 TapEmissions from the ground, Ein
🚰 Second tapParticles in the air that comes in, Cinin
🕳️ DrainThe wind takes box air awayout
🕳️ Second drainRain and settling remove particlesout

If more water comes in than goes out, the level goes up. If the drain is bigger than the tap, the level goes down. If in and out are equal, the level stays the same. This is equilibrium.

The lid: a temperature inversion

Day. The sun heats the ground. The ground heats the air near it. Warm air expands, becomes lighter and goes up, like a hot-air balloon. Cooler air goes down to take its place. This is convection. It mixes the air up to about 800 m. The box is tall.

Night. The ground cools quickly. The air near the ground becomes cooler than the air above it. Normally, air gets cooler as you go up. Here it gets warmer as you go up. This is a temperature inversion. Cool air is heavy, so it cannot go up through the warm layer. The warm layer is a lid at about 200 m. The box is thin.

Concentration = mass ÷ volume. Put the same mass of particles into a box that is 4 times thinner, and the PM2.5 is 4 times higher. This is why the PM2.5 often goes up in the evening and at night, and goes down in the afternoon.
Try it at home or in class

Fill a clear glass container with warm water. Use a dropper to put some cold water with blue food colouring at the bottom. The blue water stays at the bottom: this is an inversion. Now heat the bottom of a beaker of water that has some dye in it. The dye goes up and mixes: this is convection.

Wind changes the air in the box

The wind pushes old air out of the box and brings new air in. The time to change all the air in the box is the residence time:

residence time = box length ÷ wind speed = L ÷ U

3.0 m/s

Strong wind takes our own pollution away quickly. But if the air that comes in is full of smoke, strong wind also brings the smoke in quickly. So wind is good on a clear day, and it can be bad on a haze day.

The box equation

This is the real equation in our computer code. It gives the change of the PM2.5 in one hour:

ΔC per hour = E/h − (U/L)(C − Cin) − (w/h) C − λ P C

TermWhat it meansOur value
E/hEmissions E from the ground, spread into a box of height h. A thin box gets more PM2.5 from the same emissions.E ≈ 190 µg of PM2.5 on each m² each hour (more in the day, less at night)
(U/L)(C − Cin)The wind U changes a part U/L of the box air each hour. The old air takes C out. The new air brings Cin in. If Cin is bigger than C, this term adds particles: that is how haze arrives.L ≈ 56 km
(w/h) CParticles fall slowly to the ground (settling).w = 0.002 m/s
λ P CRain P washes particles out. Each mm of rain removes the same part of the particles.λ ≈ 0.06 per mm
CinPM2.5 in the air that comes in: background + ship exhaust + fresh fire smoke + old regional smoke.background ≈ 8 µg/m³
Where does each term come from? (for older students)

The mass in the box is M = C × A × h, where A is the ground area of the box. To get the change of C, divide each mass flow by the volume A × h.

Emissions: the ground puts E micrograms on each m² each second, so E × A in total. Divide by A × h: the area cancels, and you get E/h.

Wind: air goes through the side of the box (area W × h) with speed U. The volume flow is U × W × h. Divide by the box volume L × W × h: a part U/L of the air changes each second. That air takes C out and brings Cin in.

Settling: particles fall with speed w. In one second, the particles in the lowest w metres reach the ground. That mass is w × C × A. Divide by A × h: (w/h) C.

Rain: each mm of rain removes the same part of the particles. This is a first-order loss, like radioactive decay.

Exponential approach: for one hour, the inputs stay the same, so the box moves toward its balance value Ceq = Cin + (E/h) ÷ (U/L) (no rain, no settling). It moves fast at first, then slowly: C = Ceq + (Cstart − Ceq) × e−kt. This is the same mathematics as a cup of hot tea that cools.

The box lab: try it yourself

This is our real box model with our real constants. The lid follows an average October day. Change the inputs and look at the PM2.5 over one day.

The lab runs the box for 3 days with the same inputs and shows the third day. Dark area: PM2.5 from Singapore's own emissions. Light area: PM2.5 that the air brings in. The lab does not include the old regional smoke and ship exhaust changes that the real forecast has.

Smoke from far away

1. 🛰️ Satellites see the firesHot fires give off infrared light. The VIIRS satellites measure its power: the fire radiative power, in megawatts (MW).
2. ⏪ Trace the air backStart at Singapore. Use the wind to go back in time, hour by hour, for 4 days. This path is a back trajectory.
3. 🧺 Collect the smokeAdd up the fire power under the path. More fires under the path means more smoke in Cin.

We use the wind at 925 hPa, about 800 m above the sea. Hot smoke goes up and travels at about this height. If the wind blows from the south-west at 5 m/s, then 1 hour ago the air was 18 km to the south-west. After 96 steps, the path can reach Sumatra or Borneo. See today's path on the map →

Smoke fades with time

factor = e−age ÷ τ, τ = 240 hours

Smoke spreads out and mixes away. Smoke that is 2 days old keeps 82%. Smoke that is 4 days old keeps 67%. Half of it is gone after about 7 days.

Rain washes smoke out

factor = e−λ × rain, λ = 0.06 per mm

Raindrops catch particles and bring them to the ground. 10 mm of rain on the path keeps 55% of the smoke. 30 mm keeps only 17%. Rain gave the biggest gain when we made the model better.

Why are some years very hazy? Dry peat

Peat is wet, dead plant material, many metres deep. Wet peat does not burn well. Dry peat can burn under the ground for weeks and make a lot of smoke. El Niño (a warm Pacific Ocean) and a positive Indian Ocean Dipole move rain away from Indonesia. Then the peat dries.

The model does not use El Niño as an input. It uses the measured rain on each peat area. A water "bucket" for the peat: rain fills it, and evaporation (about 4 mm each day) empties it. With a water deficit of 100 mm, each megawatt of fire gives 37% more smoke. This is again a mass balance, now for water!

7 of 15 El Niño or positive-dipole years had a bad haze season. In the other years: only 1 of 36 (1973 to 2024).

How we make the forecast each night

  1. 00:25, Singapore time. The computer starts. (When the GitHub computers are busy, it can start up to 3 hours later.) It gets the NEA PM2.5 readings up to 11 pm.
  2. It gets the fires of the last 28 days from the NASA satellites.
  3. It gets the weather forecast for the next 8 days from ECMWF (the European weather centre): wind at 3 heights, and rain.
  4. It traces the air back from Singapore every 3 hours, and collects the smoke on each path.
  5. It runs the box, hour by hour, for the next 7 days. For the future, it must guess the fires: it uses the mean of the last 3 days.
  6. It corrects the forecast with the error memory. If the model was 30% too low yesterday, it is often too low tomorrow too. So we keep about half of yesterday's error for tomorrow, and less for the days after.
  7. It finds the chance that the PSI goes above 100. It runs the forecast 400 times with errors of the same size as in past forecasts, and counts the runs above 100.

The model has only 12 constants. Each constant has a physical meaning. The computer found their values from about 11 years of hourly NEA data (April 2014 to 2025): it kept the set of values that makes the model closest to the measurements. This is a least-squares fit. Few constants with a meaning stop the model from just copying the past data (overfitting).

A fair test: how good is it?

The most important idea in science: test your model on data that it did not see. If you test on the data that you used to find the constants, the result looks too good. So we hide one year, find the constants with the other years, and then forecast the hidden year, day by day. The forecast only uses data that was known at that time.

23 of 31unhealthy days were caught in 2015, a hidden haze year, with only 2 false warnings in the whole year
21 of 31for the simple guess "tomorrow is the same as today", with 10 false warnings
–2026 test: see below

Honest science: what the model cannot do well

  • One box only. It gives one value for all of Singapore. It cannot show that the west is worse than the east.
  • Sudden haze. When the haze arrives after a clear day, the model often sees it late.
  • Future fires. Nobody knows the fires of next week. Our 7-day outlook guesses that the fires stay the same as in the last 3 days, so days far ahead are less sure.
  • One smoke height. Real smoke travels at many heights. The model uses one.

Quiz

Choose an answer. You get the explanation at once.

Glossary

Back trajectoryThe path that the air took before it arrived, found from the wind, step by step back in time.
Box modelA model that treats a volume of air as one well-mixed box, and keeps account of what comes in and what goes out.
ConcentrationMass of particles in one cubic metre of air (µg/m³).
ConvectionMovement of a fluid because of heat: warm air goes up, cool air goes down.
EquilibriumThe state where what comes in is equal to what goes out, so the value does not change.
Fire radiative powerThe infrared power from a fire that a satellite measures, in megawatts.
Mixing heightThe height of the lid: the top of the layer of air that mixes with the ground.
OverfittingWhen a model copies the past data too closely and then fails on new data.
PeatWet, dead plant material in thick layers. Dry peat burns slowly and makes a lot of smoke.
PM2.5Particles in the air smaller than 2.5 micrometres.
PSIPollutant Standards Index. NEA's number for air quality. Above 100 is unhealthy.
Residence timeThe time that the wind needs to change all the air in the box: L ÷ U.
Temperature inversionA layer where the air gets warmer as you go up. It stops the air below from going up, like a lid.