# A Temporal Bias Correction using a Machine Learning Attention model

Omer Nivron  Damon J. Wischik  Mathieu Vrac  Emily Shuckburgh  University of
Cambridge, Department of Computer Science and Technology, Cambridge, UK.
<EMAIL_ADDRESS>University of Cambridge, Department of Computer Science and
Technology, Cambridge, UK  Institut Pierre-Simon Laplace, Laboratoire des
Sciences du Climat et de l’Environnement, Paris, France  University of
Cambridge, Department of Computer Science and Technology, Cambridge, UK

###### Abstract

Climate models are biased with respect to real world observations and usually
need to be calibrated prior to impact studies. The suite of statistical
methods that enable such calibrations is called bias correction (BC). However,
current BC methods struggle to adjust for temporal biases, because they
disregard the dependence between consecutive time-points. As a result, climate
statistics with long-range temporal properties, such as heatwave duration and
frequency, cannot be corrected accurately, making it more difficult to produce
reliable impact studies on such climate statistics. In this paper, we offer a
novel BC methodology to correct for temporal biases. This is made possible by
i) re-thinking BC as a probability model rather than an algorithmic procedure,
and ii) adapting state-of-the-art machine-learning (ML) probabilistic
attention models to fit the BC task. With a case study of heatwave duration
statistics in Abuja, Nigeria, and Tokyo, Japan, we show striking results
compared to current climate model outputs and alternative BC methods.

###### keywords:

Bias-Correction; Time-series; Heatwaves; Machine-Learning; Attention

Nivron et al.

Climate models are biased. Bias Correction (BC) is a suite of statistical
methods to address those biases and adjust climate model statistics to enable
more precise and localised impact studies. However, to date, no BC can adjust
for long-range temporal properties, relevant to infer statistics such as
heatwave duration. We offer a novel methodology for temporal BC — this is made
possible by adapting state-of-the-art machine-learning (ML) attention models
to fit the BC task. We show striking results compared to current climate model
outputs and alternative BC methods with a case study of heatwave duration
statistics in Abuja, Nigeria, and Tokyo, Japan. The results are relevant to a
wide audience, ranging from climate scientists to policy-makers.

##  1 Introduction

Climate models are biased with respect to observations [32, 7, 39], affecting
impact studies in domains such as the economy [42, 31, 41], human migration
[10], biodiversity [2], hydrology [16, 8, 34] and agronomy [9, 1],
subsequently influencing policy-making and public awareness. (see Stainforth
et al. [38] for a detailed discussion on reasons for these biases.) Climate
scientists have developed a suite of tools termed jointly bias correction (BC)
to correct these biases and provide output statistics that more closely match
when compared to past observations. Most BC methods are univariate, correcting
for a single one-dimensional physical variable in a single location (e.g., the
summer daily mean air temperatures in London [20]). The most popular
univariate methods are: mean correction [49] (also called Delta methods),
variance correction [3, 20, 30, 18, 22, 13, 37] and empirical quantile mapping
(EQM) and its variants [20, 25, 36, 48, 17, 40, 43, 12, 47, 23]. These
univariate methods, as Vrac et al. [46] explain, cannot correct biases
relating to temporal dependencies in the climate model simulations and that if
corrected, the biases will propagate to impact studies [4]; they cannot
correct for temporal dependencies since they throw away temporal information.
Some multivariate BC approaches have been developed to correct properties of
multidimensional distributions [35, 33, 6, 11, 45]. However, none of these BC
methods is designed to correct for statistics that rely on the joint behaviour
of consecutive time-points, such as heatwaves, as pointed out by Francois et
al. [15] and also by Vrac et al. [46].

To address the gap, we have devised a novel machine learning (ML) methodology
based on attention models [29, 44] — our contribution in this paper. As a
first step, we have recast the BC method as a probability model. In a second
step, we plugged the – now probabilistic BC – into our probabilistic ML
attention model. moving from the typical BC task formulation: how to match the
histogram of observations to the histogram of the climate model? to the
formulation – how to create a corpus of matched pairs of time-series
trajectories? – that can be plugged into different attention models.

To showcase the strength of our methodology, we use the case study of heatwave
duration statistics in Abuja, Nigeria and Tokyo, Japan. We use the simplified
heatwave duration definition (as a proof of concept): at least three
consecutive days above a chosen absolute value in $\degree C$. Our results are
striking: our model’s RMSE is $26\%$ lower than the second-best model in
Tokyo. For this location our model consistently outperforms the alternatives
on the heatwave duration statistic. For example, for different heatwave
thresholds, our model misestimated between $8.5\%$ to $20\%$ of the observed
heatwaves (in the worst-case scenario). In contrast, the second-best BC model
misestimation was between $18\%$ to $66\%$ during a 20-year period. In Abuja,
our model’s RMSE is $22\%$ lower than the second-best model. Similarly to the
results in Tokyo, our model consistently outperforms the alternatives on the
heatwave duration statistic. For example, for different heatwave thresholds,
our model misestimated between $0\%$ to $26\%$ of the observed heatwaves (in
the worst-case scenario). In contrast, the second-best BC model misestimation
was between $2\%$ to $31\%$ during a 20-year period.

##  2 Reference and model data

In any BC task we match data from a climate model to real world observations.
For the climate model data, we chose the 32 initial condition runs from the
climate model of the Institut Pierre-Simon Lapace (IPSL) [26, 5, 21] under the
sixth International Coupled Model Intercomparison Project (CMIP6) [14]
historical experiment. The data is obtained at a 1-day frequency for the
variable ’tasmax’, representing the maximum temperature 2 meters above the
surface. The IPSL model is run at a 250km nominal resolution and is not re-
gridded. For the case studies, we take the closest geographical point to
Abuja, Nigeria, and the closest point to Tokyo, Japan, from 1948-2008.

For the observational data, we use two different Reanalysis tools:

  * •

