<?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"><?xmltex \makeatother\@nolinetrue\makeatletter?>
  <front>
    <journal-meta><journal-id journal-id-type="publisher">HESS</journal-id><journal-title-group>
    <journal-title>Hydrology and Earth System Sciences</journal-title>
    <abbrev-journal-title abbrev-type="publisher">HESS</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Hydrol. Earth Syst. Sci.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1607-7938</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/hess-27-2935-2023</article-id><title-group><article-title>Bayesian parameter inference in hydrological modelling using a Hamiltonian Monte Carlo approach with a stochastic rain model</article-title><alt-title>Bayesian parameter inference in hydrological modelling</alt-title>
      </title-group><?xmltex \runningtitle{Bayesian parameter inference in hydrological modelling}?><?xmltex \runningauthor{S.~Ulzega and C.~Albert}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1">
          <name><surname>Ulzega</surname><given-names>Simone</given-names></name>
          <email>simone.ulzega@zhaw.ch</email>
        <ext-link>https://orcid.org/0000-0002-8744-4266</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Albert</surname><given-names>Carlo</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-9160-9601</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Institute of Computational Life Sciences, Zurich University of Applied Sciences, Wädenswil, Switzerland</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Swiss Federal Institute of Aquatic Science and Technology, Dübendorf, Switzerland</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Simone Ulzega (simone.ulzega@zhaw.ch)</corresp></author-notes><pub-date><day>9</day><month>August</month><year>2023</year></pub-date>
      
      <volume>27</volume>
      <issue>15</issue>
      <fpage>2935</fpage><lpage>2950</lpage>
      <history>
        <date date-type="received"><day>31</day><month>August</month><year>2022</year></date>
           <date date-type="rev-request"><day>1</day><month>September</month><year>2022</year></date>
           <date date-type="rev-recd"><day>2</day><month>June</month><year>2023</year></date>
           <date date-type="accepted"><day>23</day><month>June</month><year>2023</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2023 Simone Ulzega</copyright-statement>
        <copyright-year>2023</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://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023.html">This article is available from https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023.html</self-uri><self-uri xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023.pdf">The full text article is available as a PDF file from https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d1e96">Stochastic models in hydrology are very useful and widespread tools for making reliable probabilistic predictions. However, such models are only accurate at making predictions if model parameters are first of all calibrated to measured data in a consistent framework such as the Bayesian one, in which knowledge about model parameters is described through probability distributions. Unfortunately, Bayesian parameter calibration, a. k. a. inference, with stochastic models, is often a computationally intractable problem with traditional inference algorithms, such as the Metropolis algorithm, due to the expensive likelihood functions. Therefore, the prohibitive computational cost is often overcome by employing over-simplified error models, which leads to biased parameter estimates and unreliable predictions. However, thanks to recent advancements in algorithms and computing power, fully fledged Bayesian inference with stochastic models is no longer off-limits for hydrological applications.
Our goal in this work is to demonstrate that a computationally efficient Hamiltonian Monte Carlo algorithm with a timescale separation makes Bayesian parameter inference with stochastic models feasible. Hydrology can potentially take great advantage of this powerful data-driven inference method as a sound calibration of model parameters is essential for making robust probabilistic predictions, which can certainly be useful in planning and policy-making. We demonstrate the Hamiltonian Monte Carlo approach by detailing a case study from urban hydrology. Discussing specific hydrological models or systems is outside the scope of our present work and will be the focus of further studies.</p>
  </abstract>
    
<funding-group>
<award-group id="gs1">
<funding-source>Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung</funding-source>
<award-id>200021_169295</award-id>
</award-group>
</funding-group>
</article-meta>
  </front>
<body>
      

      <?xmltex \hack{\newpage}?>
<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e110">A fundamental and highly non-trivial question in many applied sciences is how to make reliable predictions about the dynamics of a complex system. In hydrological modelling in particular, the ability of predicting extreme events like floods is obviously of paramount importance. Conceptual rainfall-runoff models that incorporate only a few state variables and a few system parameters often represent a very practical and efficient solution for making probabilistic predictions. The basic idea is to describe slow processes occurring at our observation scale by phenomenological differential equations and include all other processes as noise. Incorporating the noise in the model, where it arises, naturally leads to stochastic differential equation (SDE) models. Model parameters then need to be calibrated on observed data, usually provided in the form of noisy time series. The goal of the calibration process is to determine the parameters that allow the model to reproduce the observed data and quantify their uncertainties, expressed as probability distributions. For this purpose, Bayesian statistics is a consistent framework where our knowledge about model parameters is described by probability distributions and learning as a data-driven updating process of prior beliefs. Bayesian inference methods bear the great advantage over traditional optimization algorithms of providing an uncertainty estimation for the calibrated parameters in the form of a probability distribution. The knowledge of such uncertainty is important for making probabilistic predictions, which can in turn be a useful tool for decision-makers.
Hydrology could potentially take great advantage of more realistic stochastic models and a fast and reliable method for their calibration. However, Bayesian<?pagebreak page2936?> inference turns out to be computationally very expensive for non-trivial stochastic models.</p>
      <p id="d1e113">Uncertainty in rainfall-runoff hydrological modelling arises mostly from input errors associated with an inaccurate estimation of the integrated rainfall over a catchment <xref ref-type="bibr" rid="bib1.bibx19" id="paren.1"/>. These input errors, typically due to a combination of heterogeneous rainfall, sparse rain-gauge measurements and insufficient temporal resolution <xref ref-type="bibr" rid="bib1.bibx24 bib1.bibx31 bib1.bibx26" id="paren.2"/>, can seriously deteriorate the quality of model calibration results for heavily input-driven hydrological systems <xref ref-type="bibr" rid="bib1.bibx7" id="paren.3"/>. A variety of stochastic weather generators <xref ref-type="bibr" rid="bib1.bibx32 bib1.bibx8 bib1.bibx9 bib1.bibx27 bib1.bibx21" id="paren.4"/> have been proposed to simulate precipitation with its uncertainty. Although such weather generators can provide uncertain inputs to rainfall-runoff models and therefore reproduce the effect of rainfall errors on runoff predictive uncertainties, such input uncertainties have been largely neglected in studies focusing on model parameter inference <xref ref-type="bibr" rid="bib1.bibx34" id="paren.5"/>, probably because of the computational difficulty of including them in a likelihood function <xref ref-type="bibr" rid="bib1.bibx18" id="paren.6"/>. Input uncertainties should be included directly in the input as a stochastic contribution and then transported through the model and thereby naturally incorporated in the likelihood function describing the probability distribution of observations given model parameters. In the Bayesian framework, the sought posterior probability distribution for the model parameters is proportional to the product of the likelihood function and the prior probability distribution describing our prior knowledge about model parameters. However, it is still common practice in hydrology, as well as in other applied disciplines, to consider an over-simplified error model based on likelihood functions defined as uncorrelated normal distributions centred on the outputs of a deterministic model <xref ref-type="bibr" rid="bib1.bibx41 bib1.bibx29 bib1.bibx34" id="paren.7"/>. This inevitably leads to biased parameters and unreliable predictions <xref ref-type="bibr" rid="bib1.bibx31 bib1.bibx18 bib1.bibx10" id="paren.8"/>. Although so-called rainfall multipliers can mitigate this problem <xref ref-type="bibr" rid="bib1.bibx19 bib1.bibx35" id="paren.9"/>, they fail in assessing input uncertainties when a rainfall event is not detected by the available rain gauges <xref ref-type="bibr" rid="bib1.bibx19 bib1.bibx31" id="paren.10"/>.</p>
      <p id="d1e147"><xref ref-type="bibr" rid="bib1.bibx11" id="text.11"/> proposed a method based on an input uncertainty model describing the rainfall as a continuous stochastic process. The method is called SIP (acronym for stochastic input process). The idea of describing selected model parameters or inputs as stochastic time-dependent processes in order to take intrinsic uncertainties realistically into account in hydrological modelling has gained momentum in recent years <xref ref-type="bibr" rid="bib1.bibx37 bib1.bibx28 bib1.bibx30 bib1.bibx5" id="paren.12"/>. The SIP technique uses (i) possibly inaccurate rain-gauge precipitation data, (ii) runoff data from a flowmeter at the catchment outlet, (iii) a hydrological runoff model, (iv) a rainfall model in the form of a transformed stochastic Ornstein–Uhlenbeck (OU) process,
