  We present a data-driven emulator, stochastic weather generator (SWG),
suitable for estimating probabilities of prolonged heatwaves in France and
Scandinavia. This emulator is based on the method of analogs of circulation to
which we add temperature and soil moisture as predictor fields. We train the
emulator on an intermediate complexity climate model run and show that it is
capable of predicting conditional probabilities (forecasting) of heatwaves out
of sample. Special attention is payed that this prediction is evaluated using
proper score appropriate for rare events. To accelerate the computation of
analogs dimensionality reduction techniques are applied and the performance is
evaluated. The probabilistic prediction achieved with SWG is compared with the
one achieved with
  Convolutional Neural Network (CNN). With the availability of hundreds of
years of training data CNNs perform better at the task of probabilistic
prediction. In addition, we show that the SWG emulator trained on 80 years of
data is capable of estimating extreme return times of order of thousands of
years for heatwaves longer than several days more precisely than the fit based
on generalised extreme value distribution. Finally, the quality of its
synthetic extreme teleconnection patterns obtained with stochastic weather
generator is studied. We showcase two examples of such synthetic teleconnection
patterns for heatwaves in France and Scandinavia that compare favorably to the
very long climate model control run.