For Abuja, Nigeria, we use the NCEP-NCAR Reanalysis 1 [24] of the National
Oceanic and Atmospheric Administration (NOAA). The data is obtained in six-
hourly daily measurements for the variable ’tmax’, the maximum temperature 2
meters above the surface, and is averaged to daily measurements. The
resolution is 2.5 degrees globally in both the north-south and east-west
directions and is not regridded. We chose the closest geographical point to
Abuja, Nigeria.

  * •

For Tokyo, Japan, we use the ERA5 reanalysis [19] from the European Centre for
Medium-Range Weather Forecasts (ECMWF). The data is obtained daily for the
variable ’mx2t’, the maximum temperature 2 meters above the surface. The
resolution is 0.25 degrees globally in both the north-south and east-west
directions and is not regridded. We chose the closest geographical point to
Tokyo, Japan.

We use two different reanalysis tools, NCEP-NCAR and ERA5, to show that the
methodology is not limited to one setup. We hypothesize that the model will
also work for many different setups of (climate model, reanalysis tool) pairs.

##  3 Methodology

ML attention models are probability models. To use these models for our task,
we cast the classic BC – typically treated as an algorithmic procedure – as a
probability model. This point becomes possible because all BC procedures – as
we will show example of next – are implicit probability models.

###  3.1 Univariate BC as a probability model

An example demonstrates best the implicit probability nature of BC methods. In
the following, we examine the mean shift [49] (used, for example, by Mora et
al. [28] for heatwave mortality impacts). In a mean shift, observations and
climate model outputs are collected over a reference period and the difference
between their means is calculated. The difference is then added to future
climate projections, the collection of which is collapsed to a 1-D histogram.
The 1-D histogram disregards the time index. As a result, the mean shift, or
any classic univariate BC, does not allow us to reconstruct the time series it
originated from (see Appendix, Figure 14 for an illustration). This is exactly
why we cannot use these methods to correct climate statistics that are time-
dependent such as heatwave duration.

The mean shift procedure yields itself to a probabilistic interpretation
(angle): let $Y_{t}^{o},Y_{t}^{g}$ be random variables representing the
temperatures at time-point $t$ for observations and climate model respectively
(we represent random variables with a capital letter and specific values in
lowercase letters). Now the following probability model can be written:

$y_{t}^{o}=y_{t}^{g}+c+\epsilon_{t}$

where $\epsilon_{t}$ is an instance of
$E_{t}\sim\operatorname{Normal}(0,\sigma^{2})$ and $c$ is a learned parameter.
To find $c$, we can use standard linear regression packages (standard linear
regression uses maximum likelihood as its objective to learn the parameters –
full derivation using maximum likelihood showing the equivalence of the
procedural approach and the probability model are in the appendix A.) As a
trivial extension, the mean and variance shift probability model is:

$y_{t}^{o}=m\times y_{t}^{g}+c+\epsilon_{t}$

where both $m,c$ are learned parameters using standard linear regression
(again using the maximum likelihood objective).

The probabilistic interpretation of the mean shift provides us with two
takeaways: first, we already use probability models (implicit or explicit) in
BC. In that case, we can harness the state-of-the-art ML models that are
probability models. Second, in contrast to the mean shift, and any other
univariate BC, we do not need to aggregate or collapse our raw data before
employing our BC, because the the subscript $t$ in a probabilistic model can
indicate a generic time-point — i.e., it is valid for time-points on any
chosen granularity, from hourly to daily to yearly.

From the probabilistic model perspective of the mean shift (or mean and
variance shift), it is clear that we cannot use it to correct time-dependent
statistics since the random variables $Y_{t_{i}}^{o},Y_{t_{j}}^{o}$ are
independent of each other for any $i\neq j$ — equivalent to throwing away all
temporal correlation information.

###  3.2 Proposed probability model

Differently from the univariate case that throws away temporal information, we
want to solve the BC task with a time-series probability model. A simple
example would help to shed light on what we want from a time-series
probability model.

Consider the following example: Imagine the heatwave duration is consistently
two times longer in the climate model than it is in the observational record.
We can then manually construct a probability model. Our probability model
copies the climate model trajectory; if the trajectory passes above $30\degree
C$ for multiple days in a row, cut the trajectory in half and add a bias $a$
and some noise, $\epsilon_{t}$, to get the corresponding estimated
observation; otherwise, assign 0.

There are two main things to notice from this probability model: a) the value
at time point $t_{i}$, $y_{t_{i}}^{o}$, is some deterministic function $f$ of
the ordered future values $y_{t_{j\geq i}}^{g}$ from the climate model (the
notation $j\geq i$ denotes all indices greater or equal to $i$), and b) since
the probability model has some noise, $\epsilon_{t}$, we can sample different
values for $y_{t_{i}}^{o}$ for each $t_{i}$, leading to an ensemble of
trajectories. In ML, we call the readouts from the sampling procedure the
inference stage (for more details, see discussion below).

Since $\epsilon_{t}$ comes from the Normal distribution, we can concisely
write our model as

$Y_{t_{k}}^{o}|{inp}_{k}\sim\operatorname{Normal}(f({inp}_{k}),\sigma^{2})$
(1)

where ${inp}_{k}:=\\{y_{t_{k}:t_{M}}^{g},t_{k}\\}$, with the notation
$t_{i}:t_{j}$ to indicate all time-points between $t_{i}$ and $t_{j}$
included. That is, again, an easy probability model with a learnable parameter
$a$ which we can learn using standard linear regression libraries. (See
Appendix, Algorithm 3 for an example implementation for this probability model
and Figure 15 for an illustration.)

An obvious extension to the simple time-series probability model above is to
a) add past values from the climate model, b) add past observations, and c)
choose the function $f$ as a neural network parameterised by $\theta$. So, our
proposed probability model is:

$Y_{t_{k}}^{o}|{inp}_{k}\sim\operatorname{Normal}(f_{\theta}({inp}_{k}),g_{\theta}({inp}_{k}))$
(2)