(v) models for rainfall and runoff observation errors, and (vi) prior distributions, to infer both the marginal posterior distributions for the parameters of interest and a “true” spatially integrated average rainfall over the catchment in a Bayesian manner. The SIP method uses the catchment as an additional rain gauge to gather information about a catchment-averaged real rain, which is inferred from both prior knowledge and observations of rainfall and runoff. Both the hydrological model describing the catchment dynamics and runoff observations are assumed to be accurate in comparison to the rainfall data. The inferred rainfall pattern can then be used to calibrate the model and significantly reduce the bias in the estimated parameters, despite the inaccuracy of the rainfall data. However, as described in detail in <xref ref-type="bibr" rid="bib1.bibx11" id="text.13"/>, the likelihood function turns out to be a high-dimensional discretized version of an infinite-dimensional path integral that makes this approach computationally demanding.</p>
      <p id="d1e158">In <xref ref-type="bibr" rid="bib1.bibx3" id="text.14"/> we presented an efficient Hamiltonian Monte Carlo (HMC)-based algorithm for the calibration of SDE models on noisy time series. The proposed HMC method, combining molecular dynamics principles with the well-known Metropolis algorithm, relies on the reinterpretation of the Bayesian posterior probability distribution as the partition function of a statistical mechanics system. This interpretation reduces the parameter inference problem to the task of simulating the dynamics of a fictitious statistical mechanics system, which can be solved in a computationally efficient way. The dynamics of the statistical mechanics system may occur on very different timescales, which can be exploited by a multiple timescale integration approach. In <xref ref-type="bibr" rid="bib1.bibx3" id="text.15"/>, the method was demonstrated using a simple, albeit general, rainfall-runoff toy model, and we claimed that the HMC algorithm, combined with the multiple timescale integration, would be applicable to a wide range of inference problems, making many SDE models amenable to a consistent Bayesian parameter inference.</p>
      <p id="d1e168">Here we combine the HMC and SIP methods to perform Bayesian inference with a stochastic input model. We show that the HMC method can be extended from the toy model and the smooth synthetic data used in <xref ref-type="bibr" rid="bib1.bibx3" id="text.16"/> to a real-world hydrological case study with real noisy rainfall and runoff time series, albeit at the cost of a somewhat substantial analytical effort. We intentionally use sparse and inaccurate precipitation data, provided by a rain gauge located far away from the catchment area, to demonstrate that a “true” average rainfall pattern can be reconstructed from the corresponding runoff data, and we compare the inferred rain to the more accurate observations obtained from rain gauges within or very close to the catchment.</p>
      <?pagebreak page2937?><p id="d1e174">The HMC method bears valuable advantages with regard to both generality and efficiency. Indeed, it is by no means limited to an OU process, unlike the original SIP approach of <xref ref-type="bibr" rid="bib1.bibx11" id="text.17"/>, which strictly requires a linear stochastic process as a rain generator. Although in this study we also opt for an OU process for the sake of simplicity, it should be clear that such a process could be arbitrarily replaced by any other stochastic process, thus giving the method significantly more flexibility in reproducing the statistical properties of real rainfall. The HMC method is also not at all limited to urban hydrology and could be applied for instance in natural catchment hydrology as well. The specific case study presented here was chosen to put emphasis on input uncertainties, which often represent the biggest source of uncertainty in hydrological modelling in general. More information on possible hydrological applications can be found in <xref ref-type="bibr" rid="bib1.bibx11" id="text.18"/>. Moreover, the HMC algorithm allows us to sample both model parameters and a true averaged rainfall pattern that are simultaneously compatible with data, models and prior distributions from the posterior probability density. This yields very high acceptance rates, even in the context of expensive high-dimensional problems, with great benefits in terms of performance and efficiency of the algorithm. Another interesting method from the family of particle filters to tackle high-dimensional inference problems for stochastic model calibration is particle Markov chain Monte Carlo (PMCMC) <xref ref-type="bibr" rid="bib1.bibx4" id="paren.19"/>, which combines piece-wise forward simulations of the stochastic model with data-based importance sampling. Like HMC, PMCMC methods can be applied to any stochastic process, including (unlike HMC) processes with discrete states (e.g. numbers of organisms in ecological models). A generally low implementation effort could be an additional argument in favour of PMCMC algorithms, which do not require the differentiation of the posterior distribution like HMC methods. However, PMCMC methods may suffer significantly in terms of efficiency when compared to an HMC-based approach. A detailed comparison, based on the same case study presented here, of different methods for Bayesian inference with stochastic models, can be found in <xref ref-type="bibr" rid="bib1.bibx6" id="text.20"/>. The HMC approach is very general and suitable for a broad range of applications requiring Bayesian inference with stochastic models. It should be noted that the method presented here is meant for offline-calibration of stochastic models, not for real-time updating, which might be needed in a model-based control setting. For the latter problem, filtering algorithms might be more appropriate, but we do not discuss this topic here. Moreover, HMC is inherently a MCMC method, and it is therefore embarrassingly parallelizable by breaking it up into an arbitrary number of independent Markov chains. This makes HMC very well suited for applications in the big-data regime or with expensive models.</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Bayesian inference with a stochastic rain model</title>
      <p id="d1e197">The SIP method of <xref ref-type="bibr" rid="bib1.bibx11" id="text.21"/> describes the rain input to a hydrological system based on an unobserved and continuous stochastic process, the rainfall potential <inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The latter should not be interpreted as a potential in the physical sense but rather as a rain generator based on a latent, i.e. “potential”, stochastic process that can be transformed into real precipitation <inline-formula><mml:math id="M2" display="inline"><mml:mi>P</mml:mi></mml:math></inline-formula> by a suitable empirical transformation <inline-formula><mml:math id="M3" display="inline"><mml:mrow><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</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>, which will be addressed below in Sect. <xref ref-type="sec" rid="Ch1.S2.SS1"/>.</p>
      <p id="d1e257">The inference process allows us to learn from noisy rainfall and runoff time series, <inline-formula><mml:math id="M4" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, respectively; the parameters <inline-formula><mml:math id="M6" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula> of the hydrological system; the uncertainties <inline-formula><mml:math id="M7" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M8" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of both rainfall and runoff observation models, respectively; and the unobserved true rainfall over the catchment expressed as a discretized rainfall potential <inline-formula><mml:math id="M9" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>, to be interpreted as an evaluation of the stochastic process <inline-formula><mml:math id="M10" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> at a discrete set of time points <inline-formula><mml:math id="M11" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="M12" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M13" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e375">For this purpose, we subdivide each interval between consecutive rain observations into <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> bins, yielding a total of <inline-formula><mml:math id="M15" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>=</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:math></inline-formula> discretization points, where <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> is the number of rain observations, that is, the length of the precipitation time series <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Analogously, the system output dimension is discretized by partitioning the intervals between consecutive runoff observations into <inline-formula><mml:math id="M18" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> sub-intervals, such that the total number of discretization points is <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>=</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> is the number of data points in <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The number of discretization points is thus the same (<inline-formula><mml:math id="M22" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>) in both rainfall and runoff dimensions, and it defines the discretization time step <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mi>T</mml:mi><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M24" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> is the total time interval covered by observations. We will provide numerical values for all these constants later in Sect. <xref ref-type="sec" rid="Ch1.S4"/>. Here, suffice it to say that the only important requirement of the method is that the total number <inline-formula><mml:math id="M25" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> of discretization points is large enough compared to the number of measurement points, <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, in order to accurately probe the fine dynamics occurring on short timescales between observations. Other features, such as for instance having the same number <inline-formula><mml:math id="M28" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> of discretization points for rainfall and runoffs, are just arbitrary choices to ease the practical implementation of the method, which could be removed without altering the results and conclusions of this work. The same holds if the observations were irregularly spaced in time, in which case one could use observation windows with more/less intermediate discretization points. Note that a large number of discretization points <inline-formula><mml:math id="M29" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>, with a fixed number of observation points, does only moderately increase the computational effort of the algorithm, since the part of the Hamiltonian dynamics that scales with <inline-formula><mml:math id="M30" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> can be calculated analytically, as shown below.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><?xmltex \currentcnt{1}?><label>Table 1</label><caption><p id="d1e599">List of model parameters that are assumed to be known, with their values and units.</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="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Parameter</oasis:entry>
         <oasis:entry colname="col2">Value</oasis:entry>
         <oasis:entry colname="col3">Units</oasis:entry>
         <oasis:entry colname="col4">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M31" display="inline"><mml:mi mathvariant="italic">τ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">636</oasis:entry>
         <oasis:entry colname="col3">s</oasis:entry>
         <oasis:entry colname="col4">Autocorrelation time of the stochastic process <inline-formula><mml:math id="M32" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M33" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">11 815.8</oasis:entry>
         <oasis:entry colname="col3">m<inline-formula><mml:math id="M34" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Catchment area</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M35" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">25</oasis:entry>
         <oasis:entry colname="col3">L s<inline-formula><mml:math id="M36" 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></oasis:entry>
         <oasis:entry colname="col4">Coefficient of transformation <inline-formula><mml:math id="M37" display="inline"><mml:mrow><mml:mi>H</mml:mi><mml:mo>(</mml:mo><mml:mi>Q</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M38" display="inline"><mml:mi mathvariant="italic">β</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">50</oasis:entry>
         <oasis:entry colname="col3">L s<inline-formula><mml:math id="M39" 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></oasis:entry>
         <oasis:entry colname="col4">Coefficient of transformation <inline-formula><mml:math id="M40" display="inline"><mml:mrow><mml:mi>H</mml:mi><mml:mo>(</mml:mo><mml:mi>Q</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{1}?></table-wrap>

      <?pagebreak page2938?><p id="d1e786">The inference goal is to sample both parameter combinations (<inline-formula><mml:math id="M41" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M42" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M43" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and realizations <inline-formula><mml:math id="M44" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> of the stochastic process <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> from a posterior distribution obeying Bayes' equation, which reads in its discretized form as
          <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M46" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>∝</mml:mo><mml:mi>f</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mi>f</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi>f</mml:mi><mml:mfenced open="(" close=")"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mfenced><mml:mi>f</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        where
<inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M48" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M49" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is the joint prior distribution for the model parameters, and
<inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M51" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M52" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M53" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>
is the <italic>likelihood</italic> expressing the probability of observed data (<inline-formula><mml:math id="M54" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) given model parameters (<inline-formula><mml:math id="M56" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M57" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M58" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and a system realization <inline-formula><mml:math id="M59" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>, weighted by the prior probability density <inline-formula><mml:math id="M60" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e1144">The stochastic process realization <inline-formula><mml:math id="M61" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> in Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) is a time series of length <inline-formula><mml:math id="M62" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>≫</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>. The high dimensionality of the problem renders the likelihood computationally expensive, thus making the inference problem intractable with traditional Bayesian inference algorithms, such as random walk Metropolis algorithms, which require a large number of likelihood evaluations.</p>
      <p id="d1e1168">On the other hand, when the inference target is only the posterior distribution for the model parameters (<inline-formula><mml:math id="M63" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M64" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M65" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and model simulations are fast, one may resort to approximate Bayesian computation (ABC) algorithms (e.g. <xref ref-type="bibr" rid="bib1.bibx2" id="altparen.22"/>), which approximate the parameters' posterior through repeated comparisons of model simulations with observations in terms of a low-dimensional set of summary statistics. However, here we are interested in the joint inference of model parameters and the real rainfall <inline-formula><mml:math id="M66" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>, which makes ABC an inefficient approach.</p>
      <p id="d1e1210">To tackle this problem, we apply a Hamiltonian Monte Carlo (HMC) algorithm <xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx25 bib1.bibx3" id="paren.23"/>, which exploits the principles of Hamiltonian dynamics to attain very high acceptance rates and low auto-correlation, even on high-dimensional sampling spaces. This makes it possible to explore such spaces with large steps, without compromising the acceptance rate and thus making the algorithm very efficient. The inherent high efficiency of HMC is further boosted here by a timescale separation analogous to the one described in <xref ref-type="bibr" rid="bib1.bibx3" id="text.24"/>.</p>
      <p id="d1e1219">The HMC algorithm allows us to sample simultaneously from the posterior of Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) both model parameters (<inline-formula><mml:math id="M67" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M68" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M69" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and realizations of the stochastic process <inline-formula><mml:math id="M70" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>. In particular, the rainfall potential <inline-formula><mml:math id="M71" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> is inferred indirectly using prior knowledge, the observed runoff <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the possibly inaccurate observed precipitation <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The discharge data are used as an indirect source of knowledge about the rainfall, which complements the unreliable information due to the sparse rain-gauge measurements.</p>
      <p id="d1e1291">The method described here requires a stochastic input process (i.e. a rainfall model), a hydrological rainfall-runoff model to describe the observed discharges <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, observation models for both rainfall and runoff, and prior probability distributions, which are all outlined below.</p>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>The rainfall model</title>
      <p id="d1e1312">The rainfall potential is described by a normal and linear Ornstein–Uhlenbeck (OU) process with mean zero and standard deviation unity, which can be written in the form of a Langevin equation as
            <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M75" display="block"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="italic">τ</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msqrt><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">τ</mml:mi></mml:mfrac></mml:mstyle></mml:msqrt><mml:mi mathvariant="italic">η</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>
          where <inline-formula><mml:math id="M76" display="inline"><mml:mrow><mml:mi mathvariant="italic">η</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> represents zero-mean Gaussian white noise, and <inline-formula><mml:math id="M77" display="inline"><mml:mi mathvariant="italic">τ</mml:mi></mml:math></inline-formula> is the process correlation time. The latter is set equal to 636 s and will not be inferred. A list of model parameters that are assumed to be known and are not inferred is given in Table <xref ref-type="table" rid="Ch1.T1"/>.</p>
      <p id="d1e1385">The rainfall potential <inline-formula><mml:math id="M78" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is then transformed into real rain <inline-formula><mml:math id="M79" display="inline"><mml:mrow><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> by the nonlinear transformation <xref ref-type="bibr" rid="bib1.bibx33 bib1.bibx1 bib1.bibx11" id="paren.25"/>:
            <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M80" display="block"><mml:mrow><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mfenced close="" open="{"><mml:mtable class="array" columnalign="left left"><mml:mtr><mml:mtd><mml:mrow><mml:mi mathvariant="italic">λ</mml:mi><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">γ</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mi mathvariant="normal">if</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>&gt;</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mrow><mml:mi mathvariant="normal">if</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>≤</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the zero–nonzero rain threshold <inline-formula><mml:math id="M81" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, the scaling factor <inline-formula><mml:math id="M82" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> and the exponent <inline-formula><mml:math id="M83" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula> are all inferred parameters. A list of all inferred parameters is shown in Table <xref ref-type="table" rid="Ch1.T2"/>. The inherent rainfall stochasticity is thus accounted for by the stochastic process of Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>), while the skewness of the rainfall distribution and a finite probability of zero rain are embedded in the model by the transformation of Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>). Note that since <inline-formula><mml:math id="M84" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> for every <inline-formula><mml:math id="M85" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>≤</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, the transformation <inline-formula><mml:math id="M86" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula> is not invertible when the precipitation is zero. We will discuss this point in detail in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2" specific-use="star"><?xmltex \currentcnt{2}?><label>Table 2</label><caption><p id="d1e1608">Prior probability densities for the inferred parameters, with their mean values (<inline-formula><mml:math id="M87" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula>), standard deviations (<inline-formula><mml:math id="M88" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula>) and units. N and LN stand for normal and log-normal distributions, respectively. Note that here, also for log-normal distributions, <inline-formula><mml:math id="M89" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M90" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula> refer to the mean value and standard deviation of a parameter, not its <inline-formula><mml:math id="M91" display="inline"><mml:mi>log⁡</mml:mi></mml:math></inline-formula>. The mean and standard deviation for the <inline-formula><mml:math id="M92" display="inline"><mml:mi>log⁡</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M94" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, respectively, are given by <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>log⁡</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:msqrt><mml:mrow><mml:msup><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msqrt><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M96" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msqrt><mml:mrow><mml:mi>log⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:msup><mml:mi mathvariant="italic">μ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:msqrt></mml:mrow></mml:math></inline-formula>.</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="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <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">Parameter</oasis:entry>
         <oasis:entry colname="col2">Prior distribution</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M97" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M98" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Units</oasis:entry>
         <oasis:entry colname="col6">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M99" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3">284.4</oasis:entry>
         <oasis:entry colname="col4">57.6</oasis:entry>
         <oasis:entry colname="col5">s</oasis:entry>
         <oasis:entry colname="col6">Retention time</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M100" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3">6</oasis:entry>
         <oasis:entry colname="col4">1</oasis:entry>
         <oasis:entry colname="col5">L s<inline-formula><mml:math id="M101" 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></oasis:entry>
         <oasis:entry colname="col6">Groundwater flow</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M102" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3">4.5</oasis:entry>
         <oasis:entry colname="col4">0.45</oasis:entry>
         <oasis:entry colname="col5">L s<inline-formula><mml:math id="M103" 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></oasis:entry>
         <oasis:entry colname="col6">Runoff observation uncertainty</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M104" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3">0.65</oasis:entry>
         <oasis:entry colname="col4">0.3</oasis:entry>
         <oasis:entry colname="col5">–</oasis:entry>
         <oasis:entry colname="col6">Rainfall observation uncertainty</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M105" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M106" display="inline"><mml:mrow><mml:mn mathvariant="normal">0.1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">60</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M107" display="inline"><mml:mrow><mml:mn mathvariant="normal">0.05</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">60</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">L s<inline-formula><mml:math id="M108" 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> m<inline-formula><mml:math id="M109" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6">Scaling factor of transformation <inline-formula><mml:math id="M110" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M111" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LN</oasis:entry>
         <oasis:entry colname="col3">0.5</oasis:entry>
         <oasis:entry colname="col4">0.25</oasis:entry>
         <oasis:entry colname="col5">–</oasis:entry>
         <oasis:entry colname="col6">Exponent of transformation <inline-formula><mml:math id="M112" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M113" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">N</oasis:entry>
         <oasis:entry colname="col3">0.5</oasis:entry>
         <oasis:entry colname="col4">0.1</oasis:entry>
         <oasis:entry colname="col5">–</oasis:entry>
         <oasis:entry colname="col6">Zero–nonzero rain threshold</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">N truncated to interval <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">0</oasis:entry>
         <oasis:entry colname="col4">5000</oasis:entry>
         <oasis:entry colname="col5">L</oasis:entry>
         <oasis:entry colname="col6">Initial water volume</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table><?xmltex \gdef\@currentlabel{2}?></table-wrap>

</sec>
<sec id="Ch1.S2.SS2">
  <label>2.2</label><title>The hydrological model</title>
      <p id="d1e2160">The storm water runoff is modelled by a linear reservoir supplied by rainfall precipitation, <inline-formula><mml:math id="M116" display="inline"><mml:mrow><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, and a constant groundwater flow, <inline-formula><mml:math id="M117" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The dynamics of the water volume <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:mi>S</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> in the reservoir is thus governed by
            <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M119" display="block"><mml:mrow><mml:mover accent="true"><mml:mi>S</mml:mi><mml:mo 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>A</mml:mi><mml:mi>P</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">M</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.25em" linebreak="nobreak"/><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">M</mml:mi></mml:msub><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:mrow><mml:mi>S</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M120" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula> is the estimated catchment area contributing to the rainfall-runoff dynamics, <inline-formula><mml:math id="M121" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">M</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the hydrological model describing the runoff at the outlet of the system and <inline-formula><mml:math id="M122" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> is the retention time of the reservoir. It should be noted that the original hydrological model used in <xref ref-type="bibr" rid="bib1.bibx11" id="text.26"/> is simplified here by omitting the daily variation due to the<?pagebreak page2939?> wastewater contribution. This is justified by the fact that in the present work we only focus on a single short dataset of 4 h, whereas in <xref ref-type="bibr" rid="bib1.bibx11" id="text.27"/> the authors consider three independent datasets covering a time span of about 48 d. One may refer to Sect. <xref ref-type="sec" rid="Ch1.S4"/> for more details.</p>
      <p id="d1e2319">The discretized form of Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) reads
            <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M123" display="block"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mi>A</mml:mi><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M124" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M125" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are <inline-formula><mml:math id="M126" display="inline"><mml:mrow><mml:mi>S</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 <inline-formula><mml:math id="M127" display="inline"><mml:mrow><mml:mi>P</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>, respectively, with <inline-formula><mml:math id="M128" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M129" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>. It should be noted that explicit methods, such as the forward Euler scheme applied in Eq. (<xref ref-type="disp-formula" rid="Ch1.E5"/>), are very easy to implement; however, they impose stringent limitations on the time step size to ensure numerical stability. In general, explicit methods might not be sufficiently accurate in regions where the solution exhibits a rapidly varying behaviour. In that case it would be advisable to apply an implicit backward scheme, numerically more stable albeit more difficult to implement. In the application discussed here, we reckon that the problem is simple enough to opt for the explicit forward scheme, thus trading off accuracy for an easier implementation. The intrinsic inaccuracy of the method is attenuated by choosing a discretization time step <inline-formula><mml:math id="M130" display="inline"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:math></inline-formula> that is sufficiently small compared to the system dynamics timescale.</p>
      <p id="d1e2479">The predicted discharge <inline-formula><mml:math id="M131" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">M</mml:mi></mml:msub><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> (<inline-formula><mml:math id="M132" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M133" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>) can be calculated recursively using Eq. (<xref ref-type="disp-formula" rid="Ch1.E5"/>) with the initial condition <inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M135" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>/</mml:mo><mml:mi>K</mml:mi></mml:mrow></mml:math></inline-formula>. Straightforward calculations then yield
            <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M136" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mi>A</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:mfenced close="]" open="["><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          where <inline-formula><mml:math id="M137" display="inline"><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> is the <inline-formula><mml:math id="M138" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula>-dependent contribution defined recursively as <inline-formula><mml:math id="M139" display="inline"><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and
            <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M140" display="block"><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mi>K</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mi>r</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi>N</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where we have used the rainfall potential transformation <inline-formula><mml:math id="M141" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> of Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>). The parameters of the hydrological model, <inline-formula><mml:math id="M142" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the initial water volume <inline-formula><mml:math id="M144" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, are unknown and to be inferred (see Table <xref ref-type="table" rid="Ch1.T2"/>), while the catchment area is known and fixed as <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:mi>A</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">11</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mn mathvariant="normal">815.8</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M146" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> (Table <xref ref-type="table" rid="Ch1.T1"/>).</p>
</sec>
<sec id="Ch1.S2.SS3">
  <label>2.3</label><title>Runoff observation model</title>
      <p id="d1e2975">The probability distribution for the observed discharges <inline-formula><mml:math id="M147" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> given the model predictions <inline-formula><mml:math id="M148" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is assumed to be a normal error model with standard deviation <inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, which reads
            <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M150" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>∝</mml:mo><mml:mi>exp⁡</mml:mi><mml:mfenced close="" open="["><mml:mrow><mml:mo>-</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfenced><mml:mi>log⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced close="]" open=""><mml:mrow><mml:mo>-</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mi>H</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:mi>H</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          where <inline-formula><mml:math id="M151" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="M152" display="inline"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M153" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, are the indices corresponding to real observations in the discretized runoff dimension, and <inline-formula><mml:math id="M154" display="inline"><mml:mi>H</mml:mi></mml:math></inline-formula> is a transformation introduced to take the heteroscedasticity of the errors into account <xref ref-type="bibr" rid="bib1.bibx11" id="paren.28"/>:
            <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M155" display="block"><mml:mrow><mml:mi>H</mml:mi><mml:mo>(</mml:mo><mml:mi>Q</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mi mathvariant="italic">β</mml:mi><mml:mi>log⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mi>sinh⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>+</mml:mo><mml:mi>Q</mml:mi></mml:mrow><mml:mi mathvariant="italic">β</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          with the parameters <inline-formula><mml:math id="M156" display="inline"><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">25</mml:mn></mml:mrow></mml:math></inline-formula> L s<inline-formula><mml:math id="M157" 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> and <inline-formula><mml:math id="M158" display="inline"><mml:mrow><mml:mi mathvariant="italic">β</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">50</mml:mn></mml:mrow></mml:math></inline-formula> L s<inline-formula><mml:math id="M159" 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> (Table <xref ref-type="table" rid="Ch1.T1"/>). Since we are only interested in terms depending on the parameters to be inferred, in Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>) we can neglect constant multiplicative factors such as the Jacobian <inline-formula><mml:math id="M160" display="inline"><mml:mrow><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>H</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>Q</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S2.SS4">
  <label>2.4</label><title>Rainfall observation model</title>
      <p id="d1e3408">The observation error model for the rainfall, given the rainfall potential <inline-formula><mml:math id="M161" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, is defined in the space of the rainfall potential as a normal distribution centred on <inline-formula><mml:math id="M162" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and with standard deviation <inline-formula><mml:math id="M163" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Its discretized form can be expressed in terms of the discretized potential <inline-formula><mml:math id="M164" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> as a product of normal distributions:
<?xmltex \hack{\newpage}?><?xmltex \hack{\vspace*{-6mm}}?>
            <disp-formula id="Ch1.E10" content-type="numbered"><label>10</label><mml:math id="M165" display="block"><mml:mrow><mml:mi>f</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is defined as the effective rainfall potential generating the observed rainfall, and <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">N</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> denotes a normal distribution with mean <inline-formula><mml:math id="M168" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula> and standard deviation <inline-formula><mml:math id="M169" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Note that in Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) the <inline-formula><mml:math id="M170" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> values with <inline-formula><mml:math id="M171" display="inline"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M172" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> are the elements of the discretized potential <inline-formula><mml:math id="M173" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> corresponding to time points where rainfall observations are available. This distribution is transformed to real rainfall by the inverse transformation <inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mi>r</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>(</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (Eq. <xref ref-type="disp-formula" rid="Ch1.E3"/>). However, since all <inline-formula><mml:math id="M175" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula> values below <inline-formula><mml:math id="M176" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are transformed to zero rain, the transformation <inline-formula><mml:math id="M177" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula> is invertible only where <inline-formula><mml:math id="M178" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>. Therefore, we need to distinguish two possible regimes, with and without rain:
<list list-type="bullet"><list-item>
      <p id="d1e3752">At time points where <inline-formula><mml:math id="M179" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, the probability density of Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) reads<disp-formula id="Ch1.E11" content-type="numbered"><label>11</label><mml:math id="M180" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>∝</mml:mo><mml:mi>exp⁡</mml:mi><mml:mfenced open="[" close=""><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mi>log⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced close="]" open=""><mml:mrow><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>r</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>×</mml:mo><mml:munder><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="script">J</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where the sum <inline-formula><mml:math id="M181" display="inline"><mml:mrow><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder></mml:mrow></mml:math></inline-formula> extends only over time points <inline-formula><mml:math id="M182" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> where <inline-formula><mml:math id="M183" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M184" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the total number of such points. Moreover, the transformation from <inline-formula><mml:math id="M185" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula> to <inline-formula><mml:math id="M186" display="inline"><mml:mi>P</mml:mi></mml:math></inline-formula> values requires the Jacobians <inline-formula><mml:math id="M187" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">J</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> defined as<disp-formula id="Ch1.E12" content-type="numbered"><label>12</label><mml:math id="M188" display="block"><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{8.8}{8.8}\selectfont$\displaystyle}?><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="script">J</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>r</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>)</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>r</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">γ</mml:mi></mml:msup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>)</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="italic">λ</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mi mathvariant="italic">γ</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">γ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula></p></list-item><list-item>
      <p id="d1e4197">At time points where <inline-formula><mml:math id="M189" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and therefore <inline-formula><mml:math id="M190" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> can take any value below <inline-formula><mml:math id="M191" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, we integrate the probability density of Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>) over the interval <inline-formula><mml:math id="M192" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∞</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>. This yields the probability of zero observed rain, which turns out to be the cumulative distribution function of the normal distribution; that is,<disp-formula id="Ch1.E13" content-type="numbered"><label>13</label><mml:math id="M193" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="[" close="]"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="normal">erf</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:msqrt><mml:mn mathvariant="normal">2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where the product <inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:munder><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder></mml:mrow></mml:math></inline-formula> extends over time points <inline-formula><mml:math id="M195" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> where <inline-formula><mml:math id="M196" display="inline"><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>.</p></list-item></list>
