<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "https://jats.nlm.nih.gov/nlm-dtd/publishing/3.0/journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0" article-type="research-article">
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-17-7245-2024</article-id><title-group><article-title>RASCAL v1.0: an open-source tool for climatological  time series reconstruction and extension</article-title><alt-title>RASCAL v1.0</alt-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff2">
          <name><surname>González-Cervera</surname><given-names>Álvaro</given-names></name>
          <email>alvaro@intermet.es</email>
        <ext-link>https://orcid.org/0000-0002-3204-090X</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Durán</surname><given-names>Luis</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>interMET Sistemas SME, Madrid, Spain</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>D. Física de la Tierra y Astrofisica, Facultad de Física, Universidad Complutense de Madrid,  P. Ciencias s/n, 28040, Madrid, Spain</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Álvaro González-Cervera (alvaro@intermet.es)</corresp></author-notes><pub-date><day>9</day><month>October</month><year>2024</year></pub-date>
      
      <volume>17</volume>
      <issue>19</issue>
      <fpage>7245</fpage><lpage>7261</lpage>
      <history>
        <date date-type="received"><day>29</day><month>March</month><year>2024</year></date>
           <date date-type="rev-request"><day>14</day><month>May</month><year>2024</year></date>
           <date date-type="rev-recd"><day>24</day><month>July</month><year>2024</year></date>
           <date date-type="accepted"><day>18</day><month>August</month><year>2024</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2024 Álvaro González-Cervera</copyright-statement>
        <copyright-year>2024</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024.html">This article is available from https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d1e100">The reduction of in situ observations over the last few decades poses a potential risk of losing important information in regions where local effects dominate the climatology. Reanalyses face challenges in representing climatologies with highly localized effects, especially in regions with complex orography. Empirical downscaling methods offer a cost-effective and easier-to-implement alternative to dynamic downscaling methods and can partially overcome the aforementioned limitations of reanalyses by taking into account the local effects through statistical relationships. This article introduces RASCAL (Reconstruction by AnalogS of ClimatologicAL time series), an open-source Python tool designed to extend time series and fill gaps in observational climate data, especially in regions with limited long-term data and significant local effects, such as mountainous areas.</p>

      <p id="d1e103">Employing an object-oriented programming style, RASCAL's methodology effectively links large-scale circulation patterns with local atmospheric features using the analog method in combination with principal component analysis (PCA).</p>

      <p id="d1e106">The package contains routines for preprocessing observations and reanalysis data, generating reconstructions using various methods, and evaluating the reconstruction's performance in reproducing the time series of observations, statistical properties, and relevant climatic indices. Its high modularity and flexibility allow fast and reproducible downscaling. The evaluations carried out in central Spain, in mountainous and urbanized areas, demonstrate that RASCAL performs better than the ERA20C and ERA20CM reanalysis, as expected, in terms of <inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:msup><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, standard deviation, and bias. When analyzing reconstructions against observations, RASCAL generates series with statistical properties, such as seasonality and daily distributions, that closely resemble observations. This confirms the potential of this method for conducting robust climate research. The adaptability of RASCAL to diverse scientific objectives is also highlighted. However, as with any other method based on empirical training, this method requires the availability of sufficiently long-term data series. Furthermore, it is susceptible to disruption caused by changes in land use or urbanization processes that might compromise the homogeneity of the training data. Despite these limitations, RASCAL's positive outcomes offer opportunities for comprehensive climate variability analyses and potential applications in downscaling short-term forecasts, seasonal predictions, and climate change scenarios. The Python code and the Jupyter Notebook for the reconstruction validation are publicly available as an open project.</p>
  </abstract>
    