here $Y_{t_{k}}^{o}$ are random variables representing the temperatures at
time $t_{k}$ for observations, where we have $t_{1}<..<t_{k}<..<t_{M}$ with
$M$ being the size of the sequence. Additionally, we define
${inp}_{k}:=(y_{t_{1}:t_{M}}^{g},y_{t_{1}:t_{k-1}}^{o},{t_{1}^{g}:t_{M}}^{g},{t_{1}^{o}:t_{k-1}}^{o})$,
$f_{\theta}$ and $g_{\theta}$ are functions with parameters represented by
$\theta$.

We think this probability model will perform better (than existing bias-
correction models) on correction tasks that aim to extract temporal
statistics. First, it considers the dependencies of past observations. Second,
it considers past and future climate model outputs. Third, unlike univariate
BC, it does not require any collapse or aggregation of data – allowing the
model to learn from more data. Lastly, the model also has the theoretical
ability to overcome the time sync issue which Maraun describes [27] as
following: But crucially, and different to numerical weather forecasts,
transient climate simulations are not in synchrony with observations. As a
result, regression models cannot easily be calibrated. Therefore, researchers
explored possibilities to bias correct based on long-term distributions
instead of day-to-day relationships. Since our probability model considers
past observations and (past, future) climate model outputs, there is no need
to rely on day-to-day relationships. We have shown an example of this in
Equation 1.

In ML, once we have a probability model, we need to choose the architecture
that would enable the learning of the model’s parameters. In this case, we
have chosen the Taylorformer [29], which is an adaptation of the Transformer
attention model by Vaswani [44] to real-valued targets on a continuum. We now
turn to explain the adaptations needed for the BC task.

###  3.3 From probability model to ML implementation

We now turn to explain the adaptations needed for the BC task. To implement
the Taylorformer (or any deep learning model), we have to set a training
objective and then construct a training dataset, a hold-out set, and an
inference procedure.

##### Training objective

Our training objective is illustrated in Figure 2. Our aim is to correct
future observations (dashed purple line) given a pair of sequences: one
sequence of past observations (solid blue line) and another sequence of past
and future climate model outputs (solid red line). Hereafter, we term the set
of points either in past observations or in (past, future) climate model
outputs the context set and denote it by $C$. Based on $C$, we correct the
unknown values (dashed purple line), which we collectively term the target
set, denoted by $T$.

Figure 1: An illustration of the training objective. Our goal is to correct
for future observations (dashed purple line) given all the data bounded by the
white rectangles. See main text for details.

Figure 2: An example of a pair of (climate model, observation) trajectories
extracted to train our ML model. Here, the climate model (solid orange line)
and past observations (solid blue line) are used to correct for the 365 daily
unseen values (dashed light-blue line).

In probabilistic language, we maximise the log-likelihood of the unseen values
(dashed purple line) given the input (maximum likelihood is the same objective
as in the univariate case). Mathematically, using the notation from above,
this means

$\max_{\theta}\operatorname{Log}p(\mathbf{Y_{t_{i}:i\in T}}^{o}|\cap
inp_{k:k\in C},\theta)$ (3)

##### Training dataset

Practically, to train our dataset for our objective, we must do more than feed
in the entire trajectory of the pair (observations, climate model) from
1948-1988 since this would enable only one gradient descent pass, and little
learning would occur. Hence, we have to break down the pair into many pairs
with a similar structure, as shown in Figure 2.

Furthermore, We have to address the following three issues that occur with the
constructed training set in Figure 2 and with our objective. (1) we want to
allow pairs to have differing lengths — it is unclear a-priori which length is
optimal, and (2) we do not want to assume any independence between random
variables in our objective (assuming independence would limit our ability to
learn temporal structures). Our only way to do that is to learn our model
auto-regressively. (3) if our model is auto-regressive, we have to heed that
it does not learn the rule Tomorrow will be the same as today as pointed out
by Nivron et al. [29]. To address (1) and (2), we will use the Taylorformer
[29] architecture fitting the auto-regressive model for arbitrary length
sequences. We now describe the concrete pairs in our training set and then
refine it to handle concern (3).

Our training sequences follow the exact construction of the probability model.
However, when correcting $Y_{t_{k}}^{o}$ instead of taking the full length $M$
of the climate model sequence and all previous observations up to $k$
(excluding) when constructing ${inp}_{k}$, we slice snapshots of shorter
lengths. The length of the pair of sequences is chosen randomly (addressing
point (1) above) for each row, and the starting position $t_{1}$ is changing
as well to avoid learning a prediction instead of a correction (this point is
explained in the discussion at the end of this section). An explicit example
of a row in our dataset is:
$[(t_{1},y_{1,t_{1}},1,0),\dots(t_{N},y_{1,t_{N}},1,0),(t_{1},y_{0,t_{1}},0,8)\dots(t_{N},y_{0,t_{N}},0,8)\dots(t_{N+B},y_{0,t_{N+B}},0,8)]$.
The entries of each tuple are of the form $(t_{j},y_{k,t_{j}},k,r)$ where $k$
equals $1$ if the value is from the observation time-series and $0$ if it is
from the climate model time-series and $r$ indicates the initial-condition run
index, with $0$ referring to observations.

##### Changing context and target lengths and max length

To address the problem of auto-regressive models, which sometimes are just
copying machines of the previous input (as explained in 3.3), we employ the
following mechanism: The context and target sets’ sizes are changing with
different spacing between values (irregular grid). This follows the work in
Taylorformer [29], encouraging the network to learn more robust predictions.
Further, we limit the maximum sequence length to 360 points, which is chosen
to address the high computational load of attention blocks. (See
implementation in Algorithm 1).

##### Hold-out set

We must split the training data and holdout set to an extensive time range to
show our model’s performance in a changing climate and have enough data to
make statements about climate-related statistics. Therefore, we split the
training data between 1948 and 1988, and the holdout was set between 1989 and
2008.

##### Inference

In ML, we first train a model to learn the parameters of a network. Once the
parameters are learned using an objective (here, maximum likelihood), they are
fixed and we can use the network to get our desired readouts. This is called
the inference stage, and for our chosen sequential model, it operates in a
generative mode. While in training, we try to predict the mean and standard
deviation of the Normal distribution as stated in 2, in a generative mode, we
sample from that distribution. To predict the next value, we first attach the
sampled value to the new ${inp}_{k}$ sequence to predict the next value and
then proceed. In training, we attach the actual value (as opposed to a sampled
value or predicted value) to the new ${inp}_{k}$ sequence — this is the
standard way to train a sequential model using maximum likelihood.