Therefore,
            <disp-formula id="Ch1.Ex1"><mml:math id="M197" display="block"><mml:mrow><mml:mi>f</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p><?xmltex \hack{\newpage}?>
</sec>
<?pagebreak page2940?><sec id="Ch1.S2.SS5">
  <label>2.5</label><title>The priors</title>
      <p id="d1e4526">At this point, the only elements of Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) that still need to be defined are the prior distributions <inline-formula><mml:math id="M198" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M199" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The former is simply the product of normal or log-normal univariate probability densities for each individual parameter to be inferred. The parameter vector <inline-formula><mml:math id="M202" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula> here includes the parameters of the hydrological model, <inline-formula><mml:math id="M203" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M204" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M205" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, as well as those of the transformation <inline-formula><mml:math id="M206" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula> (Eq. <xref ref-type="disp-formula" rid="Ch1.E3"/>), that is, <inline-formula><mml:math id="M207" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M208" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M209" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula>. We infer a total of eight parameters, listed in Table <xref ref-type="table" rid="Ch1.T2"/>. For the parameters <inline-formula><mml:math id="M210" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M211" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the prior densities are assumed to be normal distributions, whereas for the other parameters (<inline-formula><mml:math id="M212" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M213" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M214" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M215" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula>) the prior densities are assumed to be log-normal distributions:
            <disp-formula id="Ch1.E14" content-type="numbered"><label>14</label><mml:math id="M216" display="block"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>∝</mml:mo><mml:mi>exp⁡</mml:mi><mml:mfenced close="]" open="["><mml:mrow><mml:mo>-</mml:mo><mml:mi>log⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mi>log⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          with the mean and standard deviation <inline-formula><mml:math id="M217" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M218" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, respectively. Analogous log-normal distributions are assumed for the rainfall and discharge observation uncertainties, <inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M220" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, respectively. The prior distributions for all parameters to be inferred, with their mean values and standard deviations, are summarized in Table <xref ref-type="table" rid="Ch1.T2"/>.</p>
      <p id="d1e4816">Our prior knowledge of the rainfall potential <inline-formula><mml:math id="M221" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> is defined in terms of a function <inline-formula><mml:math id="M222" display="inline"><mml:mrow><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, called <italic>action</italic> <xref ref-type="bibr" rid="bib1.bibx22 bib1.bibx3" id="paren.29"/>, as
            <disp-formula id="Ch1.E15" content-type="numbered"><label>15</label><mml:math id="M223" display="block"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo><mml:mo>∝</mml:mo><mml:mi>exp⁡</mml:mi><mml:mfenced open="[" close="]"><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the action can be written in its discretized form for the SDE model of Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>) as (see Sect. S1 in the Supplement)
            <disp-formula id="Ch1.E16" content-type="numbered"><label>16</label><mml:math id="M224" display="block"><mml:mrow><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:mfenced open="[" close="]"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          and the initial condition for <inline-formula><mml:math id="M225" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> is specified as the marginal distribution of a standard OU process, which is a standard normal distribution for <inline-formula><mml:math id="M226" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>. It is noteworthy that the HMC method described here always requires an explicit analytical form for the action <inline-formula><mml:math id="M227" display="inline"><mml:mrow><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, which is essentially just the negative log of the prior density <inline-formula><mml:math id="M228" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, which is also needed in any other Metropolis-type sampling algorithm. Although in this study we follow the approach of <xref ref-type="bibr" rid="bib1.bibx11" id="text.30"/> and resort to a linear OU process as a precipitation generator, an analytical expression for the action is generally readily available, even for more complex and nonlinear SDE models. More details about the procedure to derive the action for generic SDE models can be found in the Supplement (Sect. S1).</p>
      <?pagebreak page2941?><p id="d1e5059">Before setting off to implement the HMC algorithm, we take one further convenient step; i.e. we apply the transformation from the coordinates <inline-formula><mml:math id="M229" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula> to the so-called staging variables <inline-formula><mml:math id="M230" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx39" id="paren.31"/> using
            <disp-formula id="Ch1.E17" content-type="numbered"><label>17</label><mml:math id="M231" display="block"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi mathvariant="normal">with</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          which leaves the components corresponding to measurement points unchanged, and
            <disp-formula id="Ch1.E18" content-type="numbered"><label>18</label><mml:math id="M232" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mspace width="0.25em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo>*</mml:mo></mml:msubsup><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mi mathvariant="normal">and</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          and with
            <disp-formula id="Ch1.E19" content-type="numbered"><label>19</label><mml:math id="M233" display="block"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo>*</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mi mathvariant="normal">−</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mi>k</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:math></disp-formula>
          for the intermediate discretization points. Also relevant are the inverse transformations for the discretization points,
            <disp-formula id="Ch1.E20" content-type="numbered"><label>20</label><mml:math id="M234" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mspace width="0.25em" linebreak="nobreak"/><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mi mathvariant="normal">with</mml:mi><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi mathvariant="normal">and</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>,</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e5515">The action <inline-formula><mml:math id="M235" display="inline"><mml:mrow><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (Eq. <xref ref-type="disp-formula" rid="Ch1.E16"/>) can be formulated in the space of <inline-formula><mml:math id="M236" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> coordinates (see Sect. S2) as
            <disp-formula id="Ch1.E21" content-type="numbered"><label>21</label><mml:math id="M237" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi mathvariant="script">S</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>k</mml:mi><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msubsup><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mfenced open="[" close=""><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced close="" open=""><mml:mrow><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mfenced open="(" close=""><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced open="" close="]"><mml:mrow><mml:msup><mml:mfenced open="" close=")"><mml:mrow><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          while the initial condition <inline-formula><mml:math id="M238" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> can be simply replaced by <inline-formula><mml:math id="M239" display="inline"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>.
