Skip to content

Behind a forecast

glofas_ewds.credibility

What stands behind a forecast peak: members and runs, as facts.

Pure: nothing here does I/O.

One control run over a threshold is the weakest alarm there is, and it is what a discharge ratio alone fires on. Two more things are already in the data and cost nothing:

  • the ensemble: 51 forecasts of the same run. Three of them over the 2-year flood and forty of them over it are the same control run and very different news;
  • the runs before: a peak that yesterday's and the day before's runs already forecast for the same days is not a peak that appeared this morning.

:func:credibility puts them in one record. It holds facts, not a verdict: no score, no level of alert. Whether three members out of 51 are enough to hold an alarm back is the decision of whoever raises the alarm, and nobody measured here how often a peak with a given share is followed by a flood: that needs years of archived forecasts (cems-glofas-reforecast). Read it next to :func:~glofas_ewds.trust.trust, which says what GloFAS saw of the known floods on rivers of that size.

Credibility dataclass

A forecast peak, and how many forecasts stand behind it.

credibility

credibility(members: ArrayLike, run: date, thresholds: Mapping[int, float | None], *, previous: Sequence[tuple[date, ArrayLike]] = ()) -> Credibility | None

What stands behind the forecast of run.

members is (member, lead time) with the control run first, as :func:~glofas_ewds.glofas.ensemble_members and :func:~glofas_ewds.openmeteo.parse_members give it. thresholds is {years: m³/s} for the same cell. previous is earlier runs of the same node, (run, members), in any order; runs that are not earlier are ignored.

None when there is nothing to count against: no 2-year threshold, or a control run that is all masked. "I don't know" is not "no alarm".