Our sampling (inference) process mimics the way we trained the model — we feed
in a sequence of size 180, with the last 60 days of 1988 for observations and
the climate model outputs and the next 120 days of 1989 from the climate model
to produce the first estimated observation of 1989. Next, we attach the
sampled value to our observations and shift all the processes by one day to
the right so that when sampling the second day of 1989, we still have a
context sequence of size 180. We iterate the process until we have all days up
to 2008. (See implementation in Algorithm 2).

###  3.4 Discussion: other ways to slice and infer the data

####  3.4.1 Slicing discussion

It is not trivial to slice the pair of (climate model, observations) sequences
to build a training corpus. For example, the corpus has to encourage the
correction task instead of a prediction task. If we give the model pairs of
(climate model $i$, obs) at time $t$ with different initial-condition indexed
by $i$, then the ML model will learn to ignore the climate model completely;
the observation value would always be the same for all pairs while the climate
model output would keep on changing based on which initial-condition $i$ was
chosen and hence uninformative.

Given the understanding that we have to make our pairing process in an
educated manner, how should we pair the climate model(s) with observations?
This is only possible, if we make some assumptions about the generating
process.

Here are a few possibilities for sensible corpus constructions:

  1. 1.

($Y_{1,loc_{1}}^{g}$, $Y_{loc_{1}}^{o}$), ($Y_{2,loc_{2}}^{g}$,
$Y_{loc_{2}}^{o}$), …

  2. 2.

($Y_{1,loc_{1},t1:t2}^{g}$, $Y_{loc_{1},t1:t2}^{o}$),
($Y_{2,loc_{1},t3:t4}^{g}$, $Y_{loc_{1},t3:t4}^{o}$), …

In option (1), $Y_{i,loc_{j}}^{g}$ is the climate model with the initial-
condition indexed by $i$ and obtained from geographical region indexed by j.
We pair such a sequence with $Y_{loc_{j}}^{o}$, the observed sequence from the
same region. This setup assumes that the correction is the same for repeated
patterns for different regions and initial-condition runs and the full
trajectory of the sequences. In option (2), $Y_{i,loc_{j},s}^{g}$ is the
climate model for time-window $s$ and is paired with $Y_{loc_{j},s}^{o}$, the
observed sequence from same time-window. Here, the region does not change
throughout the corpus, but the time-window and initial-condition index do.
Given a repeated pattern, it assumes that the same correction applies only to
one specific region for different time-windows and different initial-condition
runs.

These setups are selected examples of slicing the data. The question remains:
Which possibility can be chosen to construct the corpus? A standard ML
procedure is to choose the model that performed best on hold-out likelihood
and this is how we chose our slicing above.

####  3.4.2 Inference discussion

We could have used different setups to execute the sampling (generation)
process, and not all generation processes are equal. It is a matter of
empirical work to choose the generation process. Our choice above is a
convenient choice to align with the training procedure. For example, we can
inject the entire trajectory of a climate model run and all observations from
1948-1988 and sample day-by-day values up until 2008. Alternatively, we can
use the same inputs to generate in non-chronological order, generate the 1st
of January 1989, and then fill in the values in-between before continuing to
1990 and further.

##  4 Experiments

To test our model, we do the following experiment: First, we bias-correct
daily maximum temperatures for Abuja, Nigeria, and separately for Tokyo,
Japan, for 1989-2008 based on the years 1948-1988. Second, we calculate the
heatwave duration distribution from the bias-corrected data.

We compare our model to the raw output from the climate model and to three BC
methods: mean correction, mean and variance correction, and EQM. Table 1 shows
the $\operatorname{RMSE}$ obtained by each BC method – our temporal BC
achieves $26\%$ lower RMSE in Tokyo, Japan, and $22\%$ lower in Abuja,
Nigeria.

Figure 4 shows the results for the calculated heatwave duration distribution
for Tokyo, Japan using a heatwave threshold of three consecutive days above
22∘C maximum temperature. The raw outputs from the IPSL climate model (red
triangles) underestimate the number of instances of observed heatwaves
(vertical orange line) by more than $100\%$ for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $1\%$ from the observed
number of heatwaves. Other BC models perform worse: $24\%,18\%,15\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 4 shows the results for Abuja, Nigeria using a heatwave threshold of
three consecutive days above 24∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) overestimate the number of instances of
observed heatwaves (vertical orange line) by more than $33\%$ for the period
$1989-2008$. Our novel Taylorformer temporal BC produces a much more accurate
distribution (horizontal box-plots) per run (0-31) for the number of heatwaves
in the same period with an ensemble average differing by at most $1\%$ from
the observed number of heatwaves. Other BC models perform worse:
$14\%,19\%,15\%$ for mean-shift (‘+’), mean and variance shift (‘X’), and EQM
(‘$\star$’), respectively.

At both locations our model’s ensemble average differs by at most $1\%$ from
the actual observed values, whereas the other BC models differ by $15-24\%$
and $14-19\%$ for Tokyo and Abuja, respectively. Similar figures (using
different heatwave thresholds), found in appendix C, show that our model
consistently outperforms the other BC alternatives.

Table 1: Our Temporal BC outperforms alternative BC on the RMSE for the daily maximum temperature values ($\degree$C) for the 20-year period from 1989-2008. Model | RMSE
---|---
| Tokyo | Abuja
Climate model | 6.29 | 3.33
Temporal BC | 2.57 | 1.88
EQM | 3.49 | 2.42
Mean | 3.80 | 2.77
Mean + Var | 3.50 | 2.69

Figure 3: Number of periods of three consecutive days above 22∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 4: Number of periods of three consecutive days above 24∘C maximum
temperature in Abuja, Nigeria for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

##  5 Conclusion