This coordinate transformation, analogous to a transformation to canonical coordinates, is not a strict requirement of the HMC method and undoubtedly adds a further degree of complexity to the overall strategy. However, it also bears remarkable computational benefits. Indeed, the first term on the right-hand side of Eq. (<xref ref-type="disp-formula" rid="Ch1.E21"/>) describes the potential of a system of uncoupled harmonic oscillators, which can be effortlessly solved analytically. These dynamics also turn out to be much faster than all other characteristic timescales of the system. In Sect. <xref ref-type="sec" rid="Ch1.S3"/> we will describe in detail how this can be exploited.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>The HMC algorithm</title>
      <p id="d1e6000">The HMC algorithm interprets the negative logarithm of the posterior density as a potential energy driving the dynamics of a fictitious statistical mechanics system whose configurations, namely, the system's degrees of freedom, are described by combinations of both parameters (<inline-formula><mml:math id="M240" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M241" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M242" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and realizations <inline-formula><mml:math id="M243" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> of the stochastic process <inline-formula><mml:math id="M244" display="inline"><mml:mrow><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The degrees of freedom of the system are coupled to conjugate variables, that is, to momenta <inline-formula><mml:math id="M245" display="inline"><mml:mi mathvariant="bold-italic">π</mml:mi></mml:math></inline-formula>, paired with the parameters (<inline-formula><mml:math id="M246" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M247" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M248" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>), and <inline-formula><mml:math id="M249" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula>, paired with the realizations <inline-formula><mml:math id="M250" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>. The posterior density of Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) can be rewritten in the following discretized form:
          <disp-formula id="Ch1.E22" content-type="numbered"><label>22</label><mml:math id="M251" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi>f</mml:mi></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>∝</mml:mo><mml:mo movablelimits="false">∫</mml:mo><mml:mi>exp⁡</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced open="[" close="]"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>;</mml:mo><mml:mi mathvariant="bold-italic">π</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="bold-italic">π</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="bold-italic">p</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        with the Hamiltonian <inline-formula><mml:math id="M252" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> defined as
          <disp-formula id="Ch1.E23" content-type="numbered"><label>23</label><mml:math id="M253" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>;</mml:mo><mml:mi mathvariant="bold-italic">π</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">p</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>log⁡</mml:mi><mml:mfenced close="" open="["><mml:mrow><mml:mi>f</mml:mi><mml:mfenced close="" open="("><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∣</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced open="" close="]"><mml:mfenced close=")" open=""><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="normal">p</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">π</mml:mi><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>m</mml:mi><mml:mi mathvariant="italic">α</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><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:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>p</mml:mi><mml:mi>i</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        where <inline-formula><mml:math id="M254" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="normal">p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the number of parameters to be inferred (eight in our case). We have introduced two auxiliary terms on the right-hand side using the vectors of momenta <inline-formula><mml:math id="M255" display="inline"><mml:mi mathvariant="bold-italic">π</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M256" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula>, akin to the kinetic energies associated with the degrees of freedom of the fictitious statistical mechanics system.</p>
      <p id="d1e6421">The masses <inline-formula><mml:math id="M257" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mi mathvariant="italic">α</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M258" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are tuning parameters of the algorithm. Since we want the coordinates <inline-formula><mml:math id="M259" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> corresponding to actual observations to be more tightly constrained than those corresponding to the intermediate discretization points, we set <inline-formula><mml:math id="M260" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:math></inline-formula> with <inline-formula><mml:math id="M261" display="inline"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M262" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, for the “heavy” measurement points, and <inline-formula><mml:math id="M263" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:math></inline-formula> with <inline-formula><mml:math id="M264" display="inline"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M266" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>, …, <inline-formula><mml:math id="M267" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, for the “lighter” intermediate discretization points, with <inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:mi>M</mml:mi><mml:mo>≫</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e6594">The potential energy, proportional to <inline-formula><mml:math id="M269" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mi>log⁡</mml:mi><mml:mo>[</mml:mo><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M270" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M271" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M272" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M273" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>, guarantees that each state of the system is compatible with the observations and constrained within their measurement uncertainties, as well as with the prior distributions for both model parameters and rainfall potential realizations <inline-formula><mml:math id="M274" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e6674">The HMC algorithm iterates the following steps. First, vectors of momenta <inline-formula><mml:math id="M275" display="inline"><mml:mi mathvariant="bold-italic">π</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M276" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula> are drawn from the zero-mean normal distributions defined by the kinetic terms in Eq. (<xref ref-type="disp-formula" rid="Ch1.E23"/>). Then, the system is left to evolve for a fictitious time interval <inline-formula><mml:math id="M277" display="inline"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow></mml:math></inline-formula> in the (<inline-formula><mml:math id="M278" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M279" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M280" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M281" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>; <inline-formula><mml:math id="M282" display="inline"><mml:mi mathvariant="bold-italic">π</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M283" display="inline"><mml:mi mathvariant="bold-italic">p</mml:mi></mml:math></inline-formula>) phase space according to Hamilton's equations. This Hamiltonian dynamics is controlled by tuning the fictitious masses in Eq. (<xref ref-type="disp-formula" rid="Ch1.E23"/>), which represent the variances of the normal distributions for the corresponding momenta. Finally, the discretization error on the energy conservation introduced with the integration of Hamilton's equations is corrected by a Metropolis accept/reject step. The resulting marginal distributions of the Markov chains of the system configurations (<inline-formula><mml:math id="M284" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M285" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M286" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M287" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) represent a sample of the sought posterior density. The method is described in detail in <xref ref-type="bibr" rid="bib1.bibx3" id="text.32"/>.</p>
      <?pagebreak page2942?><p id="d1e6797">Note that the presence of pronounced local minima in a high-dimensional phase space might represent an insurmountable obstacle, even for more refined implementations of the HMC method, for example, with automatic tuning of the algorithm hyper-parameters (see Sect. <xref ref-type="sec" rid="Ch1.S4.SS1"/> for more details). In that case one would have to resort to further enhancements such as metadynamics <xref ref-type="bibr" rid="bib1.bibx20" id="paren.33"/> or parallel tempering <xref ref-type="bibr" rid="bib1.bibx36 bib1.bibx23 bib1.bibx13" id="paren.34"/>. However, this is not an issue in the specific application discussed here.</p>
      <p id="d1e6808">Using Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) and the definitions given in Sect. <xref ref-type="sec" rid="Ch1.S2.SS1"/>–<xref ref-type="sec" rid="Ch1.S2.SS5"/>, we write the HMC Hamiltonian as
          <disp-formula id="Ch1.E24" content-type="numbered"><label>24</label><mml:math id="M288" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where the three components describe dynamics occurring on different timescales. Let us consider them individually. The first component,
          <disp-formula id="Ch1.E25" content-type="numbered"><label>25</label><mml:math id="M289" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mfenced open="[" close="]"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>m</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>k</mml:mi><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        contains the harmonic term for the intermediate discretization points from the action of Eq. (<xref ref-type="disp-formula" rid="Ch1.E21"/>) and scales as the total number of discretization points <inline-formula><mml:math id="M290" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula>. The second component,
          <disp-formula id="Ch1.E26" content-type="numbered"><label>26</label><mml:math id="M291" display="block"><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{8.8}{8.8}\selectfont$\displaystyle}?><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>p</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>M</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>H</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">s</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:mi>H</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfenced><mml:mi>log⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:mfenced open="[" close=""><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>r</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mi mathvariant="normal">obs</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced close="]" open=""><mml:mrow><mml:mo>+</mml:mo><mml:mi>log⁡</mml:mi><mml:msub><mml:mi mathvariant="script">J</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>P</mml:mi><mml:mo>≠</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mi>log⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:munder><mml:mi>log⁡</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced close="]" open="["><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="normal">erf</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:msqrt><mml:mn mathvariant="normal">2</mml:mn></mml:msqrt></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>
        contains a harmonic term for the measurement points from Eq. (<xref ref-type="disp-formula" rid="Ch1.E21"/>) and the observation error models <inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M293" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M294" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M295" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M296" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> from Sect. <xref ref-type="sec" rid="Ch1.S2.SS3"/> and <xref ref-type="sec" rid="Ch1.S2.SS4"/>, respectively. All the components of Eq. (<xref ref-type="disp-formula" rid="Ch1.E26"/>) scale as the number of observations <inline-formula><mml:math id="M297" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> or <inline-formula><mml:math id="M298" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Note that both the observation models for runoff and rainfall are rewritten in the space of <inline-formula><mml:math id="M299" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula>-coordinates. While the coordinate transformation <inline-formula><mml:math id="M300" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula> is straightforward for the rainfall observation model, which only depends on measurement points, it is somewhat more cumbersome for the runoff observation model, which requires the <inline-formula><mml:math id="M301" display="inline"><mml:mi mathvariant="italic">ξ</mml:mi></mml:math></inline-formula>-dependent component <inline-formula><mml:math id="M302" display="inline"><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> (see Eqs. <xref ref-type="disp-formula" rid="Ch1.E6"/> and <xref ref-type="disp-formula" rid="Ch1.E7"/>) to be rewritten in the <inline-formula><mml:math id="M303" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> space as <inline-formula><mml:math id="M304" display="inline"><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>u</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula>. Such transformation is described in Sect. S3. The third component of the Hamiltonian <inline-formula><mml:math id="M305" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is
<?xmltex \hack{\newpage}?><?xmltex \hack{\vspace*{-6mm}}?>
          <disp-formula id="Ch1.E27" content-type="numbered"><label>27</label><mml:math id="M306" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="normal">p</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">π</mml:mi><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>m</mml:mi><mml:mi mathvariant="italic">α</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow><mml:mn mathvariant="normal">4</mml:mn></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="italic">τ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mfenced open="[" close=""><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced open="" close=""><mml:mrow><mml:mo>+</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mfenced open="(" close=""><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>l</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>l</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mfenced open="" close="]"><mml:mrow><mml:msup><mml:mfenced open="" close=")"><mml:mrow><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>s</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mi mathvariant="normal">N</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="italic">θ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>+</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mfenced close="]" open="["><mml:mrow><mml:mi>log⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mi>log⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi mathvariant="normal">LN</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:mrow><mml:mi mathvariant="normal">LN</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
        which includes the remaining terms from the rainfall potential prior (Eq. <xref ref-type="disp-formula" rid="Ch1.E15"/>) and the model parameter priors. The latter, i.e. the last two terms in Eq. (<xref ref-type="disp-formula" rid="Ch1.E27"/>), are sums over the parameters <inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mi mathvariant="normal">N</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M309" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mi mathvariant="normal">LN</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mi>K</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, whose prior densities are normal and log-normal distributions, respectively. Note the sign change in front of the term <inline-formula><mml:math id="M310" display="inline"><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>/</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula> with respect to Eq. (<xref ref-type="disp-formula" rid="Ch1.E21"/>) due to the initial condition for <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> (see Eq. <xref ref-type="disp-formula" rid="Ch1.E15"/>). The component <inline-formula><mml:math id="M312" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> does not grow unbounded with either <inline-formula><mml:math id="M313" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> or <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> or <inline-formula><mml:math id="M315" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> (notice that <inline-formula><mml:math id="M316" display="inline"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi><mml:mo>∝</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:math></inline-formula>).</p>
      <p id="d1e8235">Let us now exploit the different timescales characterizing the three components of the Hamiltonian <inline-formula><mml:math id="M317" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. We assume the regime <inline-formula><mml:math id="M318" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>≫</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>≈</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, implying that the number of data points is not too large and that the total number of discretization points is instead large compared to the number of data points. Under these conditions, the dynamics of the system occur on very different timescales. In particular, the dynamics described by <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>N</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are much faster than the other components of the Hamiltonian and therefore impose the most stringent limitations on the step size for the numerical integration of Hamilton equations. However, we use Trotter's formula <xref ref-type="bibr" rid="bib1.bibx38" id="paren.35"/> to construct a reversible molecular dynamics integrator to take the different timescales into account as described in <xref ref-type="bibr" rid="bib1.bibx3" id="text.36"/>. In particular, we exploit the fact that the much faster dynamics of the intermediate discretization points described by <inline-formula><mml:math id="M320" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>N</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is analogous to a system of uncoupled harmonic oscillators that can be solved analytically. This analytical solution gives a significant boosting contribution to the intrinsic efficiency of the HMC algorithm. The “slow” remaining components of the Hamiltonian, <inline-formula><mml:math id="M321" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M322" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, can be integrated using a much larger integration step, which allows us to explore the high-dimensional parameter space of the system with remarkable efficiency.</p>
      <p id="d1e8325">As explained in <xref ref-type="bibr" rid="bib1.bibx3" id="text.37"/>, the decoupling of the different dynamics and the analytical solution of the expensive fast component is always possible for one-dimensional SDE models. It is also possible in the case of multiple independent variables, where the decoupling procedure can be applied to each of them individually. In this way, our HMC approach covers a significant range of possible hydrological modelling scenarios. However, in this work we focus only<?pagebreak page2943?> on 1D models, leaving the exploration of higher-dimensional models to future studies.</p>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Case study</title>
      <p id="d1e8340">In this work we apply a HMC method with a stochastic input model (SIP) following <xref ref-type="bibr" rid="bib1.bibx11" id="text.38"/> to investigate the rainfall-runoff dynamics of an urban catchment based on real rainfall and runoff observations. The catchment is a small and fast-reacting sewer network in Adliswil, near Zurich, Switzerland. Two typical scenarios of possible rainfall data are considered here; that is, we use the following: (1) high-resolution data, with a time resolution of 1 min, recorded by two pluviometers (denoted P1<inline-formula><mml:math id="M323" display="inline"><mml:msub><mml:mi/><mml:mi>a</mml:mi></mml:msub></mml:math></inline-formula> and P1<inline-formula><mml:math id="M324" display="inline"><mml:msub><mml:mi/><mml:mi>b</mml:mi></mml:msub></mml:math></inline-formula>) located in the immediate vicinity of the catchment area, and (2) low-resolution data, with a time resolution of 10 min, recorded by a pluviometer (denoted P2) located further away from the catchment, at a distance of about 6 km. We shall refer to the two scenarios as scenario 1 (Sc1) and scenario 2 (Sc2), respectively. More information can be found in <xref ref-type="bibr" rid="bib1.bibx11" id="text.39"/>.</p>
      <p id="d1e8367">The precipitation data <inline-formula><mml:math id="M325" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> used in this study contain <inline-formula><mml:math id="M326" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>=</mml:mo><mml:mn mathvariant="normal">241</mml:mn></mml:mrow></mml:math></inline-formula> observations in Sc1 and <inline-formula><mml:math id="M327" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>=</mml:mo><mml:mn mathvariant="normal">25</mml:mn></mml:mrow></mml:math></inline-formula> observations in Sc2, covering a total observation time <inline-formula><mml:math id="M328" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">240</mml:mn></mml:mrow></mml:math></inline-formula> min. The initial and final observation time points are the same for both scenarios and include a storm event that took place in the evening of 10 June 2013, approximately between 18:00 and 20:00 LT. We should mention here a substantial difference with respect to <xref ref-type="bibr" rid="bib1.bibx11" id="text.40"/>. In their work, the authors base the inference process on three independent time series covering a total observation time of 1710 min distributed over a time span of 48 d. In the work presented here, instead, we consider only the first of the three time series, which also happens to be the shortest. Although the HMC algorithm could deal with the multiple independent time series used by <xref ref-type="bibr" rid="bib1.bibx11" id="text.41"/>, our simplification finds its justification in that it reduces the computational requirements of the problem, without compromising the goal of our work, that is, showing the feasibility of Bayesian inference of both model parameters and high-dimensional system states (i.e. the <inline-formula><mml:math id="M329" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>'s) under the considerable hardship of a stochastic input process.</p>
      <p id="d1e8445">The discharge flow at the outlet of the catchment was measured with a time resolution of 4 min, and the output observations <inline-formula><mml:math id="M330" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, containing <inline-formula><mml:math id="M331" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>=</mml:mo><mml:mn mathvariant="normal">61</mml:mn></mml:mrow></mml:math></inline-formula> measurements, are the same for both scenarios and considered accurate compared to the precipitation data. The initial and final observation times are the same as for the input time series. The time series for the observed outputs (<inline-formula><mml:math id="M332" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) as well as the observed precipitation (<inline-formula><mml:math id="M333" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) for both Sc1 and Sc2 are shown in Fig. <xref ref-type="fig" rid="Ch1.F5"/>.</p>
      <p id="d1e8502">Scenario 1 represents a best-case scenario of input data availability, and we shall therefore classify it as the accurate input scenario, while scenario 2 is a typical example of inaccurate and unreliable input data due to both its sparsity and the distance of the P2 rain gauge from the area of interest. The runoff observations <inline-formula><mml:math id="M334" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> exhibit an important rainfall event (the storm) represented by an evident discharge peak. While this event is properly recorded by the rain gauges of Sc1, the inaccurate input data of Sc2 misleadingly recorded the event at an earlier time period, presumably when the storm passed over the location of the distant pluviometer P2.</p>
      <p id="d1e8517">We are particularly interested in the performance of the combined SIP-HMC method in the latter case, characterized by faulty precipitation data, which clearly represents the most challenging scenario and therefore the hardest test for the HMC method. Therefore, our work consists of three main steps. First, we use the combined SIP-HMC approach described above, with the inaccurate precipitation data <inline-formula><mml:math id="M335" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of Sc2, to calibrate the model and infer the unknown “true” average rainfall pattern over the catchment. Then, we use the accurate rainfall observations from Sc1 as a reference to assess the quality of the simulated “true” rain. Finally, we repeat the calibration process using the accurate data of Sc1 as a further validation for the method.</p>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Implementation</title>
      <p id="d1e8538">The HMC algorithm is implemented in C<inline-formula><mml:math id="M336" display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>14 using the open-source ADEPT library (Automatic Differentiation using Expression Templates, version 1.1) for the calculation of the gradients of the Hamiltonian <inline-formula><mml:math id="M337" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx17" id="paren.42"/>. Automated differentiation allows us to automatize the algorithm to a large extent, thus making it applicable to a broad range of models with relatively little implementation effort. Indeed, for the hydrological application presented here we resorted to the algorithm already implemented for the simpler toy model studied in <xref ref-type="bibr" rid="bib1.bibx3" id="text.43"/>. The implementation of the algorithm remained essentially unaltered, except only for the Hamiltonian <inline-formula><mml:math id="M338" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> that had to be modified according to Eqs. (<xref ref-type="disp-formula" rid="Ch1.E25"/>)–(<xref ref-type="disp-formula" rid="Ch1.E27"/>).</p>
      <p id="d1e8584">The simulations were run on 2.6–3.7 GHz processors Xeon-Gold 6142 with 196 GB of memory. We observed a relatively short burn-in phase for all inferred parameters, suggesting the possibility of a straightforward (embarrassingly simple) parallelization of the algorithm obtained by simply breaking up the Markov chains into smaller independent chains that can then be executed as parallel processes. It is well known that Markov Chain Monte Carlo (MCMC) methods, like the HMC algorithm employed here, are indeed very well suited for parallel computing. This kind of approach was proven successful in <xref ref-type="bibr" rid="bib1.bibx3" id="text.44"/> with a toy system. In that case we used an OpenMP-based parallel implementation of the algorithm and observed a reasonably linear strong scaling behaviour with up to 16 parallel processes.</p>
      <p id="d1e8590">In the present work, for Sc2, after an initial single burn-in chain of 75 000 steps, which is then disregarded, we limited ourselves to running four independent Markov chains each of length 100 000 steps based on a serial implementation of the algorithm. For Sc1, which is faster than Sc2 due to the<?pagebreak page2944?> much smaller number of intermediate discretization points (see below for more details), we considered a single chain of 750 000 steps and disregarded the first 150 000 steps. The extension of the current serial version to an OpenMP parallel implementation of the HMC code would be straightforward.</p>
      <p id="d1e8593">We set a fine-grid time step <inline-formula><mml:math id="M339" display="inline"><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> s and a total number of discretization points <inline-formula><mml:math id="M340" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1441</mml:mn></mml:mrow></mml:math></inline-formula> for both scenarios. It is easy to verify that these conditions are fulfilled by setting the number of bins between consecutive observations to <inline-formula><mml:math id="M341" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">6</mml:mn></mml:mrow></mml:math></inline-formula> or <inline-formula><mml:math id="M342" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>P</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">60</mml:mn></mml:mrow></mml:math></inline-formula> on the precipitation dimension for Sc1 and Sc2, respectively, and <inline-formula><mml:math id="M343" display="inline"><mml:mrow><mml:msub><mml:mi>j</mml:mi><mml:mi>Q</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">24</mml:mn></mml:mrow></mml:math></inline-formula> for the runoff dimension. The initial configuration of the system state <inline-formula><mml:math id="M344" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> for the burn-in chain is a random realization of the OU process of Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>), while the parameters are set equal to the mean values of their prior distributions (see Table <xref ref-type="table" rid="Ch1.T2"/>).</p>
      <p id="d1e8680">The algorithm requires tuning of two sets of parameters, that is, the parameters defining the Hamiltonian propagator in the molecular dynamics part of the HMC algorithm (see Eq. 26 in <xref ref-type="bibr" rid="bib1.bibx3" id="altparen.45"/>) and the masses <inline-formula><mml:math id="M345" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M346" display="inline"><mml:mi>M</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M347" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mi mathvariant="italic">α</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> defining the kinetic energy of the system in <inline-formula><mml:math id="M348" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Thus, in the Hamiltonian propagator we set the integration time <inline-formula><mml:math id="M349" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.015</mml:mn></mml:mrow></mml:math></inline-formula> and the number of integration steps <inline-formula><mml:math id="M350" display="inline"><mml:mrow><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula>, while the masses were set to <inline-formula><mml:math id="M351" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.4</mml:mn></mml:mrow></mml:math></inline-formula>  for the intermediate discretization points and <inline-formula><mml:math id="M352" display="inline"><mml:mrow><mml:mi>M</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.6</mml:mn></mml:mrow></mml:math></inline-formula> for the measurement points. The masses for the inferred parameters are given in Table <xref ref-type="table" rid="Ch1.T3"/>.</p>
      <p id="d1e8775">It should be noted that the integration time interval of the Hamiltonian propagator could be automatically optimized by employing the so-called No-U-Turn Sampler (NUTS) <xref ref-type="bibr" rid="bib1.bibx16" id="paren.46"/>, and the masses of the kinetic terms could be tuned by adapting their values to the curvature of the energy landscape <xref ref-type="bibr" rid="bib1.bibx14 bib1.bibx15" id="paren.47"/>. The efficiency of the HMC algorithm would surely benefit from these approaches but at some cost in terms of implementation efforts. In this work we simply opt for a manual tuning of the hyper-parameters mentioned above.</p>
      <p id="d1e8784">In Sc2, a full Markov chain of 100 000 steps requires approximately 1 h and 20 min on our hardware, while a chain of 750 000 in Sc1 requires about 2.5 h. At each iteration of the chain, the algorithm infers 1449 parameters, that is, eight model parameters (<inline-formula><mml:math id="M353" display="inline"><mml:mi mathvariant="bold-italic">θ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M354" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M355" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and <inline-formula><mml:math id="M356" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1441</mml:mn></mml:mrow></mml:math></inline-formula> coordinates of the system state <inline-formula><mml:math id="M357" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e8835">The algorithm spends <inline-formula><mml:math id="M358" display="inline"><mml:mrow><mml:mo>≈</mml:mo><mml:mn mathvariant="normal">96</mml:mn></mml:mrow></mml:math></inline-formula> % of the total run time in the molecular dynamics part, that is, in the loop for the integration of Hamilton's equations. The loop is called once in each step of the Markov chain. At each call, the HMC algorithm performs one evaluation of the posterior function <inline-formula><mml:math id="M359" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, for the calculation of the system energy, and six evaluations of its derivatives (with <inline-formula><mml:math id="M360" display="inline"><mml:mrow><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> integration steps). In our case study and implementation of the algorithm, each differentiation of the posterior function turns out to be about 6 times more expensive than its plain evaluation. Although this factor is only indicative and may vary to some extent between different implementations, the calculation of the derivatives in general represents the major bottleneck in the performance of the HMC algorithm.</p>

<?xmltex \floatpos{t!}?><table-wrap id="Ch1.T3"><?xmltex \currentcnt{3}?><label>Table 3</label><caption><p id="d1e8874">Parameter masses <inline-formula><mml:math id="M361" display="inline"><mml:mrow><mml:msub><mml:mi>m</mml:mi><mml:mi mathvariant="italic">α</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for the kinetic term of Eq. (<xref ref-type="disp-formula" rid="Ch1.E27"/>).</p></caption><oasis:table frame="topbot"><?xmltex \begin{scaleboxenv}{.86}[.86]?><oasis:tgroup cols="9">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="center"/>
     <oasis:colspec colnum="3" colname="col3" align="center"/>
     <oasis:colspec colnum="4" colname="col4" align="center"/>
     <oasis:colspec colnum="5" colname="col5" align="center"/>
     <oasis:colspec colnum="6" colname="col6" align="center"/>
     <oasis:colspec colnum="7" colname="col7" align="center"/>
     <oasis:colspec colnum="8" colname="col8" align="center"/>
     <oasis:colspec colnum="9" colname="col9" align="center"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Parameter</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M362" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M363" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M364" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M365" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6"><inline-formula><mml:math id="M366" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col7"><inline-formula><mml:math id="M367" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col8"><inline-formula><mml:math id="M368" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col9"><inline-formula><mml:math id="M369" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">Mass</oasis:entry>
         <oasis:entry colname="col2">10<inline-formula><mml:math id="M370" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">1.0</oasis:entry>
         <oasis:entry colname="col4">1.0</oasis:entry>
         <oasis:entry colname="col5">1.0</oasis:entry>
         <oasis:entry colname="col6"><inline-formula><mml:math id="M371" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">5</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col7">0.5</oasis:entry>
         <oasis:entry colname="col8">15.0</oasis:entry>
         <oasis:entry colname="col9">10<inline-formula><mml:math id="M372" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">7</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup><?xmltex \end{scaleboxenv}?></oasis:table><?xmltex \gdef\@currentlabel{3}?></table-wrap>

</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Results</title>
      <p id="d1e9086">The Markov chains for the model parameters generated using the unreliable input data of Sc2 are shown in Fig. <xref ref-type="fig" rid="Ch1.F1"/>. A simple visual inspection leads us to conclude with a good confidence that the chains have appropriately converged, and the mixing in parameters space is satisfactory. Figure <xref ref-type="fig" rid="Ch1.F2"/> shows the Markov chains for the same model parameters, generated using the accurate rainfall observations of Sc1. The corresponding marginal posterior probability densities for the model parameters, for both Sc2 and Sc1, are shown in Fig. <xref ref-type="fig" rid="Ch1.F3"/> together with the initial prior distributions.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1" specific-use="star"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Figure}?><label>Figure 1</label><caption><p id="d1e9097">Markov chains for the model parameters generated using the faulty input data of Sc2. As explained in Sect. <xref ref-type="sec" rid="Ch1.S4.SS1"/>, we have four independent chains for each parameter.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023-f01.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Figure}?><label>Figure 2</label><caption><p id="d1e9110">Markov chains for the model parameters from Sc1. Unlike Sc2, we have a single chain for each parameter in this case.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023-f02.png"/>

        </fig>

      <p id="d1e9120">The two scenarios bear some interesting albeit not surprising differences. In general, the posterior distributions generated in Sc1 tend to be narrower than the corresponding distributions in Sc2, clearly reflecting the accuracy of the precipitation data. The rainfall observational error <inline-formula><mml:math id="M373" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> appears to be also strongly shifted to lower values in Sc1, indicative of the reduced uncertainty compared to the faulty Sc2. On the other hand, the practically identical posterior densities for the runoff observational error <inline-formula><mml:math id="M374" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> reflect the fact that the discharge data <inline-formula><mml:math id="M375" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the same for both scenarios.</p>
      <p id="d1e9156">Moreover, Fig. <xref ref-type="fig" rid="Ch1.F3"/> shows that among the rain-related parameters of the transformation of Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>), the marginal posterior for the exponent <inline-formula><mml:math id="M376" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula> exhibits the largest shift towards smaller values when going from Sc2 to Sc1, while the zero–nonzero rain threshold <inline-formula><mml:math id="M377" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is only mildly shifted to larger values, and the scaling factor <inline-formula><mml:math id="M378" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> seems to be essentially unaltered, besides the narrowing effect due to the improved accuracy of the precipitation data. The algorithm automatically tunes the parameters of the rainfall potential transformation to match the available rainfall data. The smaller value of the exponent <inline-formula><mml:math id="M379" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula> in Sc1 compared to Sc2 reflects this attempt of the algorithm to find a better fit to the rain observations, especially where precipitation values are large.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Figure}?><label>Figure 3</label><caption><p id="d1e9198">Marginal posterior probability densities for the model parameters from Sc2 (thick black line) and Sc1 (thin grey line). The dashed lines represent the prior densities.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023-f03.png"/>

        </fig>

      <p id="d1e9207">Among the parameters of the hydrological model, the marginal distribution of the retention time <inline-formula><mml:math id="M380" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> appears to be clearly shifted to smaller values in Sc1, suggesting a faster reacting system compared to Sc2, while the groundwater contributions <inline-formula><mml:math id="M381" display="inline"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi mathvariant="normal">gw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and the initial water volume <inline-formula><mml:math id="M382" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> exhibit only very minor shifts.</p>
      <?pagebreak page2945?><p id="d1e9239">In Fig. <xref ref-type="fig" rid="Ch1.F4"/> we also show two typical Markov chains from Sc2 for the stochastic process <inline-formula><mml:math id="M383" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula>, evaluated at two time points with and without rain. The two chains clearly fluctuate above (point with rain) and below (point without rain) the inferred zero–nonzero rain threshold <inline-formula><mml:math id="M384" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Analogously to the model parameters, the Markov chains for <inline-formula><mml:math id="M385" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> appear to have converged and to be well mixed. The <inline-formula><mml:math id="M386" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> chains in Sc1 are qualitatively identical to those of Sc2 and are not shown here.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Figure}?><label>Figure 4</label><caption><p id="d1e9279">Typical Markov chains for two different points of the stochastic process <inline-formula><mml:math id="M387" display="inline"><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:math></inline-formula> from Sc2, with <bold>(a)</bold> and without <bold>(b)</bold> rain. The horizontal solid line is the median of the inferred zero–nonzero rain threshold <inline-formula><mml:math id="M388" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ξ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, while the shaded area represents its uncertainty given by the 2.5 and 97.5 percentiles. As in Fig. <xref ref-type="fig" rid="Ch1.F1"/>, we have four independent chains for each point.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023-f04.png"/>

        </fig>

      <p id="d1e9314">In the left panels of Fig. <xref ref-type="fig" rid="Ch1.F5"/> we compare the inferred discharge and rainfall patterns, <inline-formula><mml:math id="M389" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">M</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M390" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, respectively, based on the inaccurate rainfall data of Sc2, with the observed runoff <inline-formula><mml:math id="M391" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">Q</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and precipitation <inline-formula><mml:math id="M392" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The measured outflow (upper panel, open red squares) clearly exhibits discharge peaks that are coupled to corresponding peaks in the observed rainfall in Sc1 (lower panel, open purple squares) but not in Sc2 (lower panel, filled blue squares). These “missing” peaks are indications that some rainfall events were either not detected or recorded at a different time point by the rain gauge (P2) that produced these data. This is of course in line with the inaccuracy of Sc2.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5" specific-use="star"><?xmltex \currentcnt{5}?><?xmltex \def\figurename{Figure}?><label>Figure 5</label><caption><p id="d1e9378">Comparison of observed and predicted discharges <bold>(a, b)</bold> and rainfall <bold>(c, d)</bold>, based on Sc2 <bold>(a, c)</bold> and Sc1 <bold>(b, d)</bold> data. Predictions are represented by the median (black line) of the corresponding inferred distributions and a confidence interval given by the 2.5 and 97.5 percentiles (grey area). In the bottom panels the predicted rain is compared with both the inaccurate data of Sc2 (filled squares) and the accurate data of Sc1 (open squares).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://hess.copernicus.org/articles/27/2935/2023/hess-27-2935-2023-f05.png"/>

        </fig>

      <p id="d1e9399">The observed output peaks are used by the HMC algorithm as an additional source of information about the rain falling over the catchment area during the observation time. This new information, together with the stochastic input model, is used to attempt a reconstruction of a true rainfall pattern. The simulated rainfall and outflow patterns are represented by the medians of their inferred distributions (black line) and an uncertainty given by the 2.5 %–97.5 % quantiles (grey area). The rainfall pattern reconstructed using the inaccurate data of Sc2 (lower left panel) clearly displays the peaks corresponding to the rainfall events that had been missed by the<?pagebreak page2946?> pluviometer P2 located away from the catchment (filled blue squares). Such predicted peaks reproduce the rainfall events detected in Sc1 by the rain gauges P1<inline-formula><mml:math id="M393" display="inline"><mml:msub><mml:mi/><mml:mi>a</mml:mi></mml:msub></mml:math></inline-formula> and P1<inline-formula><mml:math id="M394" display="inline"><mml:msub><mml:mi/><mml:mi>b</mml:mi></mml:msub></mml:math></inline-formula> in the proximity of the area of interest (open purple squares) very accurately in both time and duration.</p>
      <p id="d1e9420">The right panels of Fig. <xref ref-type="fig" rid="Ch1.F5"/> compare runoff and precipitation observations with the inferred discharge and rainfall patterns in the accurate framework of Sc1. Although the simulated rain in Sc1 features somewhat less intense peaks than in Sc2, the remarkable fact that emerges from the comparison of the left and right panels of Fig. <xref ref-type="fig" rid="Ch1.F5"/> (referring to Sc2 and Sc1, respectively) is that the rainfall patterns predicted in the two scenarios are qualitatively very similar, despite the significant difference in the accuracy of the data used for the inference.</p>
      <p id="d1e9428">Although not shown here, we have also run the HMC inference without rainfall data at all, i.e. omitting the term <inline-formula><mml:math id="M395" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">P</mml:mi><mml:mi mathvariant="normal">obs</mml:mi></mml:msub><mml:mo>∣</mml:mo><mml:mi mathvariant="bold-italic">ξ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M396" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="italic">ξ</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> in the posterior density, obtaining both model parameter marginals and a predicted rainfall pattern that are substantially identical to those obtained with the inaccurate data of Sc2. Essentially, in Sc2 the HMC algorithm “learns” that the observed rain is unreliable and should thus be ignored. However, in most applications, the accuracy and reliability of the measured precipitation data is unknown a priori. In those cases the rainfall observations can be safely used in the inference process, since the algorithm itself will assess its accuracy and possibly disregard it in favour of a more reliable reconstructed rainfall.</p>
      <p id="d1e9463">The inferred outflows, shown in the upper panels of Fig. <xref ref-type="fig" rid="Ch1.F5"/> match the observations very well and are essentially<?pagebreak page2947?> identical, compatible with the assumption that runoff data are accurate and the same for the two scenarios.</p>