<funding-group>
<award-group id="gs1">
<funding-source>Ministerio de Ciencia e Innovación</funding-source>
<award-id>DIN2019-010482</award-id>
<award-id>PID2022-140690OA-I00</award-id>
</award-group>
</funding-group>
</article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e129">The origins of meteorological observation can be traced back to ancient civilizations, where people began to notice patterns in the weather and celestial phenomena. However, it was not until the 17th century that systematic weather observations began in earnest with the development of instruments such as the mercury barometer and the thermometer by scientists Evangelista Torricelli and Daniel Gabriel Fahrenheit <xref ref-type="bibr" rid="bib1.bibx3" id="paren.1"/>. An early example of this interest in observing the atmosphere using instruments is the Central England Temperature (CET) record <xref ref-type="bibr" rid="bib1.bibx39" id="paren.2"/>, which is one of the longest instrumental temperature records in the world, dating back to 1659. It provides a continuous monthly temperature series for the central England region and is often used as a proxy for temperature variations in western Europe. Other examples of early weather monitoring date back to the 18th century, such as the Paris–Montsouris observations in France <xref ref-type="bibr" rid="bib1.bibx40" id="paren.3"/>, the Zentralanstalt für Meteorologie und Geodynamik in Austria (Vienna) <xref ref-type="bibr" rid="bib1.bibx2" id="paren.4"/>, the Uppsala University observations in Sweden <xref ref-type="bibr" rid="bib1.bibx7" id="paren.5"/>, and the earliest observations recorded for the Iberian Peninsula like those starting in Seville (Spain) in 1780 <xref ref-type="bibr" rid="bib1.bibx16" id="paren.6"/>. Since these first observations began, the number of surface meteorological observatories worldwide has increased significantly, as shown in Fig. <xref ref-type="fig" rid="Ch1.F1"/>a.</p>
      <p id="d1e153">The critical role played by surface meteorological stations in climate monitoring and research is emphasized by the Intergovernmental Panel on Climate Change (IPCC) in all its assessments and reports <xref ref-type="bibr" rid="bib1.bibx33" id="paren.7"/>. One of the aspects addressed is the need to maintain high-quality and consistent data following high standards of quality assurance and control <xref ref-type="bibr" rid="bib1.bibx4" id="paren.8"/>. These kind of procedures are essential to ensure that the data collected are homogeneous, accurate, and reliable. Errors or inconsistencies in the data can lead to erroneous climate assessments and predictions <xref ref-type="bibr" rid="bib1.bibx52" id="paren.9"/>. Another important fact mentioned is the need for a dense network of surface meteorological stations around the globe to provide comprehensive coverage of different regions and climates. Dense monitoring networks are less common in remote or less densely populated regions or where the environmental conditions are too harsh to operate and maintain the instruments <xref ref-type="bibr" rid="bib1.bibx15 bib1.bibx23 bib1.bibx46" id="paren.10"/>.</p>
      <p id="d1e168">It has been commonly accepted that surface meteorological stations are still the best way to identify long-term trends and variability in climate. They have also proven to be critical for validating and calibrating other atmospheric databases such as those obtained from satellites or remote sensing instruments <xref ref-type="bibr" rid="bib1.bibx45 bib1.bibx22 bib1.bibx32" id="paren.11"/>. They are also a key element for the development and validation of gridded databases obtained by numerical models such as reanalyses <xref ref-type="bibr" rid="bib1.bibx41 bib1.bibx5 bib1.bibx36 bib1.bibx10" id="paren.12"/>. More recently, meteorological measurements have become an essential element of machine learning methods applied to atmospheric modeling.</p>

      <fig id="Ch1.F1" specific-use="star"><label>Figure 1</label><caption><p id="d1e180"><bold>(a)</bold> Total number of operative stations from 1850 to 2023. <bold>(b)</bold> Balance of decommissioned stations in the same period. The negative value means the stations are no longer operative, and the absolute value represents the number of decommissioned stations.  <bold>(c)</bold> Localization of all stations from 1850 to 2023, with operative stations in 2023 marked in blue and decommissioned stations as of 2023 marked in red. Data were obtained from the Global Historical Climatology Network daily (GHCNd, <uri>https://www.ncei.noaa.gov/products/land-based-station/global-historical-climatology-network-daily</uri>, last access: 15 November 2023).</p></caption>
        <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f01.png"/>

      </fig>

      <p id="d1e200">Due to the important role played by surface observations in climate assessing and weather forecasting,  several countries established and expanded their surface meteorological observatories during the 20th century, trying to cover as much territory as possible <xref ref-type="bibr" rid="bib1.bibx34" id="paren.13"/>, from several thousand surface stations at the end of the 19th century to several tens of thousands at the end of the 20th century (Fig. <xref ref-type="fig" rid="Ch1.F1"/>a). However, as mentioned before, the results are very uneven around the world (Fig. <xref ref-type="fig" rid="Ch1.F1"/>c), with important areas of the world still under-monitored.</p>
      <p id="d1e210">Contrary to what might be expected, the number of surface meteorological stations has not increased in recent decades at a rate that would fill the gaps in the documented under-monitored areas. Rather, the ratio of operational stations has slowed down and decreased since the 1970s (Fig. <xref ref-type="fig" rid="Ch1.F1"/>a). As can be seen, the number of decommissioned stations has increased in recent decades in many regions of the globe, disrupting some historical climate time series.</p>
      <p id="d1e215">One potential explanation for this decline in the number of surface stations is the advent of satellites as a novel method for observing the weather and climate. Following the launch of the world's first weather satellite, TIROS-1, in 1960, satellite weather observations became prevalent and began to offer a number of advantages over on-site weather observations, as cited in <xref ref-type="bibr" rid="bib1.bibx43" id="text.14"/>. For instance, they permit global coverage and cost-effectiveness since they do not necessitate an extensive network of ground-based weather stations to cover vast areas. However, satellite weather observations also have limitations. For example, they have difficulties accurately measuring conditions at the Earth's surface, their data availability is highly dependent on cloud cover, they often exhibit long-term instrument drift, and they have calibration issues in remote areas where surface observations are still unavailable.</p>
      <p id="d1e221">Another potential factor contributing to this decline is the increasing use of model reanalysis data to conduct climate research <xref ref-type="bibr" rid="bib1.bibx13 bib1.bibx27" id="paren.15"/>. Model reanalyses employ a combination of observational data sources, including in situ surface weather observations, satellite data, and others to generate a gridded and consistent dataset of weather and climate information from the past. The resulting datasets are comprehensive, are homogeneous, and have strong climatological consistency. They cover global areas, enabling analysis where in situ data are not accessible. In many cases, reanalyses are used instead of in situ measurements for climate studies. They are certainly useful for studying broad climate patterns and long-term climate trends, and they could theoretically be used to fill gaps or extend the temporal and spatial coverage of observations. However, they suffer significant losses with regards to temporal and spatial resolution, as well as information relating to local phenomena. Global reanalyses have inherent difficulties in providing fine-scale details that are often missed in the physics of the models or are meaningless at the low resolution considered.</p>
      <p id="d1e227">Although it may seem that global weather data are fully accessible through the more precise reanalyses available nowadays, there may be a hidden loss of information about local phenomena that only surface weather stations are able to capture. When historical meteorological data are not continued indefinitely or interrupted, many of the resources invested over decades are lost. In addition to these interrupted time series, there are also numerous surface meteorological observation series of good quality around the world as a result of short-term campaigns or very recent initiatives. These time series also provide a wealth of information on local processes, but their short duration is still insufficient for climatological analyses <xref ref-type="bibr" rid="bib1.bibx20" id="paren.16"/>.</p>
      <p id="d1e234">We have global reanalyses that span the entire 20th century and part of the 21st century, with low resolution and limited phenomena. However, these datasets are sufficient to consider the main drivers that force weather and climate at the surface. In contrast, we have sets of interrupted or recent surface measurements that capture local phenomena, but these are too short to conduct climatological analyses. It thus appears feasible to downscale reanalysis data in order to obtain pseudo-observations that can provide the best of both worlds.</p>
      <p id="d1e237">Downscaling has been performed since the inception of reanalysis. Two general approaches to downscaling are dynamical downscaling (DD) and empirical statistical downscaling (ESD). ESD relies on observational data to establish empirical relationships between the large-scale fields provided by the reanalysis and the local phenomena seen in the observations <xref ref-type="bibr" rid="bib1.bibx50 bib1.bibx11 bib1.bibx9" id="paren.17"/>. These are grouped into model output statistics, perfect prognosis, and weather generators (in which analog models are used). On the other hand, DD is achieved by using higher-resolution physical models that account for lower-scale phenomena nested within the reanalysis fields <xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx17 bib1.bibx48" id="paren.18"/>.</p>
      <p id="d1e246">Numerous papers scrutinize the advantages and disadvantages of the various methods <xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx26 bib1.bibx14" id="paren.19"/>. As a rule of thumb, empirical techniques are generally less computationally intensive than physical downscaling and may yield better results at a lower cost. However, empirical downscaling is only feasible when a sufficiently long and uniformly collected dataset of observations is available. Assuming the hypothesis that there is a connection between the large-scale phenomena shown by the reanalysis and the local phenomena captured by the observations is also essential.</p>
      <p id="d1e252">Regardless of the chosen downscaling method, combining reanalysis and surface observations to create long and homogeneous time series requires a significant amount of effort. Setting up a dynamic regionalization system can be expensive in terms of both computation and human resources, but even a relatively simple statistically based regionalization method entails a learning curve that may discourage or slow down certain climate studies.</p>
      <p id="d1e255">This work introduces and explains RASCAL v1.0 (Reconstruction by AnalogS of ClimatologicAL time series), an open-source tool for climatological time series reconstruction and extension using ESD. The primary goal of RASCAL is to promote and accelerate rigorous climate research in regions where surface meteorological observations are insufficient for climate analysis and where relevant regional and local meteorological processes can only be captured through in situ observations. RASCAL could prove highly beneficial for mountain climate research and other areas with unique microclimates, such as river valleys, forests, caves, or canyons.</p>
      <p id="d1e258">This study is organized as follows: Sect. 2 provides a detailed description of the implemented method, while Sect. 3 describes the model structure and implementation. In Sect. 4, we evaluate the performance of the package by downscaling the daily maximum and minimum temperatures and precipitation of four stations near a mountainous region in central Spain. We draw final conclusions and important remarks in Sect. 5.</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Methods</title>
      <p id="d1e269">RASCAL is based on  an ESD type known as an analog model or weather generator. This is a widely used technique in climate research <xref ref-type="bibr" rid="bib1.bibx53" id="paren.20"/>. It is based on the premise that large-scale atmospheric conditions tend to produce comparable local weather patterns, allowing the prediction of local conditions for a day without real-time observations. This is done by identifying an analog day from general circulation models (GCMs), such as reanalyses, and assigning its local conditions. This approach allows the study of climate variability over an extended time frame, providing valuable perspectives on long-term patterns and connections between different geographic locations, while also incorporating important local factors in the analysis <xref ref-type="bibr" rid="bib1.bibx29 bib1.bibx6 bib1.bibx1 bib1.bibx44 bib1.bibx47" id="paren.21"/>.</p>
      <p id="d1e278">The analog method is a nonlinear technique that relies on the identification of strong statistical relationships between two fields: the predictor variable extracted from GCM products and the predictand variable obtained from local historical observations. To predict an atmospheric feature (the predictand) for a given day, this method searches for the day with the most similar predictor field in the historical record and uses its atmospheric features to make a prediction, allowing the reconstruction of missing data points <xref ref-type="bibr" rid="bib1.bibx38 bib1.bibx30" id="paren.22"/>.</p>
      <p id="d1e284">To incorporate the relationship between large-scale meteorological patterns and local weather, the analog method is often combined with principal component analysis (PCA). PCA reduces the high dimensionality of the atmospheric phase space by generating an orthogonal basis of vectors that represent the main directions of variability. As a result, only a limited set of <inline-formula><mml:math id="M2" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> coefficients, called principal components (PCs), are required to represent the atmospheric state <xref ref-type="bibr" rid="bib1.bibx50" id="paren.23"/>. The resulting set of <inline-formula><mml:math id="M3" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> coefficients of the PCs at time <inline-formula><mml:math id="M4" display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula> are considered the predictor <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for the local predictand <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. For a given day <inline-formula><mml:math id="M7" display="inline"><mml:mi>t</mml:mi></mml:math></inline-formula>, the objective is to identify <inline-formula><mml:math id="M8" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> historical days <inline-formula><mml:math id="M9" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>N</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> such that the predictor <inline-formula><mml:math id="M10" display="inline"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is similar to the predictors <inline-formula><mml:math id="M11" display="inline"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The similarity between the predictors in the historical record <inline-formula><mml:math id="M12" display="inline"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and the predictor of the day to reconstruct <inline-formula><mml:math id="M13" display="inline"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is measured with the Euclidean distance.</p>
      <p id="d1e502"><disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M14" display="block"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>X</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo>‖</mml:mo><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="bold">X</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>‖</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e556">The <inline-formula><mml:math id="M15" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> days with the smallest distance <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>X</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> constitute an analog pool. Various similarity methods can be used to select the best analog <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi>Y</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> or group of analogs from the pool. The most straightforward method is to choose the day <inline-formula><mml:math id="M18" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> that has the smallest distance <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>X</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and that is the closest day in the PC space. However, similar synoptic patterns can sometimes produce different local weather if the role of other variables or more complex phenomena is not taken into account. Therefore, assigning the day with the most similar predictor field pattern as the analog day may not always be accurate. To avoid making the reconstruction method too complex, one solution is to select the <inline-formula><mml:math id="M20" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> closest days from the pool of analogs instead of just one. Then, perform a weighted average of the predictand <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> by the square of the distance in space of the PCs of those days:
          <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M22" display="block"><mml:mrow><mml:mover accent="true"><mml:mi>Y</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>N</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:msub><mml:mi>w</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where the weight <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is
          <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M24" display="block"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>X</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:msubsup><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>X</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e815">This way, the days with a more similar synoptic pattern have more presence in the average, while also considering possible phenomena that have not occurred on the closest day but on the other similar days.</p>
      <p id="d1e818">Averaging can impact the distribution of the variable by smoothing the data and removing extreme values. To preserve extremes while still accounting for possible phenomena beyond the similarity of synoptic patterns, bias reduction methods such as quantile mapping can be used. This technique employs a “mapping variable” <inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and examines the quantile of the day to reconstruct <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:mi>Q</mml:mi><mml:mo>(</mml:mo><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> in the distribution of this variable in the analog pool <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The method first examines the distribution of the predictand variable in the analog pool <inline-formula><mml:math id="M28" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and selects the day <inline-formula><mml:math id="M29" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> that occupies the same quantile as the best analog.</p>
      <p id="d1e974"><disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M30" display="block"><mml:mrow><mml:mover accent="true"><mml:mi>Y</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mtext>when</mml:mtext><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi>Q</mml:mi><mml:mo>(</mml:mo><mml:mi>Y</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi>Q</mml:mi><mml:mo>(</mml:mo><mml:mi>Z</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e1046">This approach improves the representation of extreme events. However, it is crucial to note that the mapping variable must have a strong correlation with the predictand variable. One possible solution is to use the reanalysis predictand variable as the mapping variable.</p>
      <p id="d1e1049">The analog method fundamentally involves the reorganization of observed time series data, aiming to maintain the statistical characteristics of the original dataset. The efficacy of this method relies on ensuring that the downscaling and training periods exhibit a comparable climatic context <xref ref-type="bibr" rid="bib1.bibx54" id="paren.24"/>. The reconstruction capability of the analog method is constrained by the temporal extent and accuracy of historical observations. This means that it cannot replicate unobserved events and, therefore, cannot reproduce new record values in the context of climate change. However, its utility becomes pronounced in scenarios where external climate forcing induces shifts in the frequency of observed phenomena. In essence, it serves as a valuable tool for discerning alterations in the occurrence patterns of documented events.</p>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Model structure</title>
      <p id="d1e1063">Empirical downscaling techniques involve laborious steps that must be carefully addressed to ensure the quality of the local climate series reconstructions, as pointed out in <xref ref-type="bibr" rid="bib1.bibx8" id="text.25"/>. RASCAL is a Python library that implements the analog method in a clear and simple way. It is an object-oriented library with four main blocks or classes: <italic>Station</italic>, <italic>Predictor</italic>, <italic>Analogs</italic>, and <italic>RSkill</italic>. This library is a valuable complement to other empirical downscaling libraries, such as pyESD from <xref ref-type="bibr" rid="bib1.bibx8" id="text.26"/>, which is based on machine learning downscaling methods that focus on generating monthly time series. RASCAL is based on classical statistical methods, which produce results that are easier to interpret physically, and additionally, it is more focused on daily-resolution reconstructions rather than monthly, which allows for the calculation of relevant daily climate indices. This section describes these components and their implementation workflow, as illustrated in Fig. <xref ref-type="fig" rid="Ch1.F2"/>.</p>
<sec id="Ch1.S3.SS1">
  <label>3.1</label><title><italic>Station</italic> class</title>
      <p id="d1e1097">The analog method requires (1) homogeneous time series of observational data and (2) a reanalysis dataset or GCM product that covers both the period to be reconstructed and the period of historical observations. The <italic>Station</italic> class retains the information about the historical record, including metadata about the observation point such as its name, elevation, latitude, and longitude, as well as the observational data of the variable to be predicted. The historical record must have a daily to sub-daily resolution, and it is assumed to be homogeneous. The data are preprocessed to extract the desired meteorological variable, such as maximum, minimum, mean, or total accumulated, in the form of selected daily quantities.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title><italic>Predictor</italic> class</title>
      <p id="d1e1114">The analog method has the benefit of low subjectivity due to its limited parameters for adjustment <xref ref-type="bibr" rid="bib1.bibx49" id="paren.27"/>. However, selecting and processing the predictor correctly constitute a crucial step for achieving accurate local weather reproduction. The selection should be based on our knowledge of atmospheric dynamics and the local climate of the study area, as pointed out by other authors <xref ref-type="bibr" rid="bib1.bibx8" id="paren.28"/>. After selecting a predictor variable that is expected to have a strong relationship to the predictand variable, for instance its main large-scale forcing field, and that is relevant to the proposed scientific question, it is necessary to choose a predictor field domain that can identify relevant synoptic patterns for the study area. These fields should be carefully grouped for each day. Although the analog method is based on recognizing patterns in a single predictor field, it is possible to use multiple variables within the same field. To use vector fields with multiple components or to include different variables, it is necessary to construct a composite field by concatenating each variable on the longitude axis. This results in a single field with dimensions of time, latitude, and number of components <inline-formula><mml:math id="M31" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> longitude.</p>
      <p id="d1e1130">These steps are implemented in the class <italic>Predictor</italic>. It takes as input the paths to the files of the chosen predictor and allows  selecting the limits of the field domain and  grouping them for each day, taking only 1 h, or computing the sum or the average of all the available hours. The composite field is obtained when the mosaic option is set to <italic>True</italic> and more than one different variable is detected within the files of the input paths.</p>
      <p id="d1e1139">Once the predictor field is chosen, the PCA is performed. The PCA is implemented as the method Predictor.pcs(). To perform the PCA it is necessary to calculate the anomalies of the predictor field. In this method it is possible to choose the months of each season and the number of seasons, the number of principal components to be used, and the scaling of the PCs. This scaling will subsequently influence the selection of a pool of the <inline-formula><mml:math id="M32" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> closest days. This method wraps the Python library EOFs <xref ref-type="bibr" rid="bib1.bibx12" id="paren.29"/> using xarray <xref ref-type="bibr" rid="bib1.bibx31" id="paren.30"/>, so it has its scaling options, which are (0) un-scaled principal components, (1) principal components scaled to unit variance (divided by the square root of their eigenvalue), and (2) principal components multiplied by the square root of their eigenvalue.</p>

      <fig id="Ch1.F2" specific-use="star"><label>Figure 2</label><caption><p id="d1e1158">RASCAL main features and workflow. The colored boxes highlight the principal classes, and within them, the featured methods and objects are shown. An example of the EOFs obtained for the total column  water vapor flux (TCWVF), used as a precipitation predictor, is included in the <italic>Predictor</italic> class box.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f02.png"/>

        </fig>

</sec>
<sec id="Ch1.S3.SS3">
  <label>3.3</label><title><italic>Analogs</italic> class</title>
      <p id="d1e1181">After establishing the predictor and determining its synoptic patterns via PCA, the next step is to search for a set of days with similar synoptic patterns for each day, known as the analog pool. After determining the analog pool, the days without observations are reconstructed using one of the following similarity methods: (1) the “closest” method, which selects the closest day in the space of the PCs; (2) the “average” method, which  calculates the weighted average of the <inline-formula><mml:math id="M33" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> closest days; or (3) the “quantile map” method, which chooses the day that corresponds to the same quantile as the day to be reconstructed in another variable called the mapping variable. These steps are implemented in the <italic>Analogs</italic> class. This object is fed by the historical observations from the <italic>Station</italic> object and the PC time series of the <italic>Predictor</italic> object. This object allows the user to select the number of analog days in the pool as <italic>pool_size</italic>; the number of days to exclude from the pool when testing the reconstruction performance; and whether to exclude the previous, posterior, or both days as <italic>vw_size</italic> and <italic>vw_type</italic> arguments. Additionally, it allows the selection of the similarity method. To use the quantile mapping method a mapping variable is required. This variable must be a time series from the reanalysis dataset in the grid point of the station. The <italic>Predictor</italic> class can be used to obtain this information by setting the domain limits to the station's localization, which is saved in the <italic>Station</italic> object.</p>
</sec>
<sec id="Ch1.S3.SS4">
  <label>3.4</label><title><italic>RSkill</italic> class</title>
      <p id="d1e1228">To assess the quality of a reconstructed time series, it is necessary to clearly state its goal beforehand. RASCAL is designed to produce daily reconstructions to calculate relevant indices, such as days above the <inline-formula><mml:math id="M34" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> °C  isotherm or the length of dry spells. However, it is not necessary for the daily reconstructions to be completely in phase with the daily observations when the objective is to evaluate these quantities at coarser temporal resolutions, such as monthly, seasonal, or annual. It is sufficient that their behavior and statistical properties are well-reproduced at these coarser temporal resolutions. To evaluate the skill of the reconstructions, RASCAL is equipped with a skill evaluation class called <italic>RSkill</italic>. This class contains functions to evaluate the behavior of the reconstructions and assess their added value compared to using the reanalysis data alone. The skill metrics and diagrams included are the following: Taylor diagrams, quantile–quantile diagrams, time series and annual cycle plots, root mean squared error (RMSE), correlation coefficient (<inline-formula><mml:math id="M35" display="inline"><mml:mrow><mml:msup><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>), mean bias error (MBE), MSE-based skill score (where MSE is the mean squared error), Heidke skill score (HSS), and Brier score (BS).</p>
      <p id="d1e1252">The MSE-based skill score <xref ref-type="bibr" rid="bib1.bibx50" id="paren.31"/> is given by
            <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M36" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="normal">SS</mml:mi><mml:mi mathvariant="normal">MSE</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="normal">MSE</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">MSE</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where MSE is the MSE of the reconstruction and MSE<inline-formula><mml:math id="M37" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:math></inline-formula> the MSE of the reference model, in this case the reanalysis. Therefore, the SS<inline-formula><mml:math id="M38" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">MSE</mml:mi></mml:msub></mml:math></inline-formula> can be interpreted as the relative error reduction of the reconstruction compared to the reanalysis series.</p>
      <p id="d1e1305">The Heidke skill score (HSS) is implemented in order to assess the performance of the analog method in predicting days where the predictand is above or below a certain threshold compared to the reanalysis, based on a contingency table analysis. The HSS scores events based on their occurrence or absence and determines whether the performance of the tested model is superior to that of the reference model. The HSS is defined as
            <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M39" display="block"><mml:mrow><mml:mi mathvariant="normal">HSS</mml:mi><mml:mo>(</mml:mo><mml:mi>r</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>r</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M40" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula> is the proportion of correct forecast (true positive and true negative) of the reconstructed series and <inline-formula><mml:math id="M41" display="inline"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the proportion of correct forecast of the reanalysis. The proportion of correct forecast is expressed as
            <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M42" display="block"><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>d</mml:mi></mml:mrow><mml:mrow><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:mi>b</mml:mi><mml:mo>+</mml:mo><mml:mi>c</mml:mi><mml:mo>+</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M43" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> is the number of times that an event is forecasted and observed (true positive), <inline-formula><mml:math id="M44" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> the number of times that is forecasted but not observed (false positive), <inline-formula><mml:math id="M45" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula> the number of times that is observed but not forecasted (false negative), and <inline-formula><mml:math id="M46" display="inline"><mml:mi>d</mml:mi></mml:math></inline-formula> the number of times that is neither forecasted nor observed (true negative).</p>
      <p id="d1e1432">This score condenses the information on whether the tested model performs better that the reference model with a number in the interval <inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>. A model that perfectly reproduces the observations gets a score of 1; if it performs as well as the reference model it gets a score of zero, and if the model performs worse than the reference model it gets negative scores.</p>
</sec>
<sec id="Ch1.S3.SS5">
  <label>3.5</label><title>RASCAL implementation</title>
      <p id="d1e1461">Although RASCAL is designed as a Python library, the GitHub repository contains scripts that allow performing reconstructions and skill evaluations without the need to write a script. The <italic>multiple_runs_example.py</italic> script demonstrates a workflow that reconstructs several stations and variables using different values for the parameters including analog pool size, number of days in the weighted average, and similarity method. There is also a Jupyter Notebook available, named <italic>RASCAL_evaluation.ipynb</italic>, which evaluates the skill of the reconstructions for daily, monthly, and annual series.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Application examples</title>
      <p id="d1e1479">To test RASCAL performance, we tested the skill of the reconstructions of maximum and minimum temperature and daily precipitation at four different surface stations in the vicinity of the Central System of the Iberian Peninsula (Spain), as shown in Fig. <xref ref-type="fig" rid="Ch1.F3"/>. This mountain range is of vital importance as it is the main contributor to the hydrological resources of central Spain due to the high levels of rainfall and snow runoff in spring. This area has been the subject of several studies by  authors in recent years <xref ref-type="bibr" rid="bib1.bibx18 bib1.bibx19 bib1.bibx17 bib1.bibx25" id="paren.32"/>. The reader can refer to these previous works in order to understand the importance of having long time series in this area.</p>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Observational data</title>
      <p id="d1e1494">The surface stations used are summarized in Table <xref ref-type="table" rid="Ch1.T1"/>. All of the stations belong to the Spanish Meteorological Agency (AEMET; <uri>http://www.aemet.es</uri>, last access: 13 September 2023), which has conducted high-quality observations of temperature and precipitation since 1893 and 1948, respectively, for the case of Retiro station located in Madrid. The Navacerrada station is the highest one, situated at 1888 m a.s.l. in the core of Sierra de Guadarrama, an area that has been kept almost unaltered since its installation in 1946. Stations Segovia and Colmenar are located on the northern and southern slopes, respectively, of this mountain massif (Fig. <xref ref-type="fig" rid="Ch1.F3"/>). This set of surface meteorological stations was selected based on their long historical records, on the variety of their orography and environments, and on the deep knowledge of this area due to previous research carried out by the authors of this work. Furthermore, they spread across a wide range of altitudes. Of the four datasets, two are particularly long: Retiro and Navacerrada.</p>
      <p id="d1e1504">Observations have been available at Navacerrada station since 1946. The whole region has remained practically unchanged since then, making it a valuable resource. In contrast, the Retiro station is located in the heart of the city of Madrid, which has undergone significant growth, particularly since the 1960s.</p>
      <p id="d1e1507">This set of observations can serve as a suitable test bed for evaluating the strengths and weaknesses of RASCAL and its working hypotheses.</p>

      <fig id="Ch1.F3" specific-use="star"><label>Figure 3</label><caption><p id="d1e1513"><bold>(a)</bold> Location of the Iberian Central System. <bold>(b)</bold> Locations of sites used in this example of application, these being S (Segovia), N (Navacerrada), C (Colmenar), and R (Retiro).</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f03.png"/>

        </fig>

<table-wrap id="Ch1.T1" specific-use="star"><label>Table 1</label><caption><p id="d1e1530">Observational data used.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="6">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:colspec colnum="5" colname="col5" align="left"/>
     <oasis:colspec colnum="6" colname="col6" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Station</oasis:entry>
         <oasis:entry colname="col2">Altitude</oasis:entry>
         <oasis:entry colname="col3">Coordinates</oasis:entry>
         <oasis:entry colname="col4">Variables</oasis:entry>
         <oasis:entry colname="col5">Period</oasis:entry>
         <oasis:entry colname="col6">Frequency</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">Segovia</oasis:entry>
         <oasis:entry colname="col2">1000 m a.s.l.</oasis:entry>
         <oasis:entry colname="col3">40°56<inline-formula><mml:math id="M48" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>48.012<inline-formula><mml:math id="M49" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> N, 6°6<inline-formula><mml:math id="M50" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>56.998<inline-formula><mml:math id="M51" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> W</oasis:entry>
         <oasis:entry colname="col4">Temperature</oasis:entry>
         <oasis:entry colname="col5">1988–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3"/>
         <oasis:entry colname="col4">Precipitation</oasis:entry>
         <oasis:entry colname="col5">1948–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Navacerrada</oasis:entry>
         <oasis:entry colname="col2">1888 m a.s.l.</oasis:entry>
         <oasis:entry colname="col3">40°47<inline-formula><mml:math id="M52" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>35.000<inline-formula><mml:math id="M53" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> N, 4°00<inline-formula><mml:math id="M54" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>38.000<inline-formula><mml:math id="M55" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> W</oasis:entry>
         <oasis:entry colname="col4">Temperature</oasis:entry>
         <oasis:entry colname="col5">1946–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3"/>
         <oasis:entry colname="col4">Precipitation</oasis:entry>
         <oasis:entry colname="col5">1946–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Colmenar</oasis:entry>
         <oasis:entry colname="col2">1004 m a.s.l.</oasis:entry>
         <oasis:entry colname="col3">40°41<inline-formula><mml:math id="M56" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>46.000<inline-formula><mml:math id="M57" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> N, 3°45<inline-formula><mml:math id="M58" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>54.000<inline-formula><mml:math id="M59" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> W</oasis:entry>
         <oasis:entry colname="col4">Temperature</oasis:entry>
         <oasis:entry colname="col5">1978–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3"/>
         <oasis:entry colname="col4">Precipitation</oasis:entry>
         <oasis:entry colname="col5">1978–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Retiro</oasis:entry>
         <oasis:entry colname="col2">660 m a.s.l.</oasis:entry>
         <oasis:entry colname="col3">40°24<inline-formula><mml:math id="M60" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>43.000<inline-formula><mml:math id="M61" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> N, 3°40<inline-formula><mml:math id="M62" display="inline"><mml:msup><mml:mi/><mml:mo>′</mml:mo></mml:msup></mml:math></inline-formula>41.001<inline-formula><mml:math id="M63" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>′</mml:mo><mml:mo>′</mml:mo></mml:mrow></mml:msup></mml:math></inline-formula> W</oasis:entry>
         <oasis:entry colname="col4">Temperature</oasis:entry>
         <oasis:entry colname="col5">1893–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3"/>
         <oasis:entry colname="col4">Precipitation</oasis:entry>
         <oasis:entry colname="col5">1948–2023</oasis:entry>
         <oasis:entry colname="col6">Daily</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Reanalysis data</title>
      <p id="d1e1920">The reconstruction of the time series was performed using ECMWF reanalysis data. Specifically, ERA20C data for the temperature and ERA20CM ensemble data for the precipitation <xref ref-type="bibr" rid="bib1.bibx42" id="paren.33"/> were used for the period from 1900 to 2010, with a spatial resolution of 0.75° <inline-formula><mml:math id="M64" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 0.75° and a temporal resolution of 3 h.</p>
      <p id="d1e1933">Principal component analysis was conducted for each season (DJF, MAM, JJA, and SON) individually using geopotential height (GpH) data at 925 hPa as a temperature predictor and TCWVF as the precipitation predictor. The quantile map method used the 2 m temperature and TCWVF to search for analogs in the dataset as the mapping variables. The selection of these predictors was based on their previous use in identifying circulation weather types for precipitation and extreme snow events in the study region, as reported by <xref ref-type="bibr" rid="bib1.bibx19" id="text.34"/> and <xref ref-type="bibr" rid="bib1.bibx25" id="text.35"/>.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <label>4.3</label><title>Model evaluation</title>
      <p id="d1e1950">The reconstructions were performed for all stations using all three similarity methods and varying values of pool size and number of days to average in the average method to account for the possible sensitivity of the results to these parameters. To evaluate the quality of a reconstruction, it is necessary to determine the similarity of the time series to the observations. However, in climate studies it may be more relevant to consider the statistical characteristics of the series. Therefore, it may be more effective to evaluate the ability to reproduce daily distributions, seasonality, seasonal and interannual variability, and relevant indices, such as the number of days below <inline-formula><mml:math id="M65" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> °C or days of precipitation above a certain threshold. RASCAL evaluates the effectiveness of reconstructions for use in climate studies. It assesses the behavior of time series for maximum and minimum temperature, as well as precipitation, and their statistical properties. Additionally, it compares the performance of using the analog method versus using reanalysis data to reproduce observations. To compare its performance against the reanalysis, the temperature data from the reanalysis were corrected with the elevation using the environmental lapse rate (<inline-formula><mml:math id="M66" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">6.5</mml:mn></mml:mrow></mml:math></inline-formula> °C km<inline-formula><mml:math id="M67" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>).</p>
      <p id="d1e1982">RASCAL includes options to cross-validate when generating the reconstructions. To test the performance of the model in reconstructing gaps in the series and extending  to periods distant from the observation period, validation windows are created. These moving windows of <inline-formula><mml:math id="M68" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> days are taken around each day to be reconstructed, as these are the days that are likely to have the most similar large-scale pattern to the target day and therefore contain the most possible analogs. Excluding these days removes both the large-scale patterns and their associated local meteorological times from the pool of analogs, allowing a better evaluation of the performance of the model and each reconstruction method. For this application case, we excluded 60 d, the 30 d before and after each target day.</p>
<sec id="Ch1.S4.SS3.SSS1">
  <label>4.3.1</label><title>Time series skill</title>
      <p id="d1e2000">Taylor diagrams were implemented in RASCAL to assess the agreement between the reconstructed time series and the observed data. As illustrated in Figs. <xref ref-type="fig" rid="Ch1.F4"/>, <xref ref-type="fig" rid="Ch1.F5"/>, and <xref ref-type="fig" rid="Ch1.F6"/>, these diagrams provide a visual representation of the analysis, displaying the standard deviation and correlation of each time series in comparison to the reference observations.</p>
      <p id="d1e2009">As depicted in Fig. <xref ref-type="fig" rid="Ch1.F4"/> the precipitation reconstructions outperform the reanalysis precipitation in all the cases for both  total monthly and total yearly precipitation. Monthly reconstructions yield better results than the yearly series, with correlation coefficients ranging from 0.4 to 0.8, whereas the yearly series ranges from 0.2 to 0.7. However, for both cases, the reanalysis only shows correlations of 0.4 at best and negative correlations at worst (not visible in the diagram). Panels (c), (f), (i), and (l) display the yearly time series in water years (from October to September), comparing the observations with the reanalysis ensemble and the best reconstruction. The chosen reconstruction has a good correlation coefficient and a standard deviation close to the observations. These panels demonstrate that the correlation and standard deviation are better than the reanalysis and that biases are corrected. An example that illustrates this point is Navacerrada (Fig. <xref ref-type="fig" rid="Ch1.F4"/>i), where the reanalysis dry bias may be attributable to a smoothed reanalysis orography that hampers orographic precipitation, an important contributor to total precipitation in this region <xref ref-type="bibr" rid="bib1.bibx20" id="paren.36"/>.</p>
      <p id="d1e2019">As evidenced in the difference in the location of points of the same color in the Taylor diagrams, the reconstructions are somewhat sensitive to the pool size selection, as one method with different pool sizes can produce series with different correlations than the observations and standard deviations. However, this sensitivity is not significant enough to be considered a critical determinant in the simulations. Therefore, adjusting this parameter can be useful for subtle modifications.</p>
      <p id="d1e2022">Additionally, the Taylor diagrams demonstrate how different scientific questions may require different similarity methods. While “average10” shows the strongest correlations, “quantilemap100” exhibits standard deviations closest to the original series, resulting in more similar distributions. Therefore, the choice of reconstruction methods may depend on the specific goals that led to the reconstruction process.</p>

      <fig id="Ch1.F4" specific-use="star"><label>Figure 4</label><caption><p id="d1e2028">Precipitation time series reconstruction skill for all the stations. The left panels <bold>(a, d, g, j)</bold> show the Taylor diagrams of the monthly total precipitation series. The central panels <bold>(b, e, h, k)</bold> show the Taylor diagrams of yearly total precipitation series. The right panels <bold>(c, f, i, l)</bold> show the time series of observations, reanalysis, and the selected  best-performing reconstruction. In the precipitation case the yearly series are based on water years beginning in October and ending in September.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f04.png"/>

          </fig>

      <p id="d1e2046">Figure <xref ref-type="fig" rid="Ch1.F5"/> illustrates that the reconstructions of maximum temperatures yield better results than those of precipitation, with correlation coefficients above 0.93 for the monthly mean maximum temperature series and between 0.3 and 0.9 for the yearly mean maximum temperature series. The reanalysis exhibits a very similar behavior to the quantile map reconstructions for this variable, but the latter consistently shows a slight improvement in correlation or standard deviation. The time series  in Fig. <xref ref-type="fig" rid="Ch1.F5"/>c, f, i, and l show that although the behavior of the reanalysis is very close to the observations, the reconstructions correct the bias for all the stations, even when the reanalysis was corrected with the elevation.</p>
      <p id="d1e2053">Maximum temperature reconstructions exhibit less agreement between different similarity methods but demonstrate more consistent outcomes for different pool sizes when compared to the precipitation reconstructions. In this case, the quantile map method is recommended for reconstruction over the closest and average methods.</p>

      <fig id="Ch1.F5" specific-use="star"><label>Figure 5</label><caption><p id="d1e2058">Maximum temperature time series reconstruction skill for all the stations. The left panels <bold>(a, d, g, j)</bold> show the Taylor diagrams of the maximum temperature monthly mean series. The central panels <bold>(b, e, h, k)</bold> show the Taylor diagrams of yearly mean series. The right panels <bold>(c, f, i, l)</bold> show the time series of observations, reanalysis, and the selected best-performing reconstruction.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f05.png"/>

          </fig>

      <p id="d1e2076">In Fig. <xref ref-type="fig" rid="Ch1.F6"/>a, d, g, and j, the monthly mean minimum temperatures exhibit a similar behavior to the maximum mean temperatures in Fig. <xref ref-type="fig" rid="Ch1.F5"/>a, d, g, and j, with correlation coefficients above 0.9 and a slight improvement in the correlation and standard deviation compared to the reanalysis. The yearly mean series (Fig. <xref ref-type="fig" rid="Ch1.F5"/>b, e, h, k) also show moderate improvements compared to the reanalysis, with correlations ranging from 0.3 to 0.9. The quantile map method was found to be the most effective for reconstruction. The bias corrections are apparent in Fig. <xref ref-type="fig" rid="Ch1.F6"/>c, f, i, and l.</p>
      <p id="d1e2088">It should be noted that the reconstruction of Retiro in Fig. <xref ref-type="fig" rid="Ch1.F6"/>l shows a peculiar behavior, overestimating the mean minimum temperatures before 1945, followed by an underestimation of the temperatures thereafter. This effect does not appear in the maximum temperature reconstructions in Fig. <xref ref-type="fig" rid="Ch1.F5"/>l; a possible hypothesis is that this is due to the progressive urbanization of Madrid, where Retiro is located in the city core. This urbanization leads to a change in the land use and to an increase in the heat island effect, which mainly affects the increase in minimum temperatures <xref ref-type="bibr" rid="bib1.bibx51" id="paren.37"/>. This induces a change in the relationship between the local scale and the synoptic scale and therefore in the relationship between the predictor and the predictand, ultimately affecting the temperature trends.</p>

      <fig id="Ch1.F6" specific-use="star"><label>Figure 6</label><caption><p id="d1e2100">Minimum temperature time series reconstruction skill for all the stations. The left panels <bold>(a, d, g, j)</bold> show the Taylor diagrams of the maximum temperature monthly series. The central panels <bold>(b, e, h, k)</bold> show the Taylor diagrams of yearly series. The right panels <bold>(c, f, i, l)</bold> show the time series of observations, reanalysis, and the selected  best-performing reconstruction.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f06.png"/>

          </fig>

</sec>
<sec id="Ch1.S4.SS3.SSS2">
  <label>4.3.2</label><title>Distributions</title>
      <p id="d1e2126">To evaluate the statistical properties of a reconstruction, we first examined the  distributions of the daily time series in comparison to the observations. Figure <xref ref-type="fig" rid="Ch1.F7"/> displays the quantile–quantile plots of the daily time series for maximum and minimum temperature, as well as precipitation. These plots illustrate the values assigned to the same percentiles for the distributions of the reconstructed and observed time series. When the distributions are identical, the points align along a 45° line. The distribution of the observations is well-represented by the closest and quantile map methods, as shown in the first row of Fig. <xref ref-type="fig" rid="Ch1.F7"/>. However, the average method affects the extreme values as expected, narrowing the distribution further as the pool size increases. The poor performance of the reanalysis in representing precipitation distributions is also evident, as it exhibits a skew towards lower values. All methods show a high alignment with the observed data regarding maximum and minimum temperatures, with a slight narrowing in the distribution for the average methods. The impact of bias correction compared to the reanalysis is prominently noticeable in these variables as well.</p>

      <fig id="Ch1.F7" specific-use="star"><label>Figure 7</label><caption><p id="d1e2135">Quantile–quantile plot of the daily time series for all the stations (from left to right) including all the reconstructions and the reanalysis. The first-row panels <bold>(a, b, c, d)</bold> are for the precipitation, the second row <bold>(e, f, g, h)</bold> for the maximum temperature, and the third row <bold>(i, j, k, l)</bold> for the minimum temperature.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f07.png"/>

          </fig>

</sec>
<sec id="Ch1.S4.SS3.SSS3">
  <label>4.3.3</label><title>Seasonality</title>
      <p id="d1e2162">Understanding the seasonality of meteorological variables is crucial for climate studies as it enables the identification of recurring patterns and trends throughout the year. As shown in Fig. <xref ref-type="fig" rid="Ch1.F8"/>, the seasonal cycles of total monthly precipitation and monthly standard deviation reveal that the reconstructions generally reflect the observations more accurately than the reanalysis. Notably, the quantile map method shows better performance from January to June, while the closest and average methods work better from July to December. These differences between methods are more pronounced in MAM and SON, which are the months of highest variability (Fig. <xref ref-type="fig" rid="Ch1.F8"/>e, f, g, h). The standard deviation is well-captured by the quantile map method, with exceptions noted in February and November. Navacerrada once again emerges as the station that benefited the most from the reconstructions. It exhibits the most similar precipitation cycles and standard deviation, outperforming the reanalysis.</p>
      <p id="d1e2169">Figures <xref ref-type="fig" rid="Ch1.F9"/> and <xref ref-type="fig" rid="Ch1.F10"/> illustrate the annual cycles for maximum and minimum temperatures, respectively. The quantile map method outperforms the closest and average methods, as evidenced by the standard deviation, and is therefore recommended.  These results demonstrate that RASCAL is more effective than the reference reanalysis in representing seasonality.</p>

      <fig id="Ch1.F8" specific-use="star"><label>Figure 8</label><caption><p id="d1e2178">Annual cycle of monthly total precipitation for all the stations (left to right). The first-row panels <bold>(a, b, c, d, e)</bold> show the cycle for the variable, and the second row <bold>(f, g, h, i, j)</bold> is for its standard deviation.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f08.png"/>

          </fig>

      <fig id="Ch1.F9" specific-use="star"><label>Figure 9</label><caption><p id="d1e2196">Annual cycle of monthly mean maximum temperature for all the stations (left to right). The first-row panels <bold>(a, b, c, d)</bold> show the cycle for the variable, and the second row <bold>(e, f, g, h)</bold> is for its standard deviation.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f09.png"/>

          </fig>

      <fig id="Ch1.F10" specific-use="star"><label>Figure 10</label><caption><p id="d1e2213">Annual cycle of monthly mean minimum temperature for all the stations (left to right). The first-row panels <bold>(a, b, c, d, e)</bold> show the cycle for the variable, and the second row <bold>(f, g, h, i, j)</bold> is for its standard deviation.</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f10.png"/>

          </fig>

</sec>
<sec id="Ch1.S4.SS3.SSS4">
  <label>4.3.4</label><title>Daily indices</title>
      <p id="d1e2236">In climate studies, it is common to employ indices that condense key climatic features of the study area. These indices are usually based on the comparison of a variable with a fixed threshold or a threshold based on some statistical property, such as a mean value or a percentile <xref ref-type="bibr" rid="bib1.bibx35" id="paren.38"/>. Consequently, when using climate indices, the focus of a study may not necessarily be on making the reconstructed time series closely resemble the observations, but rather on effectively reproducing these indices. Given that the indices are based on threshold crossings, a dataset characterized by significant biases may result in a misrepresentation of these indices. As demonstrated earlier, the station Navacerrada stands out as the one most positively influenced by the reconstructions. This is due to the fact that the reanalysis provides a deficient representation of precipitation and temperature, mainly due to its pronounced warm and dry bias. Therefore, this station was chosen for the calculation of relevant indices for a mountainous region using the reconstructions, such as days with precipitation exceeding 1 mm (<inline-formula><mml:math id="M69" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">mm</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>), icing days (IC, days of maximum temperature below 0 °C), and frost days (FD, days of minimum temperature below 0 °C).</p>

      <fig id="Ch1.F11" specific-use="star"><label>Figure 11</label><caption><p id="d1e2259">Seasonal cycle of the observations and the best reconstruction of climatological indices in Navacerrada, these being <bold>(a)</bold> days of PCP <inline-formula><mml:math id="M70" display="inline"><mml:mo>≥</mml:mo></mml:math></inline-formula> 1 mm (<inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="normal">mm</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>), <bold>(b)</bold> days of <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mo>max⁡</mml:mo></mml:msub><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> °C or icing days (ID), and <bold>(c)</bold> days of <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mo>min⁡</mml:mo></mml:msub><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> °C or frost days (FD).</p></caption>
            <graphic xlink:href="https://gmd.copernicus.org/articles/17/7245/2024/gmd-17-7245-2024-f11.png"/>

          </fig>

<table-wrap id="Ch1.T2"><label>Table 2</label><caption><p id="d1e2333">Skill metrics for the best monthly reconstruction in Navacerrada for days of PCP <inline-formula><mml:math id="M74" display="inline"><mml:mo>≥</mml:mo></mml:math></inline-formula> 1 mm (<inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">mm</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>), icing days (ID), and frost days (FD).</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="4">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:thead>
       <oasis:row>
         <oasis:entry colname="col1">Index</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M76" display="inline"><mml:mrow><mml:msup><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">MBE</oasis:entry>
         <oasis:entry colname="col4">RMSE</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3">(days per month)</oasis:entry>
         <oasis:entry colname="col4">(days per month)</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">mm</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">0.80</oasis:entry>
         <oasis:entry colname="col3">0.17</oasis:entry>
         <oasis:entry colname="col4">3.55</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">ID</oasis:entry>
         <oasis:entry colname="col2">0.91</oasis:entry>
         <oasis:entry colname="col3">0.22</oasis:entry>
         <oasis:entry colname="col4">2.3</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">FD</oasis:entry>
         <oasis:entry colname="col2">0.96</oasis:entry>
         <oasis:entry colname="col3">0.34</oasis:entry>
         <oasis:entry colname="col4">3.01</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d1e2474">Figure <xref ref-type="fig" rid="Ch1.F11"/> presents the seasonal cycles of the indices for both observations and the optimal reconstruction chosen in Sect. 5.3.1. The aim is to ensure that the reconstructions accurately replicate the climatic characteristics associated with these indices without exhibiting any spurious behavior.</p>
      <p id="d1e2479">The <inline-formula><mml:math id="M78" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">mm</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> index in Fig. <xref ref-type="fig" rid="Ch1.F11"/>a reveals highly similar distributions across all months, with only a slight overestimation of the median value noted in March, June, and July. Figure <xref ref-type="fig" rid="Ch1.F11"/>b also demonstrates very good agreement in the ID index between the reconstruction and observed distributions and median values, although with slightly broader distributions during winter months. Finally, Fig. <xref ref-type="fig" rid="Ch1.F11"/>c reaffirms the substantial agreement between observations and distributions for the FD index, highlighting RASCAL's capability to faithfully replicate the seasonal behavior inherent in these indices.</p>
      <p id="d1e2503">Upon examining the time series skill, Table <xref ref-type="table" rid="Ch1.T2"/> presents the values for Pearson correlation coefficient (<inline-formula><mml:math id="M79" display="inline"><mml:mrow><mml:msup><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>), mean bias error (MBE), and root mean square error (RMSE) of the indices. The table highlights the commendable performance of the reconstructions in accurately reproducing these indices, as evidenced by high correlations, particularly for temperature-related indices. Furthermore, the MBE values are significantly low, measuring less than 0.34 d per month, and the RMSE values remain below 3.55 d per month.</p>
</sec>
</sec>
</sec>
<sec id="Ch1.S5" sec-type="conclusions">
  <label>5</label><title>Conclusions</title>
      <p id="d1e2530">We have confirmed that a decline of in situ observations is a noteworthy concern as it may result in the loss of crucial information in areas where local effects are relevant to  climatology. While the reanalysis provides a homogeneous and comprehensive dataset, its applicability to studying climatologies with highly localized effects, particularly in regions with intricate orography, has been called into question.</p>
      <p id="d1e2533">In order to mitigate this possible loss of meteorological information based on surface observations, RASCAL has been developed. This is an open-source Python tool designed to fill gaps in observational data, enabling climate studies in regions with limited long-term data. This tool proved to be particularly useful for the test sites, especially in the mountainous areas. It is expected to also be useful in other areas with important local effects or distinctive locations like river valleys, forests, caves, or canyons.</p>
      <p id="d1e2536">The package presented here utilizes an object-oriented programming (OOP) approach, treating weather stations, predictors, and reconstructions as objects with multiple functional attributes that encompass all necessary functionalities. This has allowed for the execution of all modeling steps with just a few lines of code. The core methodology is based on linking large-scale circulation patterns with local atmospheric features. This linkage is established through the analog method and principal component analysis and has been shown to be more effective than reanalysis in conveying climatic characteristics. It is a faster and less computationally expensive alternative to dynamical downscaling methods and an easier-to-interpret method than machine learning statistical downscaling methods.</p>
      <p id="d1e2539">The package was evaluated at four stations in Spain, including three near a mountainous area in central Spain and one in a highly urbanized area. The results were compared to the products of the reanalysis ERA20C and ERA20CM. RASCAL outperformed the reanalysis in terms of <inline-formula><mml:math id="M80" display="inline"><mml:mrow><mml:msup><mml:mi>R</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, standard deviation, and bias. This improvement was particularly noticeable in the reconstruction of monthly total precipitation, with correlation values reaching 0.8. The reconstructed maximum and minimum temperatures show a slight improvement over the reanalysis in terms of standard deviation and correlation, reaching very high values of correlation of over 0.99. Additionally, the biases present in the reanalysis are significantly corrected by the reconstructions. This is also evident when examining the distributions of daily data. RASCAL is proficient at generating series that closely resemble the observations, unlike the reanalysis, which exhibits skewness towards low precipitation and biases in maximum and minimum temperatures.</p>
      <p id="d1e2554">The various methods for selecting the best analog have exhibited diverse behaviors when examining the different characteristics of the series. Therefore, it is recommended not to designate a single method as the best possible but to choose it based on the scientific objectives.</p>
      <p id="d1e2557">Seasonality also demonstrates a marked enhancement compared to the reanalysis. RASCAL produces reconstructions with an annual cycle closely resembling the observations. While the precipitation annual cycle exhibits some disparities during unstable months, such as November and March, the cycles of maximum and minimum temperatures are nearly identical to the observations in every month when using the quantile map method. This method better represents the monthly variability for both precipitation and temperatures.</p>
      <p id="d1e2560">In climate studies, the use of indices is a common practice to condense key climatic features of a study area. RASCAL has demonstrated its capacity to reproduce  indices like days of precipitation above 1 mm, icing days, and frost days well for a station situated in the core of a mountain range. This achievement is particularly noteworthy given the difficult conditions posed by the strong dry and warm biases of the reanalysis in this region, which would otherwise hinder the accurate computation of these indices. The reconstructed data showcase high correlation coefficients with observations, ranging from 0.8 to 0.96. Additionally, consistently low values of MBE and RMSE were observed. These outcomes highlight the significant potential of RASCAL to facilitate climate studies in regions with complex climatic dynamics. These results confirm RASCAL's effectiveness in capturing and reproducing important climatic features for reliable climate research, highlighting its potential in regions with limited long-term weather data.</p>
      <p id="d1e2563">However, it is important to acknowledge instances where this methodology may have limitations. This approach requires sufficiently long series, as it cannot create reconstructions with data that have not been observed. Additionally, land use changes or urbanization processes can disrupt the intricate relationship between large and small scales, affecting the relationship between predictor and predictand and, ultimately, the quality of the reconstruction.</p>
      <p id="d1e2566">The implementation of this package has yielded positive results, providing opportunities to conduct comprehensive climate variability analyses within the study area. In a short time, it is expected that we can use RASCAL in the analysis of the climate variability and climate change in the mountainous area of the Central System (Spain). On the other hand, improvements to be implemented in this methodology will be studied once it has been applied to different cases, scenarios, and regions. Finally, whether this package can be extended as a downscaling tool for short- and medium-term numerical forecast, as well as for seasonal prediction and even climate change scenarios, will be analyzed.</p>
</sec>

      
      </body>
    <back><notes notes-type="codeavailability"><title>Code availability</title>

      <p id="d1e2573">RASCAL (version 1.0) source code is available on GitHub (<uri>https://github.com/alvaro-gc95/RASCAL</uri>) and Zenodo (<uri>https://doi.org/10.5281/zenodo.12654140</uri>, <xref ref-type="bibr" rid="bib1.bibx24" id="altparen.39"/>). The required dependencies, package usage, and functionalities are described in the documentation (<uri>https://rascalv100.readthedocs.io/en/latest/</uri>, last access: 15 July 2024). Additionally, a Jupyter Notebook is available to represent and validate the reconstructions and assess their skill. To run this library, Python 3.10 is required. RASCAL is also installable via the Python package index (PyPI):  <uri>https://pypi.org/project/rascal-ties/</uri> (last access: 15 July 2024).</p>
  </notes><notes notes-type="dataavailability"><title>Data availability</title>

      <p id="d1e2594">The ERA5 reanalysis data to run the code examples described in the documentation are available on Zenodo (<uri>https://doi.org/10.5281/zenodo.12626856</uri>, <xref ref-type="bibr" rid="bib1.bibx21" id="altparen.40"/>).</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e2606">AGC and LD contributed to the conceptualization of the model and the writing of the paper. AGC contributed to the RASCAL software coding, documentation, modeling, data analysis, and visualization. LD contributed to the supervision and funding acquisition.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e2612">The contact author has declared that neither of the authors has any competing interests.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <p id="d1e2618">Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e2624">Partial funding comes from the Ministerio de Ciencia e Innovación, the Programa de doctorados industriales 2019 (DIN2019-010482), project FIRN (PID2022-140690OA-I00), Proyectos de Generación de Conocimiento 2022, and interMET Sistemas y Redes SME. We would like to thank the Agencia Estatal de Meteorología (AEMET) for providing observational data. Special thanks go to the Navacerrada Observatory staff for their tireless and accurate work. Thanks go to the European Centre for Medium-Range Weather Forecasts (ECMWF) for providing the ERA20C and ERA20CM data. Thanks go to Nuria Sevilla-Sierra for coming up with a cool name for the package. We would like to thank the referees for their thoughtful reviews that helped to make this a better paper.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e2629">This research has been supported by the Ministerio de Ciencia e Innovación (grant nos. DIN2019-010482 and PID2022-140690OA-I00).</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e2635">This paper was edited by Lele Shu and reviewed by three anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Abatzoglou and Brown(2012)</label><mixed-citation> Abatzoglou, J. T. and Brown, T. J.: A comparison of statistical downscaling methods suited for wildfire applications, Int. J. Climatol., 32, 772–780, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Auer et al.(2007)</label><mixed-citation> Auer, I., Böhm,  R., Jurkovic, A., Lipa, W., Orlik, A., Potzmann, R., Schöner, W., Ungersböck, M., Matulla, C., Briffa, K., Jones, P., Efthymiadis, D., Brunetti, M., Nanni, T., Maugeri, M., Mercalli, L., Mestre, O., Moisselin, J.-M., Begert, M., Müller-Westermeier, G., Kveton, V., Bochnicek, O., Stastny, P., Lapin, M., Szalai, S., Szentimrey, T., Cegnar, T., Dolinar, M., Gajic-Capka, M., Zaninovic, K., Majstorovic, Z., and Nieplova, E.: HISTALP –historical instrumental climatological surface time series of the Greater Alpine Region, Int. J. Climatol., 27, 17–46, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Barry and Chorley(2009)</label><mixed-citation>Barry, R. G. and Chorley, R. J.: Atmosphere, weather and climate, Routledge, <ext-link xlink:href="https://doi.org/10.4324/9780203871027" ext-link-type="DOI">10.4324/9780203871027</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Begert et al.(2005)</label><mixed-citation> Begert, M., Schlegel, T., and Kirchhofer, W.: Homogeneous temperature and precipitation series of Switzerland from 1864 to 2000, Int. J. Climatol., 25, 65–80, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Bell et al.(2021)</label><mixed-citation> Bell, B., Hersbach, H., Simmons, A., Berrisford, P., Dahlgren, P., Horányi, A., Muñoz-Sabater, J., Nicolas, J., Radu, R., Schepers, D., Soci, C., Villaume, S., Bidlot, J. R., Haimberger, L., Woollen, J., Buontempo, C., and Thépaut, J. N.: The ERA5 global reanalysis: Preliminary extension to 1950, Q. J. Roy. Meteor. Soc., 147, 4186–4227, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Benestad(2010)</label><mixed-citation> Benestad, R. E.: Downscaling precipitation extremes: Correction of analog models through PDF predictions, Theor. Appl. Climatol., 100, 1–21, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Bergström and Moberg(2002)</label><mixed-citation> Bergström, H. and Moberg, A.: Daily air temperature and pressure series for Uppsala (1722–1998), Climatic Change, 53, 213–252, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>Boateng and Mutz(2023)</label><mixed-citation>Boateng, D. and Mutz, S. G.: pyESDv1.0.1: an open-source Python framework for empirical-statistical downscaling of climate information, Geosci. Model Dev., 16, 6479–6514, <ext-link xlink:href="https://doi.org/10.5194/gmd-16-6479-2023" ext-link-type="DOI">10.5194/gmd-16-6479-2023</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Boé et al.(2006)</label><mixed-citation>Boé, J., Terray, L., Habets, F., and Martin, E.: A simple statistical-dynamical downscaling scheme based on weather types and conditional resampling, J. Geophys. Res.-Atmos., 111, D23106, <ext-link xlink:href="https://doi.org/10.1029/2005JD006889" ext-link-type="DOI">10.1029/2005JD006889</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Bonshoms et al.(2022)</label><mixed-citation> Bonshoms, M., Ubeda, J., Liguori, G., Körner, P., Navarro, Á., and Cruz, R.: Validation of ERA5-Land temperature and relative humidity on four Peruvian glaciers using on-glacier observations, J. Mt. Sci., 19, 1849–1873, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Bürger(1996)</label><mixed-citation> Bürger, G.: Expanded downscaling for generating local weather scenarios, Clim. Res., 7, 111–128, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Dawson(2016)</label><mixed-citation>Dawson, A.: eofs: A library for EOF analysis of meteorological, oceanographic, and climate data, J. Open Res. Softw., 4, 1, <ext-link xlink:href="https://doi.org/10.5334/jors.122" ext-link-type="DOI">10.5334/jors.122</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Dee et al.(2014)</label><mixed-citation> Dee, D., Balmaseda, M., Balsamo, G., Engelen, R., Simmons, A., and Thépaut, J.-N.: Toward a consistent reanalysis of the climate system, B. Am. Meteorol. Soc., 95, 1235–1248, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>De Rooy and Kok(2004)</label><mixed-citation> De Rooy, W. C. and Kok, K.: A combined physical–statistical approach for the downscaling of model wind speed, Weather Forecast., 19, 485–495, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Dinku(2019)</label><mixed-citation>Dinku, T.: Challenges with availability and quality of climate data in Africa, in: Extreme hydrology and climate variability, edited by:  Melesse, A. M., Abtew, W.,  and Senay, G., 71–80, Elsevier, <ext-link xlink:href="https://doi.org/10.1016/C2017-0-04193-9" ext-link-type="DOI">10.1016/C2017-0-04193-9</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Domínguez-Castro et al.(2014)</label><mixed-citation> Domínguez-Castro, F., Vaquero, J. M., Rodrigo, F. S., Farrona, A., Gallego, M. C., García-Herrera, R., Barriendos, M., and Sanchez-Lorenzo, A.: Early Spanish meteorological records (1780–1850), Int. J. Climatol., 34, 593–603, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Durán and Barstad(2018)</label><mixed-citation> Durán, L. and Barstad, I.: Multi-scale evaluation of a linear model of orographic precipitation over Sierra de Guadarrama (Iberian Central System), Int. J. Climatol., 38, 4127–4141, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Durán et al.(2013)</label><mixed-citation> Durán, L., Sánchez, E., and Yagüe, C.: Climatology of precipitation over the Iberian Central System mountain range, Int. J. Climatol., 33, 2260–2273, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Durán et al.(2015)</label><mixed-citation> Durán, L., Rodríguez-Fonseca, B., Yagüe, C., and Sánchez, E.: Water vapour flux patterns and precipitation at Sierra de Guadarrama mountain range (Spain), Int. J. Climatol., 35, 1593–1610, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>Durán et al.(2017)</label><mixed-citation>Durán, L., Rodríguez-Muñoz, I., and Sánchez, E.: The Peñalara mountain meteorological network (1999–2014): Description, preliminary results and lessons learned, Atmosphere, 8, 203, <ext-link xlink:href="https://doi.org/10.3390/atmos8100203" ext-link-type="DOI">10.3390/atmos8100203</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>ECMWF(2024)</label><mixed-citation>ECMWF: Example Reanalysis Dataset (ERA5), Zenodo [data set], <ext-link xlink:href="https://doi.org/10.5281/zenodo.12626856" ext-link-type="DOI">10.5281/zenodo.12626856</ext-link>, 2024.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Emery et al.(2001)</label><mixed-citation> Emery, W., Castro, S., Wick, G., Schluessel, P., and Donlon, C.: Estimating sea surface temperature from infrared satellite and in situ temperature data, B. Am. Meteorol. Soc., 82, 2773–2786, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Fan et al.(2020)</label><mixed-citation> Fan, M., Xu, J., Chen, Y., and Li, W.: Simulating the precipitation in the data-scarce Tianshan Mountains, Northwest China based on the Earth system data products, Arab. J. Geosci., 13, 1–15, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Gonzalez-Cervera(2024)</label><mixed-citation>Gonzalez-Cervera, A.: RASCALv1.0.0, Zenodo [code], <ext-link xlink:href="https://doi.org/10.5281/zenodo.10592595" ext-link-type="DOI">10.5281/zenodo.10592595</ext-link>, 2024.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>González-Flórez et al.(2022)</label><mixed-citation>González-Flórez, C., González-Cervera, Á., and Durán, L.: Characterising Large-Scale Meteorological Patterns Associated with Winter Precipitation and Snow Accumulation in a Mountain Range in the Iberian Peninsula (Sierra de Guadarrama), Atmosphere, 13, 1600, <ext-link xlink:href="https://doi.org/10.3390/atmos13101600" ext-link-type="DOI">10.3390/atmos13101600</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Hanssen-Bauer et al.(2003)</label><mixed-citation> Hanssen-Bauer, I., Førland, E. J., Haugen, J. E., and Tveito, O. E.: Temperature and precipitation scenarios for Norway: comparison of results from dynamical and empirical downscaling, Clim. Res., 25, 15–27, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Hersbach(2016)</label><mixed-citation> Hersbach, H.: The ERA5 Atmospheric Reanalysis, in: AGU fall meeting abstracts, San Francisco, CA, USA, 12–16 December 2016, Volume 2016, p. NG33D-01, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Hewitson and Crane(1996)</label><mixed-citation> Hewitson, B. C. and Crane, R. G.: Climate downscaling: techniques and application, Clim. Res., 7, 85–95, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Hidalgo et al.(2008)</label><mixed-citation> Hidalgo, H. G., Dettinger, M. D., and Cayan, D. R.: Downscaling with constructed analogues: daily precipitation and temperature fields over the United States, California Energy Commission, Public Interest Energy Research Program, Sacramento, CA, 62, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Horton et al.(2017)</label><mixed-citation>Horton, P., Obled, C., and Jaboyedoff, M.: The analogue method for precipitation prediction: finding better analogue situations at a sub-daily time step, Hydrol. Earth Syst. Sci., 21, 3307–3323, <ext-link xlink:href="https://doi.org/10.5194/hess-21-3307-2017" ext-link-type="DOI">10.5194/hess-21-3307-2017</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Hoyer et al.(2020)</label><mixed-citation>Hoyer, S., Hamman, J., Roos, M., Cherian, D., Fitzgerald, C., Fujii, K., Maussion, F., Hauser, M., Clark, S., Kleeman, A., Kluyver, T., Munroe, J., Amici, A., Nicholas, T., Barghini, A., Banihirwe, A., Hatfield-Dodds, Z., Abernathey, R., Bell, R., Roszko, M., Wolfram, P. J., Signell, J., Mühlbauer, K., Sinai, Y. B., and Bovy, B.: pydata/xarray: v0.17.0, Zenodo, <ext-link xlink:href="https://doi.org/10.5281/zenodo.1063607" ext-link-type="DOI">10.5281/zenodo.1063607</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Huang et al.(2019)</label><mixed-citation>Huang, G., Li, Z., Li, X., Liang, S., Yang, K., Wang, D., and Zhang, Y.: Estimating surface solar irradiance from satellites: Past, present, and future perspectives, Remote Sens. Environ., 233, 111371, <ext-link xlink:href="https://doi.org/10.1016/j.rse.2019.111371" ext-link-type="DOI">10.1016/j.rse.2019.111371</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>IPCC(2021)</label><mixed-citation>IPCC: Summary for Policymakers, edited by: Masson-Delmotte, V., Zhai, P., Pörtner, H.-O., Roberts, D., Skea, J., Shukla, P. R., Pirani, A., Moufouma-Okia, W., Péan, C., Pidcock, R., Connors, S., Matthews, J. B. R., Chen, Y., Zhou, X., Gomis, M. I., Lonnoy, E., Maycock, T., Tignor, M., and Waterfield, T., Cambridge University Press, Cambridge, United Kingdom and New York, NY, USA  3−-32, <ext-link xlink:href="https://doi.org/10.1017/9781009157896.001" ext-link-type="DOI">10.1017/9781009157896.001</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Klein Tank et al.(2002)</label><mixed-citation> Klein Tank, A., Wijngaard, J., Können, G., Böhm, R., Demarée, G., Gocheva, A., Mileta, M., Pashiardis, S., Hejkrlik, L., Kern-Hansen, C., Heino, R., Bessemoulin, P., Müller-Westermeier, G., Tzanakou, M.,  Szalai, S., Pálsdóttir, T., Fitzgerald, D., Rubin, S., Capaldo, M., Maugeri, M., Leitass, A., Bukantis, A., Aberfeld, R., van Engelen, A. F. V., Forland, E., Mietus,  M., Coelho, F., Mares, C., Razuvaev, V., Nieplova, E., Cegnar, T., Antonio López, J., Dahlström, B., Moberg, A., Kirchhofer, W., Ceylan, A., Pachaliuk, O., Alexander,  L. V., and Petrovic, P.: Daily dataset of 20th-century surface air temperature and precipitation series for the European Climate Assessment, Int. J. Climatol., 22, 1441–1453, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Klein Tank et al.(2009)</label><mixed-citation> Klein Tank, A. M. G.,  Zwiers, F. W., and Zhang, X.: Guidelines on analysis of extremes in a changing climate in support of informed decisions for adaptation, limate Data and Monitoring WCDMP-No. 72,  vol. 1500, WMO-TD, p. 56, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Lavers et al.(2022)</label><mixed-citation> Lavers, D. A., Simmons, A., Vamborg, F., and Rodwell, M. J.: An evaluation of ERA5 precipitation for climate monitoring, Q. J. Roy. Meteor. Soc., 148, 3152–3165, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>Lo et al.(2008)</label><mixed-citation>Lo, J. C.-F., Yang, Z.-L., and Pielke Sr., R. A.: Assessment of three dynamical climate downscaling methods using the Weather Research and Forecasting (WRF) model, J. Geophys. Res.-Atmos., 113, D09112,  <ext-link xlink:href="https://doi.org/10.1029/2007JD009216" ext-link-type="DOI">10.1029/2007JD009216</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Lorenz(1969)</label><mixed-citation> Lorenz, E. N.: Atmospheric predictability as revealed by naturally occurring analogues, J. Atmos. Sci., 26, 636–646, 1969.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Manley(1974)</label><mixed-citation> Manley, G.: Central England temperatures: monthly means 1659 to 1973, Q. J. Roy. Meteor. Soc., 100, 389–405, 1974.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Moisselin et al.(2002)</label><mixed-citation> Moisselin, J.-M., Schneider, M., Canellas, C., and Mestre, O.: Les changements climatiques en France au XXe siècle-Etude des longues séries homogénéisées de données de température et de précipitations, La météorologie, 2002, 45–56, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Molina et al.(2021)</label><mixed-citation> Molina, M. O., Gutiérrez, C., and Sánchez, E.: Comparison of ERA5 surface wind speed climatologies over Europe with observations from the HadISD dataset, Int. J. Climatol., 41, 4864–4878, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Poli et al.(2016)</label><mixed-citation> Poli, P., Hersbach, H., Dee, D. P., Berrisford, P., Simmons, A. J., Vitart, F., Laloyaux, P., Tan, D. G., Peubey, C., Thépaut, J.-N., Trémolet, Y., Hólm, E. V., Bonavita, M., Isaksen, L., and Fisher, M.: ERA-20C: An atmospheric reanalysis of the twentieth century, J. Climate, 29, 4083–4097, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Purdom and Menzel(1996)</label><mixed-citation> Purdom, J. F. and Menzel, W. P.: Evolution of satellite observations in the United States and their use in meteorology, Historical Essays on Meteorology 1919–1995: The Diamond Anniversary History Volume of the American Meteorological Society, edited by: Fleming, J. R., 99–155, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Saavedra-Moreno et al.(2015)</label><mixed-citation> Saavedra-Moreno, B., De la Iglesia, A., Magdalena-Saiz, J., Carro-Calvo, L., Durán, L., and Salcedo-Sanz, S.: Surface wind speed reconstruction from synoptic pressure fields: machine learning versus weather regimes classification techniques, Wind Energy, 18, 1531–1544, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Salio et al.(2015)</label><mixed-citation> Salio, P., Hobouchian, M. P., Skabar, Y. G., and Vila, D.: Evaluation of high-resolution satellite precipitation estimates over southern South America using a dense rain gauge network, Atmos. Res., 163, 146–161, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Schween et al.(2020)</label><mixed-citation>Schween, J. H., Hoffmeister, D., and Löhnert, U.: Filling the observational gap in the Atacama Desert with a new network of climate stations, Global   Planet. Change, 184, 103034, <ext-link xlink:href="https://doi.org/10.1016/j.gloplacha.2019.103034" ext-link-type="DOI">10.1016/j.gloplacha.2019.103034</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Shulgina et al.(2023)</label><mixed-citation> Shulgina, T., Gershunov, A., Hatchett, B. J., Guirguis, K., Subramanian, A. C., Margulis, S. A., Fang, Y., Cayan, D. R., Pierce, D. W., Dettinger, M., Anderson M. L., and Ralph F. M.: Observed and projected changes in snow accumulation and snowline in California's snowy mountains, Clim. Dynam., 61, 1–16, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Wang et al.(2021)</label><mixed-citation> Wang, X., Tolksdorf, V., Otto, M., and Scherer, D.: WRF-based dynamical downscaling of ERA5 reanalysis data for High Mountain Asia: Towards a new version of the High Asia Refined analysis, Int. J. Climatol., 41, 743–762, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Wetterhall et al.(2005)</label><mixed-citation> Wetterhall, F., Halldin, S., and Xu, C.-Y.: Statistical precipitation downscaling in central Sweden with the analogue method, J. Hydrol., 306, 174–190, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Wilks(2011)</label><mixed-citation> Wilks, D. S.: Statistical methods in the atmospheric sciences, Vol. 100, edited by: Wilks, D. S., Academic press, ISBN 978-0123850225, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx51"><label>Yagüe et al.(1991)</label><mixed-citation> Yagüe, C., Zurita, E., and Martinez, A.: Statistical analysis of the Madrid urban heat island, Atmos. Environ. B-Urb., 25, 327–332, 1991.</mixed-citation></ref>
      <ref id="bib1.bibx52"><label>Yang et al.(2005)</label><mixed-citation>Yang, D., Kane, D., Zhang, Z., Legates, D., and Goodison, B.: Bias corrections of long-term (1973–2004) daily precipitation data over the northern regions, Geophys. Res. Lett., 32, 312–321, <ext-link xlink:href="https://doi.org/10.1029/2005GL024057" ext-link-type="DOI">10.1029/2005GL024057</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>Zorita and Von Storch(1999)</label><mixed-citation> Zorita, E. and Von Storch, H.: The analog method as a simple statistical downscaling technique: Comparison with more complicated methods, J. Climate, 12, 2474–2489, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Zorita et al.(1995)</label><mixed-citation> Zorita, E., Hughes, J. P., Lettemaier, D. P., and von Storch, H.: Stochastic characterization of regional circulation patterns for climate model diagnosis and estimation of local precipitation, J. Climate, 8, 1023–1042, 1995.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>RASCAL v1.0: an open-source tool for climatological  time series reconstruction and extension</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Abatzoglou and Brown(2012)</label><mixed-citation>
      
Abatzoglou, J. T. and Brown, T. J.: A comparison of statistical downscaling
methods suited for wildfire applications, Int. J.
Climatol., 32, 772–780, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Auer et al.(2007)</label><mixed-citation>
      
Auer, I., Böhm,  R., Jurkovic, A., Lipa, W., Orlik, A., Potzmann, R., Schöner, W., Ungersböck, M., Matulla, C., Briffa, K., Jones, P., Efthymiadis, D., Brunetti, M., Nanni, T., Maugeri, M., Mercalli, L., Mestre, O., Moisselin, J.-M., Begert, M., Müller-Westermeier, G., Kveton, V., Bochnicek, O., Stastny, P., Lapin, M., Szalai, S., Szentimrey, T., Cegnar, T., Dolinar, M., Gajic-Capka, M., Zaninovic, K., Majstorovic, Z., and Nieplova, E.:
HISTALP –historical instrumental climatological surface time series of the
Greater Alpine Region, Int. J. Climatol., 27, 17–46, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Barry and Chorley(2009)</label><mixed-citation>
      
Barry, R. G. and Chorley, R. J.: Atmosphere, weather and climate, Routledge, <a href="https://doi.org/10.4324/9780203871027" target="_blank">https://doi.org/10.4324/9780203871027</a>,
2009.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Begert et al.(2005)</label><mixed-citation>
      
Begert, M., Schlegel, T., and Kirchhofer, W.: Homogeneous temperature and
precipitation series of Switzerland from 1864 to 2000, Int. J. Climatol., 25, 65–80,
2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bell et al.(2021)</label><mixed-citation>
      
Bell, B., Hersbach, H., Simmons, A., Berrisford, P., Dahlgren, P.,
Horányi, A., Muñoz-Sabater, J., Nicolas, J., Radu, R., Schepers,
D., Soci, C., Villaume, S., Bidlot, J. R., Haimberger, L., Woollen, J., Buontempo, C., and Thépaut, J. N.: The
ERA5 global reanalysis: Preliminary extension to 1950, Q. J.
Roy. Meteor. Soc., 147, 4186–4227, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Benestad(2010)</label><mixed-citation>
      
Benestad, R. E.: Downscaling precipitation extremes: Correction of analog
models through PDF predictions, Theor. Appl. Climatol., 100,
1–21, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Bergström and Moberg(2002)</label><mixed-citation>
      
Bergström, H. and Moberg, A.: Daily air temperature and pressure series for
Uppsala (1722–1998), Climatic Change, 53, 213–252, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Boateng and Mutz(2023)</label><mixed-citation>
      
Boateng, D. and Mutz, S. G.: pyESDv1.0.1: an open-source Python framework for empirical-statistical downscaling of climate information, Geosci. Model Dev., 16, 6479–6514, <a href="https://doi.org/10.5194/gmd-16-6479-2023" target="_blank">https://doi.org/10.5194/gmd-16-6479-2023</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Boé et al.(2006)</label><mixed-citation>
      
Boé, J., Terray, L., Habets, F., and Martin, E.: A simple
statistical-dynamical downscaling scheme based on weather types and
conditional resampling, J. Geophys. Res.-Atmos., 111, D23106, <a href="https://doi.org/10.1029/2005JD006889" target="_blank">https://doi.org/10.1029/2005JD006889</a>,
2006.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Bonshoms et al.(2022)</label><mixed-citation>
      
Bonshoms, M., Ubeda, J., Liguori, G., Körner, P., Navarro, Á., and
Cruz, R.: Validation of ERA5-Land temperature and relative humidity on four
Peruvian glaciers using on-glacier observations, J. Mt. Sci.,
19, 1849–1873, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Bürger(1996)</label><mixed-citation>
      
Bürger, G.: Expanded downscaling for generating local weather scenarios,
Clim. Res., 7, 111–128, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Dawson(2016)</label><mixed-citation>
      
Dawson, A.: eofs: A library for EOF analysis of meteorological, oceanographic,
and climate data, J. Open Res. Softw., 4, 1, <a href="https://doi.org/10.5334/jors.122" target="_blank">https://doi.org/10.5334/jors.122</a>, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Dee et al.(2014)</label><mixed-citation>
      
Dee, D., Balmaseda, M., Balsamo, G., Engelen, R., Simmons, A., and Thépaut,
J.-N.: Toward a consistent reanalysis of the climate system, B.
Am. Meteorol. Soc., 95, 1235–1248, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>De Rooy and Kok(2004)</label><mixed-citation>
      
De Rooy, W. C. and Kok, K.: A combined physical–statistical approach for the
downscaling of model wind speed, Weather Forecast., 19, 485–495, 2004.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Dinku(2019)</label><mixed-citation>
      
Dinku, T.: Challenges with availability and quality of climate data in Africa,
in: Extreme hydrology and climate variability, edited by:  Melesse, A. M., Abtew, W.,  and Senay, G., 71–80, Elsevier, <a href="https://doi.org/10.1016/C2017-0-04193-9" target="_blank">https://doi.org/10.1016/C2017-0-04193-9</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Domínguez-Castro et al.(2014)</label><mixed-citation>
      
Domínguez-Castro, F., Vaquero, J. M., Rodrigo, F. S., Farrona, A.,
Gallego, M. C., García-Herrera, R., Barriendos, M., and Sanchez-Lorenzo,
A.: Early Spanish meteorological records (1780–1850), Int. J. Climatol., 34, 593–603, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Durán and Barstad(2018)</label><mixed-citation>
      
Durán, L. and Barstad, I.: Multi-scale evaluation of a linear model of
orographic precipitation over Sierra de Guadarrama (Iberian Central System),
Int. J. Climatol., 38, 4127–4141, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Durán et al.(2013)</label><mixed-citation>
      
Durán, L., Sánchez, E., and Yagüe, C.: Climatology of precipitation
over the Iberian Central System mountain range, Int. J.
Climatol., 33, 2260–2273, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Durán et al.(2015)</label><mixed-citation>
      
Durán, L., Rodríguez-Fonseca, B., Yagüe, C., and Sánchez, E.:
Water vapour flux patterns and precipitation at Sierra de Guadarrama mountain
range (Spain), Int. J. Climatol., 35, 1593–1610, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Durán et al.(2017)</label><mixed-citation>
      
Durán, L., Rodríguez-Muñoz, I., and Sánchez, E.: The
Peñalara mountain meteorological network (1999–2014): Description,
preliminary results and lessons learned, Atmosphere, 8, 203, <a href="https://doi.org/10.3390/atmos8100203" target="_blank">https://doi.org/10.3390/atmos8100203</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>ECMWF(2024)</label><mixed-citation>
      
ECMWF: Example Reanalysis Dataset (ERA5), Zenodo [data set], <a href="https://doi.org/10.5281/zenodo.12626856" target="_blank">https://doi.org/10.5281/zenodo.12626856</a>, 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Emery et al.(2001)</label><mixed-citation>
      
Emery, W., Castro, S., Wick, G., Schluessel, P., and Donlon, C.: Estimating sea
surface temperature from infrared satellite and in situ temperature data,
B. Am. Meteorol. Soc., 82, 2773–2786, 2001.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Fan et al.(2020)</label><mixed-citation>
      
Fan, M., Xu, J., Chen, Y., and Li, W.: Simulating the precipitation in the
data-scarce Tianshan Mountains, Northwest China based on the Earth system
data products, Arab. J. Geosci., 13, 1–15, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Gonzalez-Cervera(2024)</label><mixed-citation>
      
Gonzalez-Cervera, A.: RASCALv1.0.0, Zenodo [code], <a href="https://doi.org/10.5281/zenodo.10592595" target="_blank">https://doi.org/10.5281/zenodo.10592595</a>, 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>González-Flórez et al.(2022)</label><mixed-citation>
      
González-Flórez, C., González-Cervera, Á., and Durán, L.:
Characterising Large-Scale Meteorological Patterns Associated with Winter
Precipitation and Snow Accumulation in a Mountain Range in the Iberian
Peninsula (Sierra de Guadarrama), Atmosphere, 13, 1600, <a href="https://doi.org/10.3390/atmos13101600" target="_blank">https://doi.org/10.3390/atmos13101600</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Hanssen-Bauer et al.(2003)</label><mixed-citation>
      
Hanssen-Bauer, I., Førland, E. J., Haugen, J. E., and Tveito, O. E.:
Temperature and precipitation scenarios for Norway: comparison of results
from dynamical and empirical downscaling, Clim. Res., 25, 15–27, 2003.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Hersbach(2016)</label><mixed-citation>
      
Hersbach, H.: The ERA5 Atmospheric Reanalysis, in: AGU fall meeting abstracts, San Francisco, CA, USA, 12–16 December 2016, Volume 2016, p. NG33D-01, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Hewitson and Crane(1996)</label><mixed-citation>
      
Hewitson, B. C. and Crane, R. G.: Climate downscaling: techniques and
application, Clim. Res., 7, 85–95, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Hidalgo et al.(2008)</label><mixed-citation>
      
Hidalgo, H. G., Dettinger, M. D., and Cayan, D. R.: Downscaling with constructed analogues: daily precipitation and temperature fields over the United States, California Energy Commission, Public Interest Energy Research Program, Sacramento, CA, 62, 2008.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Horton et al.(2017)</label><mixed-citation>
      
Horton, P., Obled, C., and Jaboyedoff, M.: The analogue method for precipitation prediction: finding better analogue situations at a sub-daily time step, Hydrol. Earth Syst. Sci., 21, 3307–3323, <a href="https://doi.org/10.5194/hess-21-3307-2017" target="_blank">https://doi.org/10.5194/hess-21-3307-2017</a>, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Hoyer et al.(2020)</label><mixed-citation>
      
Hoyer, S., Hamman, J., Roos, M., Cherian, D., Fitzgerald, C., Fujii, K., Maussion, F., Hauser, M., Clark, S., Kleeman, A., Kluyver, T., Munroe, J., Amici, A., Nicholas, T., Barghini, A., Banihirwe, A., Hatfield-Dodds, Z., Abernathey, R., Bell, R., Roszko, M., Wolfram, P. J., Signell, J., Mühlbauer, K., Sinai, Y. B., and Bovy, B.: pydata/xarray: v0.17.0, Zenodo, <a href="https://doi.org/10.5281/zenodo.1063607" target="_blank">https://doi.org/10.5281/zenodo.1063607</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Huang et al.(2019)</label><mixed-citation>
      
Huang, G., Li, Z., Li, X., Liang, S., Yang, K., Wang, D., and Zhang, Y.:
Estimating surface solar irradiance from satellites: Past, present, and
future perspectives, Remote Sens. Environ., 233, 111371, <a href="https://doi.org/10.1016/j.rse.2019.111371" target="_blank">https://doi.org/10.1016/j.rse.2019.111371</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>IPCC(2021)</label><mixed-citation>
      
IPCC: Summary for Policymakers, edited by: Masson-Delmotte, V., Zhai, P., Pörtner, H.-O., Roberts, D., Skea, J., Shukla, P. R., Pirani, A., Moufouma-Okia, W., Péan, C., Pidcock, R., Connors, S., Matthews, J. B. R., Chen, Y., Zhou, X., Gomis, M. I., Lonnoy, E., Maycock, T., Tignor, M., and Waterfield, T., Cambridge University Press,
Cambridge, United Kingdom and New York, NY, USA  3−-32,
<a href="https://doi.org/10.1017/9781009157896.001" target="_blank">https://doi.org/10.1017/9781009157896.001</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Klein Tank et al.(2002)</label><mixed-citation>
      
Klein Tank, A., Wijngaard, J., Können, G., Böhm, R., Demarée,
G., Gocheva, A., Mileta, M., Pashiardis, S., Hejkrlik, L., Kern-Hansen, C., Heino, R., Bessemoulin, P., Müller-Westermeier, G., Tzanakou, M.,  Szalai, S., Pálsdóttir, T., Fitzgerald, D., Rubin, S., Capaldo, M., Maugeri, M., Leitass, A., Bukantis, A., Aberfeld, R., van Engelen, A. F. V., Forland, E., Mietus,  M., Coelho, F., Mares, C., Razuvaev, V., Nieplova, E., Cegnar, T., Antonio López, J., Dahlström, B., Moberg, A., Kirchhofer, W., Ceylan, A., Pachaliuk, O., Alexander,  L. V., and Petrovic, P.: Daily dataset of 20th-century surface air temperature and
precipitation series for the European Climate Assessment, Int.
J. Climatol., 22,
1441–1453, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Klein Tank et al.(2009)</label><mixed-citation>
      
Klein Tank, A. M. G.,  Zwiers, F. W., and Zhang, X.: Guidelines on analysis of extremes in a changing climate in support
of informed decisions for adaptation, limate Data and Monitoring WCDMP-No. 72,  vol. 1500, WMO-TD, p. 56, 2009.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Lavers et al.(2022)</label><mixed-citation>
      
Lavers, D. A., Simmons, A., Vamborg, F., and Rodwell, M. J.: An evaluation of
ERA5 precipitation for climate monitoring, Q. J. Roy.
Meteor. Soc., 148, 3152–3165, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Lo et al.(2008)</label><mixed-citation>
      
Lo, J. C.-F., Yang, Z.-L., and Pielke Sr., R. A.: Assessment of three dynamical
climate downscaling methods using the Weather Research and Forecasting (WRF)
model, J. Geophys. Res.-Atmos., 113, D09112,  <a href="https://doi.org/10.1029/2007JD009216" target="_blank">https://doi.org/10.1029/2007JD009216</a>, 2008.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Lorenz(1969)</label><mixed-citation>
      
Lorenz, E. N.: Atmospheric predictability as revealed by naturally occurring
analogues, J. Atmos. Sci., 26, 636–646, 1969.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Manley(1974)</label><mixed-citation>
      
Manley, G.: Central England temperatures: monthly means 1659 to 1973, Q.
J. Roy. Meteor. Soc., 100, 389–405, 1974.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Moisselin et al.(2002)</label><mixed-citation>
      
Moisselin, J.-M., Schneider, M., Canellas, C., and Mestre, O.: Les changements
climatiques en France au XXe siècle-Etude des longues séries
homogénéisées de données de température et de
précipitations, La météorologie, 2002, 45–56, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Molina et al.(2021)</label><mixed-citation>
      
Molina, M. O., Gutiérrez, C., and Sánchez, E.: Comparison of ERA5
surface wind speed climatologies over Europe with observations from the
HadISD dataset, Int. J. Climatol., 41, 4864–4878, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Poli et al.(2016)</label><mixed-citation>
      
Poli, P., Hersbach, H., Dee, D. P., Berrisford, P., Simmons, A. J.,
Vitart, F., Laloyaux, P., Tan, D. G., Peubey, C., Thépaut, J.-N., Trémolet, Y., Hólm, E. V., Bonavita, M., Isaksen, L., and Fisher, M.: ERA-20C: An
atmospheric reanalysis of the twentieth century, J. Climate, 29,
4083–4097, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Purdom and Menzel(1996)</label><mixed-citation>
      
Purdom, J. F. and Menzel, W. P.: Evolution of satellite observations in the
United States and their use in meteorology, Historical Essays on Meteorology
1919–1995: The Diamond Anniversary History Volume of the American
Meteorological Society, edited by: Fleming, J. R., 99–155, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Saavedra-Moreno et al.(2015)</label><mixed-citation>
      
Saavedra-Moreno, B., De la Iglesia, A., Magdalena-Saiz, J., Carro-Calvo, L.,
Durán, L., and Salcedo-Sanz, S.: Surface wind speed reconstruction from
synoptic pressure fields: machine learning versus weather regimes
classification techniques, Wind Energy, 18, 1531–1544, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Salio et al.(2015)</label><mixed-citation>
      
Salio, P., Hobouchian, M. P., Skabar, Y. G., and Vila, D.: Evaluation of
high-resolution satellite precipitation estimates over southern South America
using a dense rain gauge network, Atmos. Res., 163, 146–161, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Schween et al.(2020)</label><mixed-citation>
      
Schween, J. H., Hoffmeister, D., and Löhnert, U.: Filling the observational
gap in the Atacama Desert with a new network of climate stations, Global   Planet. Change, 184, 103034, <a href="https://doi.org/10.1016/j.gloplacha.2019.103034" target="_blank">https://doi.org/10.1016/j.gloplacha.2019.103034</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Shulgina et al.(2023)</label><mixed-citation>
      
Shulgina, T., Gershunov, A., Hatchett, B. J., Guirguis, K., Subramanian, A. C., Margulis, S. A., Fang, Y., Cayan, D. R., Pierce,
D. W., Dettinger, M., Anderson M. L., and Ralph F. M.: Observed and projected changes in snow accumulation and snowline in
California's snowy mountains, Clim. Dynam., 61, 1–16, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Wang et al.(2021)</label><mixed-citation>
      
Wang, X., Tolksdorf, V., Otto, M., and Scherer, D.: WRF-based dynamical
downscaling of ERA5 reanalysis data for High Mountain Asia: Towards a new
version of the High Asia Refined analysis, Int. J.
Climatol., 41, 743–762, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Wetterhall et al.(2005)</label><mixed-citation>
      
Wetterhall, F., Halldin, S., and Xu, C.-Y.: Statistical precipitation
downscaling in central Sweden with the analogue method, J. Hydrol.,
306, 174–190, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Wilks(2011)</label><mixed-citation>
      
Wilks, D. S.: Statistical methods in the atmospheric sciences, Vol. 100, edited by: Wilks, D. S.,
Academic press, ISBN 978-0123850225, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Yagüe et al.(1991)</label><mixed-citation>
      
Yagüe, C., Zurita, E., and Martinez, A.: Statistical analysis of the Madrid
urban heat island, Atmos. Environ. B-Urb., 25,
327–332, 1991.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Yang et al.(2005)</label><mixed-citation>
      
Yang, D., Kane, D., Zhang, Z., Legates, D., and Goodison, B.: Bias corrections
of long-term (1973–2004) daily precipitation data over the northern regions,
Geophys. Res. Lett., 32, 312–321, <a href="https://doi.org/10.1029/2005GL024057" target="_blank">https://doi.org/10.1029/2005GL024057</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Zorita and Von Storch(1999)</label><mixed-citation>
      
Zorita, E. and Von Storch, H.: The analog method as a simple statistical
downscaling technique: Comparison with more complicated methods, J.
Climate, 12, 2474–2489, 1999.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Zorita et al.(1995)</label><mixed-citation>
      
Zorita, E., Hughes, J. P., Lettemaier, D. P., and von Storch, H.: Stochastic
characterization of regional circulation patterns for climate model diagnosis
and estimation of local precipitation, J. Climate, 8, 1023–1042,
1995.

    </mixed-citation></ref-html>--></article>