This paper offers the first BC method to extract long-range temporal
properties, such as heatwave duration statistics, from climate models. It is
done by first re-thinking BC as a probability model rather than an algorithmic
procedure and then combining it with attention ML models. Our temporal BC
model is tested on the correction of time series in Abuja, Nigeria, and Tokyo,
Japan, and the results yield much more accurate heatwave duration statistics
than have been achieved hitherto. Our model opens up the opportunity to do BC
temporally. Going forward, this study needs to be scaled-up, considering
multiple regions, more climate models, more climate statistics and
extrapolations to the future climate (e.g., up to 2050).

##### Funding Statement

This research was supported by the Artificial Intelligence for Environmental
Risks (AI4ER) CDT, University of Cambridge.

##### Competing Interests

None

##### Data Availability Statement

All data and code is open-sourced and available: IPSL climate model (data) –
https://esgf-node.llnl.gov/search/cmip6/, NCEP-NCAR Reanalysis 1 (data) –
https://psl.noaa.gov/data/gridded/data.ncep.reanalysis.html, ERA5 (data)
https://www.ecmwf.int/en/forecasts/dataset/ecmwf-reanalysis-v5, Taylorformer
temporal BC model (code) –https://github.com/oremnirv/Taylorformer

##### Ethical Standards

The research meets all ethical guidelines, including adherence to the legal
requirements of the study country.

##### Author Contributions

Omer Nivron: Conceptualization, Methodology, Writing- Original draft
preparation, Investigation, Visualization, Software, Formal analysis. Damon
Wischik: Conceptualization, Formal analysis, Methodology, Writing- Reviewing
and Editing. Mathieau Vrac: Writing- Reviewing and Editing, Validation,
Supervision. Emily Shuckburgh: Writing- Reviewing and Editing, Supervision.
Alexander Archibald: Writing- Reviewing and Editing, Supervision.

##### Supplementary Material

Additional figures and implementation algorithms are provided in appendices
A-D.