</sec>
</sec>
<sec id="Ch1.S5" sec-type="conclusions">
  <label>5</label><title>Conclusions</title>
      <p id="d1e9477">The goal of this work is to demonstrate that HMC algorithms employing a timescale separation can solve hard inference problems with stochastic hydrological models. In <xref ref-type="bibr" rid="bib1.bibx3" id="text.48"/> we proposed a novel implementation of an HMC algorithm combined with a multiple timescale integration for Bayesian parameter inference with nonlinear SDE models, and we demonstrated the performance of the method using a rainfall-runoff toy model with synthetic data time series. This work is the first application to a real-world case study, with real time series of measured rainfall and outflows. We<?pagebreak page2948?> show that the HMC algorithm is a powerful inference method for the data-driven calibration of hydrological model parameters, especially well suited for both computationally expensive stochastic models and  cases, far from rare in hydrology, where the precipitation data are inaccurate and unreliable.</p>
      <p id="d1e9483">The combined SIP-HMC method presented here allows us also to estimate the “true” average rain input to a hydrological system in the case of highly inaccurate precipitation data probabilistically and with great accuracy, using only prior knowledge and the observed outflow. Runoff data are used by the algorithm as a first-hand information resource about the unknown precipitation over the catchment. This information can override the available, and possibly inaccurate, rainfall data. The reconstructed precipitation is then used to infer the hydrological model parameters, which are thus protected from the deteriorating effect of the uncertainty on the rainfall observations. This approach considerably reduces the bias in the inferred parameters and therefore leads to more reliable runoff predictions, which can in turn be very useful for decision-makers in planning and policy-making.</p>
      <p id="d1e9486">The use of AD makes the algorithm in principle applicable to more complex models. Indeed, the generalization of the algorithm from the toy model used in <xref ref-type="bibr" rid="bib1.bibx3" id="text.49"/> presented only one possibly challenging requirement, namely rewriting the Hamiltonian <inline-formula><mml:math id="M397" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mi mathvariant="normal">HMC</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, while the rest of the implementation of the algorithm remained essentially unchanged. This application shows that <inline-formula><mml:math id="M398" display="inline"><mml:mrow><mml:mo>≈</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> parameters can be inferred in less than 2 h. This leaves us with a considerable margin to tackle more complex problems and datasets of much larger sizes. However, it must be noted that the HMC algorithm in<?pagebreak page2949?> the form described in this work is limited to non-spatially resolved models depending only on a time variable. In principle, the method could cope with further spatial dimensions, for example, describing inundations, but this would require a non-trivial adaptation of the algorithm, which is not discussed here. More importantly, a significant limitation of the HMC method presented in this work is that it requires, unlike methods that only involve forward-solving the model, such as SIP <xref ref-type="bibr" rid="bib1.bibx11" id="paren.50"/>, an explicitly discretized solution of the hydrological model (see Eq. <xref ref-type="disp-formula" rid="Ch1.E5"/>), which might not be always easily available. In those cases, one may need to resort to appropriate numerical solvers, often employing advanced implicit schemes, which in turn may make AD problematic.</p>
      <p id="d1e9521">The extension of the HMC method described here to further hydrological models and systems will be the focus of future works. Furthermore, the HMC algorithm presented here is not at all limited to hydrology. It is a very general, efficient, easily parallelizable and scalable algorithm that makes Bayesian inference with expensive stochastic models feasible in spite of its computational hardships, with a very broad range of potential applications in applied sciences that can benefit from stochastic modelling and a fast Bayesian inference method.</p>
