Technical methodology
How the storm monitor works
A short, illustrated description of the methods behind the Freetown storm nowcasting service, from raw geostationary infrared imagery through to the per-cycle alert decision. Intended for technical readers.
01 / OverviewWhat this monitor does
Every fifteen minutes the monitor downloads the latest Meteosat SEVIRI infrared image over West Africa, finds the convective cells around Freetown, measures how the cloud field is moving with a dense optical flow algorithm, and projects the cold rain cores forward in time to decide whether any of them will reach the city within the next hour.
One cycle produces three things; a snapshot map, a short animation that runs from the recent past through the next sixty minutes of projection, and a machine readable status file. They are delivered to a Telegram group, a Microsoft Teams channel, and this web page. An alert is raised only when a projected rain core is forecast to land on the city itself.
02 / Why FreetownThe geography of the problem
Freetown sits at 8.484° N, 13.234° W on the Atlantic coast of Sierra Leone, at the southern entrance of the West African monsoon. Between May and October the city is exposed to mesoscale convective systems and squall lines that develop over the continent and travel westward at thirty to eighty kilometres per hour, sometimes reaching the coast in under two hours.
The hilly terrain of the Freetown Peninsula sharpens the impact of these storms; flash floods, mudslides, and infrastructure damage recur through the rainy season. A short horizon warning aimed at the city itself, rather than a broad regional zone, carries real operational value.
03 / Data sourceEUMETSAT Meteosat SEVIRI IR 10.8 µm
The system reads imagery from the Meteosat Second Generation geostationary satellite operated by EUMETSAT, parked at 0° longitude roughly thirty six thousand kilometres above the Gulf of Guinea. Its SEVIRI instrument scans the full Earth disk every fifteen minutes in twelve spectral channels. Images are obtained from the EUMETSAT Data Store through the eumdac library, cropped to the region of interest at the source so each file is small and quick to fetch.
The monitor relies on channel 9, the infrared 10.8 µm window. At this wavelength the brightness temperature read by the instrument is a direct proxy for cloud top temperature; a colder pixel means a higher, more vertically developed cloud. Deep convective cores radiate near 190 to 210 K, while clear sky or warm sea surface appears around 290 to 310 K. The raw product is delivered as calibrated radiance, which the monitor inverts through the Planck function with the official MSG channel 9 coefficients to recover brightness temperature in kelvin.
04 / Cell detectionFrom pixels to objects
Detection keeps two ideas separate that a single threshold would merge. A
wide mask captures the full extent of each system, including its cold but
non raining anvil; every pixel colder than TEMP_DETECT = 235 K
joins the mask, which is then cleaned morphologically, split into connected
components, and filtered by area, with MIN_CELL_AREA_KM2 = 500.
Each surviving component is a tracked cell.
Within a cell, only the deep convective core can produce rain. The core is
the part colder than TEMP_RAIN_CORE_K = 205 K, a value the
nowcasting literature associates with intense tropical convection. This
distinction is the heart of the method; a broad cold canopy can drift over
the city without a drop falling, so the warm anvil is watched but never
triggers a warning. Only the compact, genuinely cold core does.
05 / Motion trackingDense optical flow with Farnebäck
Rather than tracking each cell as a rigid blob with one velocity, the
monitor estimates a dense, non uniform displacement field over the whole
image. It is computed between two consecutive frames with the Farnebäck
algorithm (Farnebäck, 2003), through
cv2.calcOpticalFlowFarneback.
The algorithm models the local intensity around every pixel as a quadratic polynomial; the displacement that best maps the polynomial of one frame onto the next gives the local motion. The output is a vector field at the resolution of the image, so each pixel carries its own displacement. This matters because a storm does not move as one piece; its leading edge, core, and trailing anvil can travel at different speeds, and a dense field captures that shear where a single arrow could not.
06 / Impact projectionForward in time, core by core
Projection answers one question; where will the rain be in fifteen, thirty, forty five, and sixty minutes. The monitor advects the whole textured field forward along the dense flow, in five minute sub steps, using semi Lagrangian backward advection so the output stays on a regular grid. For the alert decision it then reads, in each projected state, the cold core mask at or below 205 K and measures how much of it lands inside the target.
An earlier version asked whether the cell as a whole was approaching, which fired far too early; the warm leading edge of a cloud shield would arrive while the rain, confined to the core, was still far away or already fading. The current method evaluates the projected core area over the city, not the proximity of the canopy, so a storm whose core misses or weakens before arrival no longer raises a false alarm.
Projecting the intensity field, not just an outline
The projection moves more than a shape. Each projected frame lets the cloud temperature evolve the way it has been evolving over the recent observed frames, so an intensifying core keeps cooling and a decaying one keeps warming as it travels. The tendency is measured in a motion compensated frame, by comparing each recent image with the previous one advected onto it, then fitted across the last few frames with more weight on the most recent step. A sudden, sharp change overrides the older trend, so a storm that collapses in the last fifteen minutes is projected as collapsing, not as the strengthening it showed before.
Two further refinements keep the projection faithful. The advected field is sampled with nearest neighbour values, which keeps the pixel grid crisp and preserves the native infrared resolution rather than blurring cores into soft blobs over successive horizons. And because a tall cloud top is seen by the satellite offset from the rain beneath it, a parallax correction shifts the apparent cold pixels onto their true ground position before the target test; at Freetown this shift is about four to five kilometres toward the south east, comparable to the target radius itself, so it cannot be ignored.
07 / Alert criterionThe state machine
The monitor holds one of three states. It rests in IDLE while
no significant cell is near; it moves to STUDY when a cell
enters the 160 km disk around the city and is then watched closely every
cycle; and it raises ALERT only when a projected rain core is
forecast to land on the 5 km target with enough area to matter. The web page
always shows the live field and the projection; the push alarm to Telegram
and Teams is reserved for the alert state.
The alert test combines three conditions, all of which must hold. The
projected core, parallax corrected, must cover the target at some horizon
out to sixty minutes; its area there must exceed
RAIN_CORE_AREA_MIN_KM2 = 30; and the core must not be clearly
decaying, unless it is already large enough to be a present threat. When
they hold, the earliest qualifying horizon becomes the lead time announced
in the alert, the genuine arrival time of the rain rather than the arrival
of the cloud edge.
08 / LimitationsWhat this monitor cannot do
Calibration is approximate
The core threshold of 205 K and the minimum area of 30 km² are sound starting points drawn from the literature, not values tuned against local rain gauges. The monitor logs the core temperature of every cell it sees, so these thresholds can be refined later against what actually fell on the city; until then, treat them as reasonable defaults rather than calibrated constants.
Projection cannot invent growth it has not seen
Advection carries a storm forward and the intensity trend extends its recent evolution, but neither can predict a storm that has not begun to form or one that suddenly reorganises. Skill falls off across the hour; the fifteen and thirty minute horizons are dependable, while the forty five and sixty minute horizons are weaker and should be read as guidance, not certainty.
Infrared sees cloud tops, not rain
Brightness temperature is a proxy. A very cold top usually means heavy rain, but not always; thin cold cirrus can mislead, and shallow warm rain can fall from tops the threshold never flags. The parallax correction reduces the spatial error of seeing the cloud from an angle, yet a residual uncertainty of a kilometre or two remains around a 5 km target.
Dependence on a single source
Everything rests on one satellite channel reaching the server every fifteen minutes. When a product is late or missing the monitor keeps showing the last good state and reports its true age, and a slower public imagery endpoint can stand in as a fallback; but a prolonged outage of the source suspends new guidance until it returns.
09 / ArchitectureFrom ingest to delivery
The whole system runs on a small virtual server. A scheduled task wakes every fifteen minutes, runs one full cycle, and exits; there is no long lived process to crash. Each cycle fetches the latest image, runs detection, tracking, projection, and the alert test, renders the map and the animation, writes the status file, and dispatches whatever notifications the state change requires. A separate watchdog checks that cycles are still happening and the page is still fresh.
Per cycle behaviour
Freshness is judged on the system, not on the data clock. The page reports the true age of the satellite image, which always lags real time by the unavoidable processing delay, but the stale warning is driven by whether the system itself has published recently. As long as cycles keep running every fifteen minutes the page is considered live; the warning appears only after several missed cycles, a genuine interruption rather than the normal latency of the source.
10 / CreditsSources and references
Data, EUMETSAT, Meteosat Second Generation, channel 9 (IR 10.8 µm), obtained from the EUMETSAT Data Store through the eumdac library, with a public imagery endpoint as fallback.
Basemap, tiles from the OpenStreetMap project, © OpenStreetMap contributors, used in accordance with the tile usage policy.
Key algorithms, optical flow from G. Farnebäck, Two-Frame Motion Estimation Based on Polynomial Expansion, SCIA 2003, through OpenCV; field projection by semi Lagrangian backward advection after U. Germann and I. Zawadzki, Scale-Dependence of the Predictability of Precipitation from Continental Radar Images, Mon. Wea. Rev. 2002, the scheme used by the open source pysteps library; rain core thresholds and the anvil versus core distinction follow the tropical convection and cold cloud nowcasting literature. Array and image routines from numpy, scipy.ndimage, OpenCV, and Pillow.
Implementation, David Willemy, getthelinein.com. Source available on request.