## References

  * [1] Tamara Ben Ari  “Causes and implications of the unforeseen 2016 extreme yield loss in France’s breadbasket”, 2020  URL: https://api.semanticscholar.org/CorpusID:235024720
  * [2] Céline Bellard et al.  “Impacts of climate change on the future of biodiversity”  In _Ecology Letters_ 15.4, 2012, pp. 365–377  DOI: https://doi.org/10.1111/j.1461-0248.2011.01736.x
  * [3] F. Boberg and J. Christensen  “Overestimation of Mediterranean summer temperature projections due to model deficiencies”  In _Nature Climate Change_ 2, 2012, pp. 433–436
  * [4] Julien Boé, Laurent Terray, Florence Habets and Eric Martin  “Statistical and dynamical downscaling of the Seine basin climate for hydro-meteorological studies”  In _International Journal of Climatology_ 27, 2007  URL: https://api.semanticscholar.org/CorpusID:128643024
  * [5] Olivier Boucher et al.  “Presentation and Evaluation of the IPSL-CM6A-LR Climate Model” e2019MS002010 10.1029/2019MS002010  In _Journal of Advances in Modeling Earth Systems_ 12.7, 2020, pp. e2019MS002010  DOI: https://doi.org/10.1029/2019MS002010
  * [6] Alex Cannon  “Multivariate quantile mapping bias correction: an N-dimensional probability density function transform for climate model simulations of multiple variables”  In _Climate Dynamics_ 50, 2018  DOI: 10.1007/s00382-017-3580-6
  * [7] Jens Hesselbjerg Christensen, Fredrik Boberg, Ole Bøssing Christensen and Philippe Lucas-Picher  “On the need for bias correction of regional climate change projections of temperature and precipitation”  In _Geophysical Research Letters_ 35, 2008  URL: https://api.semanticscholar.org/CorpusID:128752652
  * [8] Niklas S. Christensen et al.  “The Effects of Climate Change on the Hydrology and Water Resources of the Colorado River Basin”  In _Climatic Change_ 62, 2004, pp. 337–363  URL: https://api.semanticscholar.org/CorpusID:53533021
  * [9] Ph Ciais et al.  “Europe-wide reduction in primary productivity caused by the heat and drought in 2003”  In _Nature_ 437, 2005, pp. 529–33  DOI: 10.1038/nature03972
  * [10] Dimitri Defrance et al.  “Consequences of rapid ice sheet melting on the Sahelian population vulnerability”  In _Proceedings of the National Academy of Sciences_ 114.25, 2017, pp. 6533–6538  DOI: 10.1073/pnas.1619358114
  * [11] Léonard Dekens, Sylvie Parey, Mathilde Grandjacques and Didier Dacunha-Castelle  “Multivariate distribution correction of climate model outputs: A generalization of quantile mapping approaches”  In _Environmetrics_ 28, 2017  URL: https://api.semanticscholar.org/CorpusID:126106313
  * [12] Michel Déqué  “Frequency of precipitation and temperature extremes over France in an anthropogenic scenario: Model results and statistical correction according to observed values”  In _Global and Planetary Change_ 57, 2007, pp. 16–26  URL: https://api.semanticscholar.org/CorpusID:128409261
  * [13] Jonathan M. Eden, Martin Widmann, David Grawe and Sebastian Rast  “Skill, Correction, and Downscaling of GCM-Simulated Precipitation”  In _Journal of Climate_ 25, 2012, pp. 3970–3984  URL: https://api.semanticscholar.org/CorpusID:128629641
  * [14] V. Eyring et al.  “Overview of the Coupled Model Intercomparison Project Phase 6 (CMIP6) experimental design and organization”  In _Geoscientific Model Development_ 9.5, 2016, pp. 1937–1958  DOI: 10.5194/gmd-9-1937-2016
  * [15] Bastien François et al.  “Multivariate bias corrections of climate simulations: which benefits for which losses?”, 2020
  * [16] Peter H. Gleick  “Climate change, hydrology, and water resources”  In _Reviews of Geophysics_ 27, 1989, pp. 329–344  URL: https://api.semanticscholar.org/CorpusID:128418811
  * [17] S. Hagemann et al.  “Impact of a Statistical Bias Correction on the Projected Hydrological Changes Obtained from Three GCMs and Two Hydrology Models”  In _Journal of Hydrometeorology_ 12, 2011, pp. 556–578
  * [18] E. Hawkins, T. Osborne, C.. Ho and A. Challinor  “Calibration and bias correction of climate projections for crop modelling: An idealised case study over Europe”  In _Agricultural and Forest Meteorology_ 170, 2013, pp. 19–31
  * [19] Hans Hersbach et al.  “The ERA5 global reanalysis”  In _Quarterly Journal of the Royal Meteorological Society_ , 2020  DOI: 10.1002/qj.3803
  * [20] Chun Kit Ho et al.  “Calibration strategies a source of additional uncertainty in climate change projections”  In _Bulletin of the American Meteorological Society_ , 2012  DOI: 10.1175/2011BAMS3110.1
  * [21] Frédéric Hourdin et al.  “LMDZ6A: The Atmospheric Component of the IPSL Climate Model With Improved and Better Tuned Physics” e2019MS001892 10.1029/2019MS001892  In _Journal of Advances in Modeling Earth Systems_ 12.7, 2020, pp. e2019MS001892  DOI: https://doi.org/10.1029/2019MS001892
  * [22] T. Iizumi, M. Yokozawa and M. Nishimori  “Probabilistic evaluation of climate change impacts on paddy rice productivity in Japan”  In _Climatic Change_ 107, 2011, pp. 391–415
  * [23] Malaak Kallache, Mathieu Vrac, Philippe Naveau and Paul-Antoine Michelangeli  “Nonstationary probabilistic downscaling of extreme precipitation”  In _Journal of Geophysical Research_ 116, 2010  URL: https://api.semanticscholar.org/CorpusID:67764166
  * [24] Eugenia Kalnay et al.  “The NCEP/NCAR 40-Year Reanalysis Project”  In _Renewable Energy_ , 1996  URL: https://api.semanticscholar.org/CorpusID:124135431
  * [25] Haibin Li, J. Sheffield and E. Wood  “Bias correction of monthly precipitation and temperature fields from Intergovernmental Panel on Climate Change AR4 models using equidistant quantile matching”  In _Journal of Geophysical Research_ 115, 2010
  * [26] Thibaut Lurton et al.  “Implementation of the CMIP6 Forcing Data in the IPSL-CM6A-LR Model” e2019MS001940 10.1029/2019MS001940  In _Journal of Advances in Modeling Earth Systems_ 12.4, 2020, pp. e2019MS001940  DOI: https://doi.org/10.1029/2019MS001940
  * [27] Douglas Maraun  “Bias Correcting Climate Change Simulations - a Critical Review”  In _Current Climate Change Reports_ , 2016  DOI: 10.1007/s40641-016-0050-x
  * [28] Camilo Mora et al.  “Global risk of deadly heat”  In _Nature Climate Change_ 7, 2017  DOI: 10.1038/nclimate3322
  * [29] Omer Nivron, Raghul Parthipan and Damon Wischik  “Taylorformer: Probabilistic Predictions for Time Series and other Processes”  In _ArXiv_ abs/2305.19141, 2023  URL: https://api.semanticscholar.org/CorpusID:258967520
  * [30] C.. O’Reilly, D.. Befort and A. Weisheimer  “Calibrating large-ensemble European climate projections using observational data”  In _Earth System Dynamics_ 11.4, 2020, pp. 1033–1049  DOI: 10.5194/esd-11-1033-2020
  * [31] OECD  “The Economic Consequences of Climate Change”, 2015, pp. 140  DOI: https://doi.org/https://doi.org/10.1787/9789264235410-en
  * [32] T.. Palmer and Antje Weisheimer  “Diagnosing the causes of bias in climate models – why is it so hard?”  In _Geophysical & Astrophysical Fluid Dynamics_ 105.2-3 Taylor & Francis, 2011, pp. 351–365  DOI: 10.1080/03091929.2010.547194
  * [33] C. Piani and J.. Haerter  “Two dimensional bias correction of temperature and precipitation copulas in climate models”  In _Geophysical Research Letters_ 39.20, 2012  DOI: https://doi.org/10.1029/2012GL053839
  * [34] Shilong Piao et al.  “The impacts of climate change on water resources and agriculture in China”  In _Nature_ 467, 2010, pp. 43–51  URL: https://api.semanticscholar.org/CorpusID:4410647
  * [35] Y. Robin, M. Vrac, P. Naveau and P. Yiou  “Multivariate stochastic bias corrections with optimal transport”  In _Hydrology and Earth System Sciences_ 23.2, 2019, pp. 773–786  DOI: 10.5194/hess-23-773-2019
  * [36] K. Salvi, S. Kannan and S. Ghosh  “Statistical Downscaling and Bias Correction for Projections of Indian Rainfall and Temperature in Climate Change Studies”
  * [37] Jürg Schmidli, Christoph Frei and Pier Luigi Vidale  “Downscaling from GCM precipitation: a benchmark for dynamical and statistical downscaling methods”  In _International Journal of Climatology_ 26, 2006  URL: https://api.semanticscholar.org/CorpusID:128686717
  * [38] D. Stainforth, M. Allen, E. Tredger and L. Smith  “Confidence, uncertainty and decision-support relevance in climate predictions”  In _Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences_ 365, 2007, pp. 2145–2161
  * [39] Claudia Teutschbein, Jan Seibert, Jan Seibert and Jan Seibert  “Bias correction of regional climate model simulations for hydrological climate-change impact studies: Review and evaluation of different methods”  In _Journal of Hydrology_ 456, 2012, pp. 12–29  URL: https://api.semanticscholar.org/CorpusID:129017016
  * [40] M. Themeßl, A. Gobiet and A. Leuprecht  “Empirical-statistical downscaling and error correction of daily precipitation from regional climate models”  In _International Journal of Climatology_ 31, 2011, pp. 1530–1544
  * [41] Richard S.. Tol  “The Economic Impact of Weather and Climate”  In _Climate Action eJournal_ , 2021  URL: https://api.semanticscholar.org/CorpusID:228207225
  * [42] Richard S.. Tol  “The Economic Impacts of Climate Change”  In _Review of Environmental Economics and Policy_ 12, 2018, pp. 4–25  URL: https://api.semanticscholar.org/CorpusID:159009492
  * [43] M. Turco, M. Llasat, S. Herrera and J. Gutiérrez  “Bias correction and downscaling of future RCM precipitation projections using a MOS-Analog technique”  In _Journal of Geophysical Research_ 122, 2017, pp. 2631–2648
  * [44] Ashish Vaswani et al.  “Attention is all you need”  In _Advances in Neural Information Processing Systems_ , 2017
  * [45] M. Vrac  “Multivariate bias adjustment of high-dimensional climate simulations: the Rank Resampling for Distributions and Dependences (R2D2) bias correction”  In _Hydrology and Earth System Sciences_ 22.6, 2018, pp. 3175–3196  DOI: 10.5194/hess-22-3175-2018
  * [46] M. Vrac and S. Thao  “R2D2 v2.0: accounting for temporal dependences in multivariate bias correction via analogue rank resampling”  In _Geoscientific Model Development_ 13.11, 2020, pp. 5367–5387  DOI: 10.5194/gmd-13-5367-2020
  * [47] M. Vrac et al.  “Dynamical and statistical downscaling of the French Mediterranean climate: uncertainty assessment”  In _Natural Hazards and Earth System Sciences_ 12.9, 2012, pp. 2769–2784  DOI: 10.5194/nhess-12-2769-2012
  * [48] A. Wood, E. Maurer, A. Kumar and D. Lettenmaier  “Long-range experimental hydrologic forecasting for the eastern United States”  In _Journal of Geophysical Research_ 107, 2002, pp. 4429
  * [49] Chong-yu Xu  “From GCMs to river flow: a review of downscaling methods and hydrologic modelling approaches”  In _Progress in Physical Geography: Earth and Environment_ 23.2, 1999, pp. 229–249  DOI: 10.1177/030913339902300204