</sec>

      
      </body>
    <back><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d1e9528">The C<inline-formula><mml:math id="M399" display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula> code for HMC and the data used for this study are available on GitHub at <uri>https://github.com/ulzegasi/HMC_SIP.git</uri> <xref ref-type="bibr" rid="bib1.bibx40" id="paren.51"/>.</p>
  </notes><app-group>
        <supplementary-material position="anchor"><p id="d1e9547">The supplement related to this article is available online at: <inline-supplementary-material xlink:href="https://doi.org/10.5194/hess-27-2935-2023-supplement" xlink:title="pdf">https://doi.org/10.5194/hess-27-2935-2023-supplement</inline-supplementary-material>.</p></supplementary-material>
        </app-group><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e9556">CA conceived the original idea, and SU and CA designed the overall study and developed the theory. SU developed the code and performed the simulations. SU prepared the manuscript with contributions from CA.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e9562">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="d1e9568">Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e9574">We wish to thank the High Performance Computing team of the Zurich University of Applied Sciences in Wädenswil, Switzerland, for the computational support. We are also grateful to Jörg Rieckermann, Eawag, for the permission to re-use the data from his group, originally published in <xref ref-type="bibr" rid="bib1.bibx11" id="text.52"/>, and to MeteoSwiss for the rainfall data for Sc1, re-used from the same publication.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e9582">This research has been supported by the Swiss National Science Foundation (grant no. 200021_169295).</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

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

      <ref id="bib1.bibx1"><?xmltex \def\ref@label{{Ailliot et~al.(2015)Ailliot, Allard, Monbet, and
Naveau}}?><label>Ailliot et al.(2015)Ailliot, Allard, Monbet, and
Naveau</label><?label ailliot_2015?><mixed-citation>
Ailliot, P., Allard, D., Monbet, V., and Naveau, P.: Stochastic weather
generators: An overview of weather type models, J. Soc. Fr. Stat., 156,
101–113, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Albert et~al.(2015)Albert, K\"{u}nsch, and
Scheidegger}}?><label>Albert et al.(2015)Albert, Künsch, and
Scheidegger</label><?label Albert_2014_ABC?><mixed-citation>Albert, C., Künsch, H. R., and Scheidegger, A.: A Simulated Annealing
Approach to Approximate Bayes Computations, Stat. Comput., 25, 1217–1232,
<ext-link xlink:href="https://doi.org/10.1007/s11222-014-9507-8" ext-link-type="DOI">10.1007/s11222-014-9507-8</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx3"><?xmltex \def\ref@label{{Albert et~al.(2016)Albert, Ulzega, and Stoop}}?><label>Albert et al.(2016)Albert, Ulzega, and Stoop</label><?label albert_2016_hmc?><mixed-citation>Albert, C., Ulzega, S., and Stoop, R.: Boosting Bayesian parameter inference of nonlinear stochastic differential equation models by Hamiltonian scale
separation, Phys. Rev. E, 93, 043313, <ext-link xlink:href="https://doi.org/10.1103/PhysRevE.93.043313" ext-link-type="DOI">10.1103/PhysRevE.93.043313</ext-link>,
2016.</mixed-citation></ref>
      <ref id="bib1.bibx4"><?xmltex \def\ref@label{{Andrieu et~al.(2010)Andrieu, Doucet, and
Holenstein}}?><label>Andrieu et al.(2010)Andrieu, Doucet, and
Holenstein</label><?label andrieu_2010_pmcmc?><mixed-citation>Andrieu, C., Doucet, A., and Holenstein, R.: Particle Markov chain Monte Carlo methods, J. Roy. Stat. Soc. B, 72, 269–342,
<ext-link xlink:href="https://doi.org/10.1111/j.1467-9868.2009.00736.x" ext-link-type="DOI">10.1111/j.1467-9868.2009.00736.x</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx5"><?xmltex \def\ref@label{{Bacci et~al.(2022)Bacci, Dal~Molin, Fenicia, Reichert, and
{\v{S}}ukys}}?><label>Bacci et al.(2022)Bacci, Dal Molin, Fenicia, Reichert, and
Šukys</label><?label bacci2022application?><mixed-citation>Bacci, M., Dal Molin, M., Fenicia, F., Reichert, P., and Šukys, J.:
Application of stochastic time dependent parameters to improve the
characterization of uncertainty in conceptual hydrological models, J. Hydrol., 612, 128057, <ext-link xlink:href="https://doi.org/10.1016/j.jhydrol.2022.128057" ext-link-type="DOI">10.1016/j.jhydrol.2022.128057</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx6"><?xmltex \def\ref@label{{Bacci et~al.(2023)Bacci, Sukys, Reichert, Ulzega, and
Albert}}?><label>Bacci et al.(2023)Bacci, Sukys, Reichert, Ulzega, and
Albert</label><?label bacci_2023_comparison?><mixed-citation>Bacci, M., Sukys, J., Reichert, P., Ulzega, S., and Albert, C.: A Comparison of Numerical Approaches for Statistical Inference with Stochastic Models,
Stoch. Environ. Res. Risk A., 37, 3041–3061, <ext-link xlink:href="https://doi.org/10.1007/s00477-023-02434-z" ext-link-type="DOI">10.1007/s00477-023-02434-z</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx7"><?xmltex \def\ref@label{{B\'{a}rdossy and Das(2008)}}?><label>Bárdossy and Das(2008)</label><?label bardossy_2008?><mixed-citation>Bárdossy, A. and Das, T.: Influence of rainfall observation network on model  calibration and application, Hydrol. Earth Syst. Sci., 12, 77–89,
<ext-link xlink:href="https://doi.org/10.5194/hess-12-77-2008" ext-link-type="DOI">10.5194/hess-12-77-2008</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx8"><?xmltex \def\ref@label{{Cowpertwait et~al.(1996)Cowpertwait, O’Connell, Metcalfe, and
Mawdsley}}?><label>Cowpertwait et al.(1996)Cowpertwait, O’Connell, Metcalfe, and
Mawdsley</label><?label cowpertwait_1996?><mixed-citation>Cowpertwait, P. S. P., O’Connell, P. E., Metcalfe, A. V., and Mawdsley,
J. A.: Stochastic point process modelling of rainfall. I. Single-site fitting
and validation, J. Hydrol., 175, 17–46, <ext-link xlink:href="https://doi.org/10.1016/S0022-1694(96)80004-7" ext-link-type="DOI">10.1016/S0022-1694(96)80004-7</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx9"><?xmltex \def\ref@label{{Deidda et~al.(1999)Deidda, Benzi, and Siccardi}}?><label>Deidda et al.(1999)Deidda, Benzi, and Siccardi</label><?label deidda_1999?><mixed-citation>Deidda, R., Benzi, R., and Siccardi, F.: Multifractal modeling of anomalous
scaling laws in rainfall, Water Resour. Res., 35, 1853–1867,
<ext-link xlink:href="https://doi.org/10.1029/1999WR900036" ext-link-type="DOI">10.1029/1999WR900036</ext-link>, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx10"><?xmltex \def\ref@label{{Del~Giudice et~al.(2015)Del~Giudice, L{\"{o}}we, Madsen, Mikkelsen, and Rieckermann}}?><label>Del Giudice et al.(2015)Del Giudice, Löwe, Madsen, Mikkelsen, and Rieckermann</label><?label del_giudice_2015?><mixed-citation>Del Giudice, D., Löwe, R., Madsen, H., Mikkelsen, P. S., and Rieckermann,
J.: Comparison of two stochastic techniques for reliable urban runoff
predictions by modeling systematic errors, Water Resour. Res., 51, 5004–5022, <ext-link xlink:href="https://doi.org/10.1002/2014WR016678" ext-link-type="DOI">10.1002/2014WR016678</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx11"><?xmltex \def\ref@label{{Del~Giudice et~al.(2016)Del~Giudice, Albert, Rieckermann, and
Reichert}}?><label>Del Giudice et al.(2016)Del Giudice, Albert, Rieckermann, and
Reichert</label><?label delgiudice_2016_SIP?><mixed-citation>Del Giudice, D., Albert, C., Rieckermann, J., and Reichert, P.: Describing the catchment-averaged precipitation as a stochastic process improves parameter and input estimation, Water Resour. Res., 52, 3162–3186, <ext-link xlink:href="https://doi.org/10.1002/2015WR017871" ext-link-type="DOI">10.1002/2015WR017871</ext-link>, 2016.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx12"><?xmltex \def\ref@label{{Duane et~al.(1987)Duane, Kennedy, Pendleton, and
Roweth}}?><label>Duane et al.(1987)Duane, Kennedy, Pendleton, and
Roweth</label><?label duane_1987?><mixed-citation>Duane, S., Kennedy, A. D., Pendleton, B. J., and Roweth, D.: Hybrid Monte
Carlo, Phys. Lett. B, 195, 216–222, <ext-link xlink:href="https://doi.org/10.1016/0370-2693(87)91197-X" ext-link-type="DOI">10.1016/0370-2693(87)91197-X</ext-link>, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx13"><?xmltex \def\ref@label{{Earl and Deem(2005)}}?><label>Earl and Deem(2005)</label><?label Earl_2005_ParallelTempering?><mixed-citation>Earl, D. J. and Deem, M. W.: Parallel tempering: Theory, applications, and new perspectives, Phys. Chem. Chem. Phys., 7, 3910–3916,
<ext-link xlink:href="https://doi.org/10.1039/B509983H" ext-link-type="DOI">10.1039/B509983H</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx14"><?xmltex \def\ref@label{{Girolami and Calderhead(2011)}}?><label>Girolami and Calderhead(2011)</label><?label girolami_2011_HMC?><mixed-citation>Girolami, M. and Calderhead, B.: Riemann manifold Langevin and Hamiltonian
Monte Carlo methods, J. Roy. Stat. Soc. B, 73, 123–214,
<ext-link xlink:href="https://doi.org/10.1111/j.1467-9868.2010.00765.x" ext-link-type="DOI">10.1111/j.1467-9868.2010.00765.x</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx15"><?xmltex \def\ref@label{{Hartmann et~al.(2022)Hartmann, Girolami, and
Klami}}?><label>Hartmann et al.(2022)Hartmann, Girolami, and
Klami</label><?label hartmann_2022_HMC?><mixed-citation>Hartmann, M., Girolami, M., and Klami, A.: Lagrangian manifold Monte Carlo on
Monge patches, in: Proceedings of The 25th International Conference on
Artificial Intelligence and Statistics, vol. 151 of Proceedings of Machine Learning Research, edited by: Camps-Valls, G., Ruiz, F. J. R., and Valera, I., PMLR, 4764–4781,
<uri>https://proceedings.mlr.press/v151/hartmann22a.html</uri> (last access: 9 August 2023), 2022.</mixed-citation></ref>
      <ref id="bib1.bibx16"><?xmltex \def\ref@label{{Hoffman and Gelman(2014)}}?><label>Hoffman and Gelman(2014)</label><?label hoffman_2014_NUTS?><mixed-citation>