##  Appendix A Linear regression mean shift derivation

Estimation of the parameters in linear regression is done using maximum
likelihood as the objective. Using maximum likelihood and denoting
$\mathbf{Y}^{g}$ to refer to the set of all climate model outputs we have

$\displaystyle\max_{\theta}P(y_{t_{1}}^{o},\dots,y_{t_{N}}^{o}|\mathbf{Y}^{g})$
$\displaystyle\overset{\text{independence}}{=}\prod_{i=1}^{N}P(y_{t_{i}}^{o}|y_{t_{i}}^{g})$
(4) $\displaystyle\overset{\text{normal
r.v.}}{=}\prod_{i=1}^{N}\dfrac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left(-\dfrac{(y_{t_{i}}^{o}-y_{t_{i}}^{g}-c)^{2}}{2\sigma^{2}}\right)$
$\displaystyle\xrightarrow{\text{log}}\sum_{i=1}^{N}\log(1)-\log\sqrt{2\pi\sigma^{2}}-\dfrac{(y_{t_{i}}^{o}-y_{t_{i}}^{g}-c)^{2}}{2\sigma^{2}}$
$\displaystyle\dfrac{\partial}{\partial c}$
$\displaystyle\xrightarrow{\text{derivative}=0}-\sum_{i=1}^{N}\left((y_{t_{i}}^{o}-y_{t_{i}}^{g}-c)\right)=0$
$\displaystyle c$
$\displaystyle=\dfrac{1}{N}\sum_{i=1}^{N}y_{t_{i}}^{o}-\dfrac{1}{N}\sum_{i=1}^{N}y_{t_{i}}^{g}$

##  Appendix B Algorithmic implementation

Algorithm 1 Generate Data Batches from Sequences

1:one sequences $Y^{o}$ (observations) and $K$ sequences $Y^{g}$ (climate
model outputs for K initial-conditions), timestamp sequence
$t^{\prime}=\\{t^{\prime}_{1},\ldots,t^{\prime}_{M}\\}$ $\triangleright$
$Y^{o}\in\mathbf{R}^{M},Y^{g}\in\mathbf{R}^{KXM},t^{\prime}\in\mathbf{N}^{M}$
: for all $i$, $t^{\prime}_{i}$ := day of year($t_{i}$)

2:Two arrays: $Y_{C}$ (context set) and $Y_{T}$ (target set) of size $S$

3:while size of $(Y_{C},Y_{T})<S$ do

4: $k\leftarrow$ random selection from $\\{1,\ldots,K\\}$

5: $i\leftarrow$ random selection from $\\{1,\ldots,M\\}$

6: $|C|,|T|\leftarrow$ random sizes for context and target sets

7: Initialize sequences $Seq^{o}$, $Seq^{g}$ with size $|C+T|$

8: for $j\leftarrow i$ to $i+C+T-1$ do

9: $Seq^{o}[j]\leftarrow(Y^{o}[j],t^{\prime}[j],0)$

10: $Seq^{g}[j]\leftarrow(Y_{k}^{g}[j],t^{\prime}[j],1)$

11: end for

12: Subsample and Sort $Seq^{o}$, $Seq^{g}$ $\triangleright$ Randomly
subsample points and sort

13: $Y_{C}\leftarrow$ concatenate indices in $C$ from $Seq^{o}$ with indices
in $C\cup T$ from $Seq^{g}$

14: $Y_{T}\leftarrow$ values from $Seq^{o}$ not in $C$

15:end while

16:return $Y_{C}$, $Y_{T}$

Algorithm 2 Inference with Trained Model

1:

2:A trained model $M$

3:Sequence $Y^{g}$ of climate model predictions

4:Sequence $Y^{o}$ of observations

5:Target sequence size $|N|$

6:

7:Extended sequence $Y^{o}$ with predicted values until $|Y^{o}|=|N|$,
$|Y^{g}|=|N|+120$

8:Initialize $i=1$

9:Choose k from [1, …, K]

10:while $|Y^{o}|<|N|$ do

11: $X_{g}\leftarrow$ select $180$ consecutive points from $Y_{k}^{g}$
starting at $t^{\prime}_{i}$

12: $X_{o}\leftarrow$ select $60$ consecutive points from $Y^{o}$ starting at
$t^{\prime}_{i}$

13: $X\leftarrow$ concatenate $X_{g}$ and $X_{o}$

14: $(\mu,\sigma)\leftarrow M(X)$ $\triangleright$ Model $M$ predicts
parameters

15: $y^{o}_{\text{new}}\leftarrow$ sample from $\mathcal{N}(\mu,\sigma)$

16: Append $y^{o}_{\text{new}}$ to $Y^{o}$

17: $i\leftarrow i+1$

18:end while

Algorithm 3 Compute $y_{o}$ Based on Conditions Applied to $y_{g}$

1:Generate time series $t$ from 0 to 10 with 500 linearly spaced points.

2:$y_{g}\leftarrow 30+15\sin(2\pi\times 0.6\times t)$.

3:$a\leftarrow 2.2$.

4:Initialize $y_{o}$ as an empty list.

5:$x_{g}\leftarrow(y_{g}\geq 30)$.

6:Prepend and append 0 to $x_{g}$.

7:$\delta_{x_{g}}\leftarrow$ compute the difference between consecutive
elements in $x_{g}$.

8:$start\\_end\leftarrow$ find indices where $\delta_{x_{g}}\neq 0$.

9:$\delta_{start\\_end}\leftarrow$ compute the difference between consecutive
elements in $start\\_end$.

10:for $i=0$ to $len(y_{g})-1$ do

11: $cond\leftarrow\text{False}$.

12: for $k=0$ to $len(start\\_end)-2$ do

13: if $i\geq start\\_end[k]$ and
$i<start\\_end[k]+\frac{\delta_{start\\_end}[k]}{2}$ and
$\delta_{x_{g}}[start\\_end[k]]==1$ and $\delta_{x_{g}}[start\\_end[k+1]]==-1$
then

14: $y_{o}.append(30+a+\operatorname{Normal}(0,\sigma^{2}))$.

15: $cond\leftarrow\text{True}$.

16: break.

17: end if

18: end for

19: if $cond==\text{False}$ then

20: $y_{o}.append(0)$.

21: end if

22:end for

##  Appendix C Additional experimental results

###  C.1 Tokyo, Japan

Figure 5 shows the results for Tokyo, Japan using a heatwave threshold of
three consecutive days above 18∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $1\%$ from the observed
number of heatwaves. Other BC models perform worse: $7\%,6\%,6\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 5: Number of periods of three consecutive days above 18∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 6 shows the results for Tokyo, Japan using a heatwave threshold of
three consecutive days above 20∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $1.4\%$ from the observed
number of heatwaves. Other BC models perform worse: $15\%,9\%,8\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 6: Number of periods of three consecutive days above 20∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 7 shows the results for Tokyo, Japan using a heatwave threshold of
three consecutive days above 24∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $3\%$ from the observed
number of heatwaves. Other BC models perform worse: $23\%,12\%,11\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 7: Number of periods of three consecutive days above 24∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 8 shows the results for Tokyo, Japan using a heatwave threshold of
three consecutive days above 26∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $8.6\%$ from the observed
number of heatwaves. Other BC models perform worse: $30\%,21\%,22\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 8: Number of periods of three consecutive days above 26∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 9 shows the results for Tokyo, Japan using a heatwave threshold of
three consecutive days above 28∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $20\%$ from the observed
number of heatwaves. Other BC models perform worse: $83\%,66\%,65\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 9: Number of periods of three consecutive days above 28∘C maximum
temperature in Tokyo, Japan for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 10: Examples for the time series trajectory output of the different BC
models for 500 days after September 8-th 1989 in Tokyo, Japan. First panel:
observation (blue) versus the IPSL climate model, Second panel: observations
(blue) versus our temporal BC ensemble average (green) and its standard
deviation (light-blue highlight), Third panel: observations versus EQM
(orange), Fourth panel: observations vs mean-shift (brown)

###  C.2 Abuja, Nigeria

Figure 11 shows the results for Abuja, Nigeria using a heatwave threshold of
three consecutive days above 26∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $6\%$ from the observed
number of heatwaves. Other BC models perform worse: $12\%,21\%,28\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 11: Number of periods of three consecutive days above 26∘C maximum
temperature in Abuja, Nigeria for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 12 shows the results for Abuja, Nigeria using a heatwave threshold of
three consecutive days above 28∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $12\%$ from the observed
number of heatwaves. Other BC models perform worse: $17\%,25\%,32\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 12: Number of periods of three consecutive days above 28∘C maximum
temperature in Abuja, Nigeria for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

Figure 13 shows the results for Abuja, Nigeria using a heatwave threshold of
three consecutive days above 30∘C maximum temperature. The raw outputs from
the IPSL climate model (red triangles) underestimate the number of instances
of observed heatwaves (vertical orange line) for the period $1989-2008$. Our
novel Taylorformer temporal BC produces a much more accurate distribution
(horizontal box-plots) per run (0-31) for the number of heatwaves in the same
period with an ensemble average differing by at most $26\%$ from the observed
number of heatwaves. Other BC models perform worse: $41\%,31\%,33\%$ for mean-
shift (‘+’), mean and variance shift (‘X’), and EQM (‘$\star$’), respectively.

Figure 13: Number of periods of three consecutive days above 30∘C maximum
temperature in Abuja, Nigeria for the period $1989-2008$. IPSL climate model
(red triangles), observations (vertical orange line), Taylorformer temporal BC
(horizontal box-plots), mean-shift (‘+’), mean and variance shift (‘X’), and
EQM (‘$\star$’)

##  Appendix D Supplementary figures

Figure 14: When collapsing a time-series (top) to a histogram (bottom), the
temporal information is lost – a toy illustration

Figure 15: An example generated from a probability model in which
’observations’ (blue line) show consistently heatwave durations that are half
than those shown in ’climate model’ outputs (red line)