Hoffman, M. D. and Gelman, A.: The No-U-Turn Sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo, J. Mach. Learn. Res., 15, 1351–1381, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx17"><?xmltex \def\ref@label{{Hogan(2014)}}?><label>Hogan(2014)</label><?label Hogan_2014_adept?><mixed-citation>Hogan, R. J.: Fast reverse-mode automatic differentiation using expression
templates in C<inline-formula><mml:math id="M400" display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>, ACM Trans. Math. Softw., 40, 1–16,
<ext-link xlink:href="https://doi.org/10.1145/2560359" ext-link-type="DOI">10.1145/2560359</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx18"><?xmltex \def\ref@label{{Honti et~al.(2013)Honti, Stamm, and Reichert}}?><label>Honti et al.(2013)Honti, Stamm, and Reichert</label><?label honti_2013?><mixed-citation>Honti, M., Stamm, C., and Reichert, P.: Integrated uncertainty assessment of
discharge predictions with a statistical error model, Water Resour. Res., 49,
4866–4884, <ext-link xlink:href="https://doi.org/10.1002/wrcr.20374" ext-link-type="DOI">10.1002/wrcr.20374</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{{Kavetski et~al.(2006)Kavetski, Kuczera, and Franks}}?><label>Kavetski et al.(2006)Kavetski, Kuczera, and Franks</label><?label kavetski_2006?><mixed-citation>Kavetski, D., Kuczera, G., and Franks, S. W.: Bayesian analysis of input
uncertainty in hydrological modeling: 1. Theory, Water Resour. Res., 42,
W03407, <ext-link xlink:href="https://doi.org/10.1029/2005WR004368" ext-link-type="DOI">10.1029/2005WR004368</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx20"><?xmltex \def\ref@label{{Laio and Gervasio(2008)}}?><label>Laio and Gervasio(2008)</label><?label laio_2008?><mixed-citation>Laio, A. and Gervasio, F. L.: Metadynamics: a method to simulate rare events
and reconstruct the free energy in biophysics, chemistry and material
science, Rep. Prog. Phys., 71, 126601, <ext-link xlink:href="https://doi.org/10.1088/0034-4885/71/12/126601" ext-link-type="DOI">10.1088/0034-4885/71/12/126601</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx21"><?xmltex \def\ref@label{{Langousis and Kaleris(2014)}}?><label>Langousis and Kaleris(2014)</label><?label langousis_2014?><mixed-citation>Langousis, A. and Kaleris, V.: Statistical framework to simulate daily rainfall series conditional on upper-air predictor variables, Water Resour. Res., 50, 3907–3932, <ext-link xlink:href="https://doi.org/10.1002/2013WR014936" ext-link-type="DOI">10.1002/2013WR014936</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx22"><?xmltex \def\ref@label{{Lau and Lubensky(2007)}}?><label>Lau and Lubensky(2007)</label><?label lau_2007?><mixed-citation>Lau, A. W. C. and Lubensky, T. C.: State-dependent diffusion: thermodynamic
consistency and its path integral formulation, Phys. Rev. E, 76, 011123,
<ext-link xlink:href="https://doi.org/10.1103/PhysRevE.76.011123" ext-link-type="DOI">10.1103/PhysRevE.76.011123</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx23"><?xmltex \def\ref@label{{Marinari and Parisi(1992)}}?><label>Marinari and Parisi(1992)</label><?label Marinari_1992_ParallelTempering?><mixed-citation>Marinari, E. and Parisi, G.: Simulated Tempering: A New Monte Carlo Scheme,
Europhys. Lett., 19, 451–458, <ext-link xlink:href="https://doi.org/10.1209/0295-5075/19/6/002" ext-link-type="DOI">10.1209/0295-5075/19/6/002</ext-link>, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx24"><?xmltex \def\ref@label{{McMillan et~al.(2011)McMillan, Jackson, Clark, Kavetski, and
Woods}}?><label>McMillan et al.(2011)McMillan, Jackson, Clark, Kavetski, and
Woods</label><?label mcmillan_2011?><mixed-citation>McMillan, H., Jackson, B., Clark, M., Kavetski, D., and Woods, R.: Rainfall
uncertainty in hydrological modelling: An evaluation of multiplicative error
models, J. Hydrol., 400, 83–94, <ext-link xlink:href="https://doi.org/10.1016/j.jhydrol.2011.01.026" ext-link-type="DOI">10.1016/j.jhydrol.2011.01.026</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx25"><?xmltex \def\ref@label{{Neal(2011)}}?><label>Neal(2011)</label><?label Neal_2011_HMC?><mixed-citation>Neal, R. M.: MCMC Using Hamiltonian Dynamics, in: Handbook of Markov Chain Monte Carlo, edited by: Brooks, S., Gelman, A., Jones, G. L., and Meng, X.-L., Chapman and Hall/CRC, 113–162, <ext-link xlink:href="https://doi.org/10.1201/b10905" ext-link-type="DOI">10.1201/b10905</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx26"><?xmltex \def\ref@label{{Ochoa-Rodriguez et~al.(2015)Ochoa-Rodriguez, Wang, Gires, Pina,
Reinoso-Rondinel, Bruni, A., Gaitan, Cristiano, {van Assel}, Kroll,
Murlà-Tuyls, Tisserand, Schertzer, Tchiguirinskaia, Onof, Willems, and {ten
Veldhuis}}}?><label>Ochoa-Rodriguez et al.(2015)Ochoa-Rodriguez, Wang, Gires, Pina,
Reinoso-Rondinel, Bruni, A., Gaitan, Cristiano, van Assel, Kroll,
Murlà-Tuyls, Tisserand, Schertzer, Tchiguirinskaia, Onof, Willems, and ten
Veldhuis</label><?label ochoarodriguez_2015?><mixed-citation>Ochoa-Rodriguez, S., Wang, L.-P., Gires, A., Pina, R. D., Reinoso-Rondinel, R., Bruni, G., A., I., Gaitan, S., Cristiano, E., van Assel, J., Kroll, S.,
Murlà-Tuyls, D., Tisserand, B., Schertzer, D., Tchiguirinskaia, I., Onof,
C., Willems, P., and ten Veldhuis, M.-C.: Impact of spatial and temporal
resolution of rainfall inputs on urban hydrodynamic modelling outputs: A
multi-catchment investigation, J. Hydrol., 531, 389–407, <ext-link xlink:href="https://doi.org/10.1016/j.jhydrol.2015.05.035" ext-link-type="DOI">10.1016/j.jhydrol.2015.05.035</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx27"><?xmltex \def\ref@label{{Paschalis et~al.(2013)Paschalis, P., Fatichi, and
Burlando}}?><label>Paschalis et al.(2013)Paschalis, P., Fatichi, and
Burlando</label><?label paschalis_2013?><mixed-citation>Paschalis, A., P., M., Fatichi, S., and Burlando, P.: A stochastic model for
high-resolution space-time precipitation simulation, Water Resour. Res., 49,
8400–8417, <ext-link xlink:href="https://doi.org/10.1002/2013WR014437" ext-link-type="DOI">10.1002/2013WR014437</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx28"><?xmltex \def\ref@label{{Reichert and Mieleitner(2009)}}?><label>Reichert and Mieleitner(2009)</label><?label reichert_2009_hydmodelunc?><mixed-citation>Reichert, P. and Mieleitner, J.: Analyzing input and structural uncertainty of nonlinear dynamic models with stochastic, time-dependent parameters, Water
Resour. Res., 459, W10402, <ext-link xlink:href="https://doi.org/10.1029/2009WR007814" ext-link-type="DOI">10.1029/2009WR007814</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx29"><?xmltex \def\ref@label{{Reichert and Schuwirth(2012)}}?><label>Reichert and Schuwirth(2012)</label><?label reichert_2012?><mixed-citation>Reichert, P. and Schuwirth, N.: Linking statistical bias description to
multiobjective model calibration, Water Resour. Res., 48, W09543,
<ext-link xlink:href="https://doi.org/10.1029/2011WR011391" ext-link-type="DOI">10.1029/2011WR011391</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx30"><?xmltex \def\ref@label{{Reichert et~al.(2021)Reichert, Ammann, and
Fenicia}}?><label>Reichert et al.(2021)Reichert, Ammann, and
Fenicia</label><?label Reichert_2021_PotentialAndChallengesOfTimeDependentParameters?><mixed-citation>Reichert, P., Ammann, L., and Fenicia, F.: Potential and challenges of
investigating intrinsic uncertainty of hydrological models with stochastic,
time-dependent parameters, Water Resour. Res., 57, e2020WR028400,
<ext-link xlink:href="https://doi.org/10.1029/2020WR028400" ext-link-type="DOI">10.1029/2020WR028400</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx31"><?xmltex \def\ref@label{{Renard et~al.(2011)Renard, Kavetski, Leblois, Thyer, Kuczera, and
Franks}}?><label>Renard et al.(2011)Renard, Kavetski, Leblois, Thyer, Kuczera, and
Franks</label><?label renard_2011?><mixed-citation>Renard, B., Kavetski, D., Leblois, E., Thyer, M., Kuczera, G., and Franks,
S. W.: Toward a reliable decomposition of predictive uncertainty in
hydrological modeling: Characterizing rainfall errors using conditional
simulation, Water Resour. Res., 47, W11516, <ext-link xlink:href="https://doi.org/10.1029/2011WR010643" ext-link-type="DOI">10.1029/2011WR010643</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx32"><?xmltex \def\ref@label{{Rodriguez-Iturbe et~al.(1987)Rodriguez-Iturbe, Cox, and
Isham}}?><label>Rodriguez-Iturbe et al.(1987)Rodriguez-Iturbe, Cox, and
Isham</label><?label rodriguez_iturbe_1987?><mixed-citation>Rodriguez-Iturbe, I., Cox, D. R., and Isham, V.: Some models for rainfall based on stochastic point processes, P. Roy. Soc. Lond. A, 410, 269–298,
<ext-link xlink:href="https://doi.org/10.1098/rspa.1987.0039" ext-link-type="DOI">10.1098/rspa.1987.0039</ext-link>, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx33"><?xmltex \def\ref@label{{Sigrist et~al.(2012)Sigrist, K{\"{u}}nsch, and Stahel}}?><label>Sigrist et al.(2012)Sigrist, Künsch, and Stahel</label><?label sigrist_2012?><mixed-citation>
Sigrist, F., Künsch, H. R., and Stahel, W. A.: A dynamic nonstationary
spatio-temporal model for short term prediction of precipitation, Ann. Appl. Stat., 6, 1452–1477, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{{Sikorska et~al.(2012)Sikorska, Scheidegger, Banasik, and
Rieckermann}}?><label>Sikorska et al.(2012)Sikorska, Scheidegger, Banasik, and
Rieckermann</label><?label sikorska_2012?><mixed-citation>Sikorska, A., Scheidegger, A., Banasik, K., and Rieckermann, J.: Bayesian
uncertainty assessment of flood predictions in ungauged urban basins for
conceptual rainfall-runoff models, Hydrol. Earth Syst. Sci., 16, 1221–1236,
<ext-link xlink:href="https://doi.org/10.5194/hess-16-1221-2012" ext-link-type="DOI">10.5194/hess-16-1221-2012</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{Sun and Bertrand-Krajewski(2013)}}?><label>Sun and Bertrand-Krajewski(2013)</label><?label sun_2013?><mixed-citation>Sun, S. and Bertrand-Krajewski, J.: Separately accounting for uncertainties in rainfall and runoff: Calibration of event-based conceptual hydrological
models in small urban catchments using Bayesian method, Water Resour. Res.,
49, 5381–5394, <ext-link xlink:href="https://doi.org/10.1002/wrcr.20444" ext-link-type="DOI">10.1002/wrcr.20444</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{{Swendsen and Wang(1986)}}?><label>Swendsen and Wang(1986)</label><?label Swendsen_1986_ParallelTempering?><mixed-citation>Swendsen, R. H. and Wang, J.-S.: Replica Monte Carlo Simulation of
Spin-Glasses, Phys. Rev. Lett., 57, 2607–2609,
<ext-link xlink:href="https://doi.org/10.1103/PhysRevLett.57.2607" ext-link-type="DOI">10.1103/PhysRevLett.57.2607</ext-link>, 1986.</mixed-citation></ref>
      <ref id="bib1.bibx37"><?xmltex \def\ref@label{{Tomassini et~al.(2009)Tomassini, Reichert, K{\"{u}}nsch, Buser, Knutti, and Borsuk}}?><label>Tomassini et al.(2009)Tomassini, Reichert, Künsch, Buser, Knutti, and Borsuk</label><?label tomassini_2009_timedeppar?><mixed-citation>
Tomassini, L., Reichert, P., Künsch, H. R., Buser, C., Knutti, R., and
Borsuk, M. E.: A Smoothing Algorithm for Estimating Stochastic Continuous
Time Model Parameters and Its Application to a Simple Climate Model, J. Roy. Stat. Soc. C, 58, 679–704, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx38"><?xmltex \def\ref@label{{Tuckerman et~al.(1992)Tuckerman, Berne, and Martyna}}?><label>Tuckerman et al.(1992)Tuckerman, Berne, and Martyna</label><?label tuckerman_1992?><mixed-citation>Tuckerman, M., Berne, B. J., and Martyna, G. J.: Reversible multiple time scale molecular dynamics, J. Chem. Phys., 97, 1990–2001, <ext-link xlink:href="https://doi.org/10.1063/1.463137" ext-link-type="DOI">10.1063/1.463137</ext-link>, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx39"><?xmltex \def\ref@label{{Tuckerman et~al.(1993)Tuckerman, Berne, Martyna, and
Klein}}?><label>Tuckerman et al.(1993)Tuckerman, Berne, Martyna, and
Klein</label><?label tuckerman_1993?><mixed-citation>Tuckerman, M. E., Berne, B. J., Martyna, G. J., and Klein, M. L.: Efficient
molecular dynamics and hybrid Monte Carlo algorithms for path integrals,
J. Chem. Phys., 99, 2796–2808, <ext-link xlink:href="https://doi.org/10.1063/1.465188" ext-link-type="DOI">10.1063/1.465188</ext-link>, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx40"><?xmltex \def\ref@label{{ulzegasi(2023)}}?><label>ulzegasi(2023)</label><?label ulzegasi2023?><mixed-citation>ulzegasi: HMC_SIP, GitHub [code and data set], <uri>https://github.com/ulzegasi/HMC_SIP.git</uri> (last access: 8 August 2023), 2023.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{{Yang et~al.(2008)Yang, Reichert, Abbaspour, Xia, and
Yang}}?><label>Yang et al.(2008)Yang, Reichert, Abbaspour, Xia, and
Yang</label><?label yang_2008?><mixed-citation>Yang, J., Reichert, P., Abbaspour, K. C., Xia, J., and Yang, H.: Comparing
uncertainty analysis techniques for a SWAT application to the Chaohe Basin in
China, J. Hydrol., 358, 1–23, <ext-link xlink:href="https://doi.org/10.1016/j.jhydrol.2008.05.012" ext-link-type="DOI">10.1016/j.jhydrol.2008.05.012</ext-link>, 2008.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Bayesian parameter inference in hydrological modelling using a Hamiltonian Monte Carlo approach with a stochastic rain model</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Ailliot et al.(2015)Ailliot, Allard, Monbet, and
Naveau</label><mixed-citation>
      
Ailliot, P., Allard, D., Monbet, V., and Naveau, P.: Stochastic weather
generators: An overview of weather type models, J. Soc. Fr. Stat., 156,
101–113, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Albert et al.(2015)Albert, Künsch, and
Scheidegger</label><mixed-citation>
      
Albert, C., Künsch, H. R., and Scheidegger, A.: A Simulated Annealing
Approach to Approximate Bayes Computations, Stat. Comput., 25, 1217–1232,
<a href="https://doi.org/10.1007/s11222-014-9507-8" target="_blank">https://doi.org/10.1007/s11222-014-9507-8</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Albert et al.(2016)Albert, Ulzega, and Stoop</label><mixed-citation>
      
Albert, C., Ulzega, S., and Stoop, R.: Boosting Bayesian parameter inference of nonlinear stochastic differential equation models by Hamiltonian scale
separation, Phys. Rev. E, 93, 043313, <a href="https://doi.org/10.1103/PhysRevE.93.043313" target="_blank">https://doi.org/10.1103/PhysRevE.93.043313</a>,
2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Andrieu et al.(2010)Andrieu, Doucet, and
Holenstein</label><mixed-citation>
      
Andrieu, C., Doucet, A., and Holenstein, R.: Particle Markov chain Monte Carlo methods, J. Roy. Stat. Soc. B, 72, 269–342,
<a href="https://doi.org/10.1111/j.1467-9868.2009.00736.x" target="_blank">https://doi.org/10.1111/j.1467-9868.2009.00736.x</a>, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bacci et al.(2022)Bacci, Dal Molin, Fenicia, Reichert, and
Šukys</label><mixed-citation>
      
Bacci, M., Dal Molin, M., Fenicia, F., Reichert, P., and Šukys, J.:
Application of stochastic time dependent parameters to improve the
characterization of uncertainty in conceptual hydrological models, J. Hydrol., 612, 128057, <a href="https://doi.org/10.1016/j.jhydrol.2022.128057" target="_blank">https://doi.org/10.1016/j.jhydrol.2022.128057</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Bacci et al.(2023)Bacci, Sukys, Reichert, Ulzega, and
Albert</label><mixed-citation>
      
Bacci, M., Sukys, J., Reichert, P., Ulzega, S., and Albert, C.: A Comparison of Numerical Approaches for Statistical Inference with Stochastic Models,
Stoch. Environ. Res. Risk A., 37, 3041–3061, <a href="https://doi.org/10.1007/s00477-023-02434-z" target="_blank">https://doi.org/10.1007/s00477-023-02434-z</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Bárdossy and Das(2008)</label><mixed-citation>
      
Bárdossy, A. and Das, T.: Influence of rainfall observation network on model  calibration and application, Hydrol. Earth Syst. Sci., 12, 77–89,
<a href="https://doi.org/10.5194/hess-12-77-2008" target="_blank">https://doi.org/10.5194/hess-12-77-2008</a>, 2008.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Cowpertwait et al.(1996)Cowpertwait, O’Connell, Metcalfe, and
Mawdsley</label><mixed-citation>
      
Cowpertwait, P. S. P., O’Connell, P. E., Metcalfe, A. V., and Mawdsley,
J. A.: Stochastic point process modelling of rainfall. I. Single-site fitting
and validation, J. Hydrol., 175, 17–46, <a href="https://doi.org/10.1016/S0022-1694(96)80004-7" target="_blank">https://doi.org/10.1016/S0022-1694(96)80004-7</a>, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Deidda et al.(1999)Deidda, Benzi, and Siccardi</label><mixed-citation>
      
Deidda, R., Benzi, R., and Siccardi, F.: Multifractal modeling of anomalous
scaling laws in rainfall, Water Resour. Res., 35, 1853–1867,
<a href="https://doi.org/10.1029/1999WR900036" target="_blank">https://doi.org/10.1029/1999WR900036</a>, 1999.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Del Giudice et al.(2015)Del Giudice, Löwe, Madsen, Mikkelsen, and Rieckermann</label><mixed-citation>
      
Del Giudice, D., Löwe, R., Madsen, H., Mikkelsen, P. S., and Rieckermann,
J.: Comparison of two stochastic techniques for reliable urban runoff
predictions by modeling systematic errors, Water Resour. Res., 51, 5004–5022, <a href="https://doi.org/10.1002/2014WR016678" target="_blank">https://doi.org/10.1002/2014WR016678</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Del Giudice et al.(2016)Del Giudice, Albert, Rieckermann, and
Reichert</label><mixed-citation>
      
Del Giudice, D., Albert, C., Rieckermann, J., and Reichert, P.: Describing the catchment-averaged precipitation as a stochastic process improves parameter and input estimation, Water Resour. Res., 52, 3162–3186, <a href="https://doi.org/10.1002/2015WR017871" target="_blank">https://doi.org/10.1002/2015WR017871</a>, 2016.


    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Duane et al.(1987)Duane, Kennedy, Pendleton, and
Roweth</label><mixed-citation>
      
Duane, S., Kennedy, A. D., Pendleton, B. J., and Roweth, D.: Hybrid Monte
Carlo, Phys. Lett. B, 195, 216–222, <a href="https://doi.org/10.1016/0370-2693(87)91197-X" target="_blank">https://doi.org/10.1016/0370-2693(87)91197-X</a>, 1987.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Earl and Deem(2005)</label><mixed-citation>
      
Earl, D. J. and Deem, M. W.: Parallel tempering: Theory, applications, and new perspectives, Phys. Chem. Chem. Phys., 7, 3910–3916,
<a href="https://doi.org/10.1039/B509983H" target="_blank">https://doi.org/10.1039/B509983H</a>, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Girolami and Calderhead(2011)</label><mixed-citation>
      
Girolami, M. and Calderhead, B.: Riemann manifold Langevin and Hamiltonian
Monte Carlo methods, J. Roy. Stat. Soc. B, 73, 123–214,
<a href="https://doi.org/10.1111/j.1467-9868.2010.00765.x" target="_blank">https://doi.org/10.1111/j.1467-9868.2010.00765.x</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Hartmann et al.(2022)Hartmann, Girolami, and
Klami</label><mixed-citation>
      
Hartmann, M., Girolami, M., and Klami, A.: Lagrangian manifold Monte Carlo on
Monge patches, in: Proceedings of The 25th International Conference on
Artificial Intelligence and Statistics, vol. 151 of Proceedings of Machine Learning Research, edited by: Camps-Valls, G., Ruiz, F. J. R., and Valera, I., PMLR, 4764–4781,
<a href="https://proceedings.mlr.press/v151/hartmann22a.html" target="_blank"/> (last access: 9 August 2023), 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Hoffman and Gelman(2014)</label><mixed-citation>
      
Hoffman, M. D. and Gelman, A.: The No-U-Turn Sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo, J. Mach. Learn. Res., 15, 1351–1381, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Hogan(2014)</label><mixed-citation>
      
Hogan, R. J.: Fast reverse-mode automatic differentiation using expression
templates in C+ + , ACM Trans. Math. Softw., 40, 1–16,
<a href="https://doi.org/10.1145/2560359" target="_blank">https://doi.org/10.1145/2560359</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Honti et al.(2013)Honti, Stamm, and Reichert</label><mixed-citation>
      
Honti, M., Stamm, C., and Reichert, P.: Integrated uncertainty assessment of
discharge predictions with a statistical error model, Water Resour. Res., 49,
4866–4884, <a href="https://doi.org/10.1002/wrcr.20374" target="_blank">https://doi.org/10.1002/wrcr.20374</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Kavetski et al.(2006)Kavetski, Kuczera, and Franks</label><mixed-citation>
      
Kavetski, D., Kuczera, G., and Franks, S. W.: Bayesian analysis of input
uncertainty in hydrological modeling: 1. Theory, Water Resour. Res., 42,
W03407, <a href="https://doi.org/10.1029/2005WR004368" target="_blank">https://doi.org/10.1029/2005WR004368</a>, 2006.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Laio and Gervasio(2008)</label><mixed-citation>
      
Laio, A. and Gervasio, F. L.: Metadynamics: a method to simulate rare events
and reconstruct the free energy in biophysics, chemistry and material
science, Rep. Prog. Phys., 71, 126601, <a href="https://doi.org/10.1088/0034-4885/71/12/126601" target="_blank">https://doi.org/10.1088/0034-4885/71/12/126601</a>, 2008.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Langousis and Kaleris(2014)</label><mixed-citation>
      
Langousis, A. and Kaleris, V.: Statistical framework to simulate daily rainfall series conditional on upper-air predictor variables, Water Resour. Res., 50, 3907–3932, <a href="https://doi.org/10.1002/2013WR014936" target="_blank">https://doi.org/10.1002/2013WR014936</a>, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Lau and Lubensky(2007)</label><mixed-citation>
      
Lau, A. W. C. and Lubensky, T. C.: State-dependent diffusion: thermodynamic
consistency and its path integral formulation, Phys. Rev. E, 76, 011123,
<a href="https://doi.org/10.1103/PhysRevE.76.011123" target="_blank">https://doi.org/10.1103/PhysRevE.76.011123</a>, 2007.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Marinari and Parisi(1992)</label><mixed-citation>
      
Marinari, E. and Parisi, G.: Simulated Tempering: A New Monte Carlo Scheme,
Europhys. Lett., 19, 451–458, <a href="https://doi.org/10.1209/0295-5075/19/6/002" target="_blank">https://doi.org/10.1209/0295-5075/19/6/002</a>, 1992.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>McMillan et al.(2011)McMillan, Jackson, Clark, Kavetski, and
Woods</label><mixed-citation>
      
McMillan, H., Jackson, B., Clark, M., Kavetski, D., and Woods, R.: Rainfall
uncertainty in hydrological modelling: An evaluation of multiplicative error
models, J. Hydrol., 400, 83–94, <a href="https://doi.org/10.1016/j.jhydrol.2011.01.026" target="_blank">https://doi.org/10.1016/j.jhydrol.2011.01.026</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Neal(2011)</label><mixed-citation>
      
Neal, R. M.: MCMC Using Hamiltonian Dynamics, in: Handbook of Markov Chain Monte Carlo, edited by: Brooks, S., Gelman, A., Jones, G. L., and Meng, X.-L., Chapman and Hall/CRC, 113–162, <a href="https://doi.org/10.1201/b10905" target="_blank">https://doi.org/10.1201/b10905</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Ochoa-Rodriguez et al.(2015)Ochoa-Rodriguez, Wang, Gires, Pina,
Reinoso-Rondinel, Bruni, A., Gaitan, Cristiano, van Assel, Kroll,
Murlà-Tuyls, Tisserand, Schertzer, Tchiguirinskaia, Onof, Willems, and ten
Veldhuis</label><mixed-citation>
      
Ochoa-Rodriguez, S., Wang, L.-P., Gires, A., Pina, R. D., Reinoso-Rondinel, R., Bruni, G., A., I., Gaitan, S., Cristiano, E., van Assel, J., Kroll, S.,
Murlà-Tuyls, D., Tisserand, B., Schertzer, D., Tchiguirinskaia, I., Onof,
C., Willems, P., and ten Veldhuis, M.-C.: Impact of spatial and temporal
resolution of rainfall inputs on urban hydrodynamic modelling outputs: A
multi-catchment investigation, J. Hydrol., 531, 389–407, <a href="https://doi.org/10.1016/j.jhydrol.2015.05.035" target="_blank">https://doi.org/10.1016/j.jhydrol.2015.05.035</a>, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Paschalis et al.(2013)Paschalis, P., Fatichi, and
Burlando</label><mixed-citation>
      
Paschalis, A., P., M., Fatichi, S., and Burlando, P.: A stochastic model for
high-resolution space-time precipitation simulation, Water Resour. Res., 49,
8400–8417, <a href="https://doi.org/10.1002/2013WR014437" target="_blank">https://doi.org/10.1002/2013WR014437</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Reichert and Mieleitner(2009)</label><mixed-citation>
      
Reichert, P. and Mieleitner, J.: Analyzing input and structural uncertainty of nonlinear dynamic models with stochastic, time-dependent parameters, Water
Resour. Res., 459, W10402, <a href="https://doi.org/10.1029/2009WR007814" target="_blank">https://doi.org/10.1029/2009WR007814</a>, 2009.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Reichert and Schuwirth(2012)</label><mixed-citation>
      
Reichert, P. and Schuwirth, N.: Linking statistical bias description to
multiobjective model calibration, Water Resour. Res., 48, W09543,
<a href="https://doi.org/10.1029/2011WR011391" target="_blank">https://doi.org/10.1029/2011WR011391</a>, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Reichert et al.(2021)Reichert, Ammann, and
Fenicia</label><mixed-citation>
      
Reichert, P., Ammann, L., and Fenicia, F.: Potential and challenges of
investigating intrinsic uncertainty of hydrological models with stochastic,
time-dependent parameters, Water Resour. Res., 57, e2020WR028400,
<a href="https://doi.org/10.1029/2020WR028400" target="_blank">https://doi.org/10.1029/2020WR028400</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Renard et al.(2011)Renard, Kavetski, Leblois, Thyer, Kuczera, and
Franks</label><mixed-citation>
      
Renard, B., Kavetski, D., Leblois, E., Thyer, M., Kuczera, G., and Franks,
S. W.: Toward a reliable decomposition of predictive uncertainty in
hydrological modeling: Characterizing rainfall errors using conditional
simulation, Water Resour. Res., 47, W11516, <a href="https://doi.org/10.1029/2011WR010643" target="_blank">https://doi.org/10.1029/2011WR010643</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Rodriguez-Iturbe et al.(1987)Rodriguez-Iturbe, Cox, and
Isham</label><mixed-citation>
      
Rodriguez-Iturbe, I., Cox, D. R., and Isham, V.: Some models for rainfall based on stochastic point processes, P. Roy. Soc. Lond. A, 410, 269–298,
<a href="https://doi.org/10.1098/rspa.1987.0039" target="_blank">https://doi.org/10.1098/rspa.1987.0039</a>, 1987.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Sigrist et al.(2012)Sigrist, Künsch, and Stahel</label><mixed-citation>
      
Sigrist, F., Künsch, H. R., and Stahel, W. A.: A dynamic nonstationary
spatio-temporal model for short term prediction of precipitation, Ann. Appl. Stat., 6, 1452–1477, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Sikorska et al.(2012)Sikorska, Scheidegger, Banasik, and
Rieckermann</label><mixed-citation>
      
Sikorska, A., Scheidegger, A., Banasik, K., and Rieckermann, J.: Bayesian
uncertainty assessment of flood predictions in ungauged urban basins for
conceptual rainfall-runoff models, Hydrol. Earth Syst. Sci., 16, 1221–1236,
<a href="https://doi.org/10.5194/hess-16-1221-2012" target="_blank">https://doi.org/10.5194/hess-16-1221-2012</a>, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Sun and Bertrand-Krajewski(2013)</label><mixed-citation>
      
Sun, S. and Bertrand-Krajewski, J.: Separately accounting for uncertainties in rainfall and runoff: Calibration of event-based conceptual hydrological
models in small urban catchments using Bayesian method, Water Resour. Res.,
49, 5381–5394, <a href="https://doi.org/10.1002/wrcr.20444" target="_blank">https://doi.org/10.1002/wrcr.20444</a>, 2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Swendsen and Wang(1986)</label><mixed-citation>
      
Swendsen, R. H. and Wang, J.-S.: Replica Monte Carlo Simulation of
Spin-Glasses, Phys. Rev. Lett., 57, 2607–2609,
<a href="https://doi.org/10.1103/PhysRevLett.57.2607" target="_blank">https://doi.org/10.1103/PhysRevLett.57.2607</a>, 1986.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Tomassini et al.(2009)Tomassini, Reichert, Künsch, Buser, Knutti, and Borsuk</label><mixed-citation>
      
Tomassini, L., Reichert, P., Künsch, H. R., Buser, C., Knutti, R., and
Borsuk, M. E.: A Smoothing Algorithm for Estimating Stochastic Continuous
Time Model Parameters and Its Application to a Simple Climate Model, J. Roy. Stat. Soc. C, 58, 679–704, 2009.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Tuckerman et al.(1992)Tuckerman, Berne, and Martyna</label><mixed-citation>
      
Tuckerman, M., Berne, B. J., and Martyna, G. J.: Reversible multiple time scale molecular dynamics, J. Chem. Phys., 97, 1990–2001, <a href="https://doi.org/10.1063/1.463137" target="_blank">https://doi.org/10.1063/1.463137</a>, 1992.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Tuckerman et al.(1993)Tuckerman, Berne, Martyna, and
Klein</label><mixed-citation>
      
Tuckerman, M. E., Berne, B. J., Martyna, G. J., and Klein, M. L.: Efficient
molecular dynamics and hybrid Monte Carlo algorithms for path integrals,
J. Chem. Phys., 99, 2796–2808, <a href="https://doi.org/10.1063/1.465188" target="_blank">https://doi.org/10.1063/1.465188</a>, 1993.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>ulzegasi(2023)</label><mixed-citation>
      
ulzegasi: HMC_SIP, GitHub [code and data set], <a href="https://github.com/ulzegasi/HMC_SIP.git" target="_blank"/> (last access: 8 August 2023), 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Yang et al.(2008)Yang, Reichert, Abbaspour, Xia, and
Yang</label><mixed-citation>
      
Yang, J., Reichert, P., Abbaspour, K. C., Xia, J., and Yang, H.: Comparing
uncertainty analysis techniques for a SWAT application to the Chaohe Basin in
China, J. Hydrol., 358, 1–23, <a href="https://doi.org/10.1016/j.jhydrol.2008.05.012" target="_blank">https://doi.org/10.1016/j.jhydrol.2008.05.012</a>, 2008.

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