source: flex_extract.git/Documentation/html/Documentation/disagg.html @ d720895

ctbtodev
Last change on this file since d720895 was ba99230, checked in by Anne Philipp <anne.philipp@…>, 5 years ago

capitalize all directory names and adapt pathes in files

  • Property mode set to 100644
File size: 21.6 KB
Line 
1
2
3<!DOCTYPE html>
4<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6<head>
7  <meta charset="utf-8">
8 
9  <meta name="viewport" content="width=device-width, initial-scale=1.0">
10 
11  <title>Disaggregation of Flux Data &mdash; flex_extract 7.1 alpha documentation</title>
12 
13
14 
15 
16 
17 
18
19 
20  <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
21 
22   
23      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
24        <script type="text/javascript" src="../_static/jquery.js"></script>
25        <script type="text/javascript" src="../_static/underscore.js"></script>
26        <script type="text/javascript" src="../_static/doctools.js"></script>
27        <script type="text/javascript" src="../_static/language_data.js"></script>
28        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
29   
30    <script type="text/javascript" src="../_static/js/theme.js"></script>
31
32   
33
34 
35  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
36  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
37  <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
38  <link rel="stylesheet" href="../_static/css/theme_overrides.css" type="text/css" />
39    <link rel="index" title="Index" href="../genindex.html" />
40    <link rel="search" title="Search" href="../search.html" />
41    <link rel="next" title="Vertical Coordinate" href="vertco.html" />
42    <link rel="prev" title="Output Data" href="output.html" /> 
43</head>
44
45<body class="wy-body-for-nav">
46
47   
48  <div class="wy-grid-for-nav">
49   
50    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
51      <div class="wy-side-scroll">
52        <div class="wy-side-nav-search" >
53         
54
55         
56            <a href="../index.html" class="icon icon-home"> flex_extract
57         
58
59         
60          </a>
61
62         
63           
64           
65              <div class="version">
66                7.1
67              </div>
68           
69         
70
71         
72<div role="search">
73  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
74    <input type="text" name="q" placeholder="Search docs" />
75    <input type="hidden" name="check_keywords" value="yes" />
76    <input type="hidden" name="area" value="default" />
77  </form>
78</div>
79
80         
81        </div>
82
83        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
84         
85           
86           
87             
88           
89           
90              <p class="caption"><span class="caption-text">Table of Contents:</span></p>
91<ul class="current">
92<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li>
93<li class="toctree-l1"><a class="reference internal" href="../quick_start.html">Quick Start</a></li>
94<li class="toctree-l1"><a class="reference internal" href="../ecmwf_data.html">ECMWF Data</a></li>
95<li class="toctree-l1 current"><a class="reference internal" href="../documentation.html">Documentation</a><ul class="current">
96<li class="toctree-l2"><a class="reference internal" href="overview.html">Overview</a></li>
97<li class="toctree-l2"><a class="reference internal" href="input.html">Control &amp; Input Data</a></li>
98<li class="toctree-l2"><a class="reference internal" href="output.html">Output Data</a></li>
99<li class="toctree-l2 current"><a class="current reference internal" href="#">Disaggregation of Flux Data</a><ul>
100<li class="toctree-l3"><a class="reference internal" href="#disaggregation-for-precipitation-in-older-versions">Disaggregation for precipitation in older versions</a></li>
101<li class="toctree-l3"><a class="reference internal" href="#disaggregation-for-precipitation-in-version-7-1">Disaggregation for precipitation in version 7.1</a></li>
102<li class="toctree-l3"><a class="reference internal" href="#disaggregation-for-the-rest-of-the-flux-fields">Disaggregation for the rest of the flux fields</a><ul class="simple">
103</ul>
104</li>
105</ul>
106</li>
107<li class="toctree-l2"><a class="reference internal" href="vertco.html">Vertical Coordinate</a></li>
108<li class="toctree-l2"><a class="reference internal" href="api.html">Auto Generated Documentation</a></li>
109</ul>
110</li>
111<li class="toctree-l1"><a class="reference internal" href="../evaluation.html">Evaluation</a></li>
112<li class="toctree-l1"><a class="reference internal" href="../dev_guide.html">Developer Guide</a></li>
113<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a></li>
114<li class="toctree-l1"><a class="reference internal" href="../support.html">Support</a></li>
115<li class="toctree-l1"><a class="reference internal" href="../Support/faq.html">FAQ - Frequently asked questions</a></li>
116<li class="toctree-l1"><a class="reference internal" href="../authors.html">Developer Team</a></li>
117</ul>
118
119           
120         
121        </div>
122      </div>
123    </nav>
124
125    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
126
127     
128      <nav class="wy-nav-top" aria-label="top navigation">
129       
130          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
131          <a href="../index.html">flex_extract</a>
132       
133      </nav>
134
135
136      <div class="wy-nav-content">
137       
138        <div class="rst-content">
139       
140         
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156<div role="navigation" aria-label="breadcrumbs navigation">
157
158  <ul class="wy-breadcrumbs">
159   
160      <li><a href="../index.html">Docs</a> &raquo;</li>
161       
162          <li><a href="../documentation.html">Documentation</a> &raquo;</li>
163       
164      <li>Disaggregation of Flux Data</li>
165   
166   
167      <li class="wy-breadcrumbs-aside">
168       
169           
170            <a href="../_sources/Documentation/disagg.rst.txt" rel="nofollow"> View page source</a>
171         
172       
173      </li>
174   
175  </ul>
176
177 
178  <hr/>
179</div>
180          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
181           <div itemprop="articleBody">
182           
183  <div class="section" id="disaggregation-of-flux-data">
184<h1>Disaggregation of Flux Data<a class="headerlink" href="#disaggregation-of-flux-data" title="Permalink to this headline"></a></h1>
185<p><code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code> interpolates meteorological input data linearly to the position of computational particles in time and space. This method requires point values in the discrete input fields. However, flux data (as listed in table <a class="reference internal" href="#ref-table-fluxpar"><span class="std std-ref">flux fields</span></a>) from the ECMWF represent cell averages or integrals and are accumulated over a specific time interval, depending on the dataset. Hence, to conserve the integral quantity with <code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code>’s linear interpolation a pre-processing scheme has to be applied.</p>
186<span id="ref-table-fluxpar"></span><table border="1" class="colwidths-given docutils align-center" id="id1">
187<caption><span class="caption-text">flux fields</span><a class="headerlink" href="#id1" title="Permalink to this table"></a></caption>
188<colgroup>
189<col width="14%" />
190<col width="43%" />
191<col width="14%" />
192<col width="29%" />
193</colgroup>
194<thead valign="bottom">
195<tr class="row-odd"><th class="head">Short Name</th>
196<th class="head">Name</th>
197<th class="head">Units</th>
198<th class="head">Interpolation Type</th>
199</tr>
200</thead>
201<tbody valign="top">
202<tr class="row-even"><td>LSP</td>
203<td>large-scale precipitation</td>
204<td><span class="math notranslate nohighlight">\(m\)</span></td>
205<td>modified linear interpolation</td>
206</tr>
207<tr class="row-odd"><td>CP</td>
208<td>convective precipitation</td>
209<td><span class="math notranslate nohighlight">\(m\)</span></td>
210<td>modified linear interpolation</td>
211</tr>
212<tr class="row-even"><td>SSHF</td>
213<td>surface sensible heat flux</td>
214<td><span class="math notranslate nohighlight">\(J m^{-2}\)</span></td>
215<td>bicubic interpolation</td>
216</tr>
217<tr class="row-odd"><td>EWSS</td>
218<td>eastward turbulent surface stress</td>
219<td><span class="math notranslate nohighlight">\(N m^{-2} s\)</span></td>
220<td>bicubic interpolation</td>
221</tr>
222<tr class="row-even"><td>NSSS</td>
223<td>northward turbulent surface stress</td>
224<td><span class="math notranslate nohighlight">\(N m^{-2} s\)</span></td>
225<td>bicubic interpolation</td>
226</tr>
227<tr class="row-odd"><td>SSR</td>
228<td>surface net solar radiation</td>
229<td><span class="math notranslate nohighlight">\(J m^{-2}\)</span></td>
230<td>bicubic interpolation</td>
231</tr>
232</tbody>
233</table>
234<p>The first step is to <em>de-accumulate</em> the fields in time so that each value represents an integral in x, y, t space.
235Afterwards, a <em>disaggregation</em> scheme is applied which means to break down the integral value into point values.
236In order to be able to carry out the disaggregation procedure proposed by Paul James, additional flux data is retrieved automatically for one day at the beginning and one day at the end of the period specified. Thus, data for flux computation will be requested for the period START_DATE-1 to END_DATE+1. Note that these (additional) dates are used only for interpolation within <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> and are not communicated to the final <code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code> input files.</p>
237<p>The flux disaggregation produces files named <code class="docutils literal notranslate"><span class="pre">fluxYYYYMMDDHH</span></code>, where <code class="docutils literal notranslate"><span class="pre">YYYYMMDDHH</span></code> is the date format. Note, that the first two and last two flux files do not contain any data.</p>
238<div class="admonition note">
239<p class="first admonition-title">Note</p>
240<p class="last">Note also that for operational retrievals (<code class="docutils literal notranslate"><span class="pre">BASETIME</span></code> set to 00 or 12) forecast fluxes are only available until <code class="docutils literal notranslate"><span class="pre">BASETIME</span></code>, so that no polynomial interpolation is possible in the last two time intervals. This is the reason why setting <code class="docutils literal notranslate"><span class="pre">BASETIME</span></code> is not recommended for on demand scripts.</p>
241</div>
242<div class="section" id="disaggregation-for-precipitation-in-older-versions">
243<h2>Disaggregation for precipitation in older versions<a class="headerlink" href="#disaggregation-for-precipitation-in-older-versions" title="Permalink to this headline"></a></h2>
244<p>In <code class="docutils literal notranslate"><span class="pre">flex_extract</span></code> up to version 5 the disaggregation was done with a Fortran program (FLXACC2). In version 6 this part was converted to Python.</p>
245<p>In the old versions (below 7.1) a relatively simple method processes the precipitation fields in a way that is consistent with the scheme applied in <code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code> for all variables: linear interpolation between times where input fields are available.
246At first the accumulated values are divided by the number of hours (i.e., 3 or 6).
247The best option for disaggregation, which was realised, is conservation within the interval under consideration plus the two adjacent ones.
248Unfortunately, this leads to undesired temporal smoothing of the precipitation time series – maxima are damped and minima are raised.
249It is even possible to produce non-zero precipitation in dry intervals bordering a precipitation period as shown in Fig. 1.
250This is obviously undesirable as it will affect wet scavenging, a very efficient removal process for many atmospheric trace species.
251Wet deposition may be produced in grid cells where none should occur, or too little may be produced in others. This could lead to an unrealistic, checkerboard-like deposition fields.
252Horizontally, the precipitation values are averages for a grid cell around the grid point to which they are ascribed, and <code class="docutils literal notranslate"><span class="pre">FLEXPART</span></code> uses bilinear interpolation to obtain precipitation rates at particle positions.
253However, the supporting points in space are not shifted between precipitation and other variables as is the case for the temporal dimension.</p>
254<div class="align-center figure" id="id2">
255<span id="ref-fig-olddisagg"></span><img alt="../_images/old_disagg.png" src="../_images/old_disagg.png" />
256<p class="caption"><span class="caption-text">Fig. 1: Example of disaggregation scheme as implemented in older versions for an isolated precipitation event lasting one time interval (thick blue line). The amount of original precipitation after de-accumulation is given by the blue-shaded area. The green circles represent the discrete grid points after disaggregation and linearly interpolate in between them as indicated by the green line and the green-shaded area. Note that supporting points for the interpolation are shifted by a half-time interval compared to the times when other meteorological fields are available (Hittmeir et al. 2018).</span></p>
257</div>
258<p>Disaggregation is done for 4 adjacent timespans (<span class="math notranslate nohighlight">\(a_0, a_1, a_2, a_3\)</span>) which generates a new, disaggregated value which is output at the central point of the 4 adjacent timespans.</p>
259<div class="math notranslate nohighlight">
260\[\begin{split}   p_{ac} &amp;= 0.5 * a_1\\
261        m &amp;= a_0 + a_2 &gt; 0.\\
262p_{ac}(m) &amp;= a_1(m) * a_2(m) / (a_0(m) + a_2(m))\\
263   p_{bd} &amp;= 0.5 * a_2\\
264        m &amp;= a_1 + a_3 &gt; 0.\\
265p_{bd}(m) &amp;= a_1(m) * a_2(m) / (a_1(m) + a_3(m))\\\end{split}\]</div>
266<p>This new point <span class="math notranslate nohighlight">\(p\)</span> is used for linear interpolation of the complete timeseries afterwards. If one of the 4 original timespans has a value below 0 it is set to 0 prior to the calculation.</p>
267<div class="math notranslate nohighlight">
268\[p = p_{ac} + p_{bd}\]</div>
269</div>
270<div class="section" id="disaggregation-for-precipitation-in-version-7-1">
271<h2>Disaggregation for precipitation in version 7.1<a class="headerlink" href="#disaggregation-for-precipitation-in-version-7-1" title="Permalink to this headline"></a></h2>
272<p>Due to the problems with generating precipitation in originally dry (or lower) intervals and the temporal smoothing a new algorithm was developed. The approach is based on a one dimensional piecewise linear function with two additional supporting grid points within each grid cell, dividing the interval into three pieces. It fulfils the desired requirements by preserving the integral precipitation in each time interval, guaranteeing continuity at interval boundaries, and maintaining non-negativity. An additional monotonicity filter helps to gain monotonicity.
273The more natural requirements of symmetry, reality, computational efficiency and easy implementation motivates the linear formulation.
274These requirements on the reconstruction algorithm imply that time intervals with no precipitation remain unchanged, i.e. the reconstructed values vanish throughout this whole time interval, too.
275In the simplest scenario of an isolated precipitation event, where in the time interval before and after the data values are zero, the reconstruction algorithm therefore has to vanish at the boundaries of the interval, too.
276The additional conditions of continuity and conservation of the precipitation amount then require us to introduce sub-grid points if we want to keep a linear interpolation (Fig. 2).
277The height is thereby determined by the condition of conservation of the integral of the function over the time interval.</p>
278<div class="align-center figure" id="id3">
279<span id="ref-fig-newdisagg"></span><img alt="../_images/new_disagg.png" src="../_images/new_disagg.png" />
280<p class="caption"><span class="caption-text">Fig. 2: Precipitation rate linearly interpolated using a sub-grid with two additional points. Colours as in Fig. 1 (Hittmeir et al. 2018).</span></p>
281</div>
282<p>Figure 3 shows an overview of the new algorithm and its components.</p>
283<div class="align-center figure" id="id4">
284<span id="ref-fig-ia3"></span><img alt="../_images/IA3.png" src="../_images/IA3.png" />
285<p class="caption"><span class="caption-text">Fig. 3: Schematic overview of the basic notation in a precipitation interval with the original precipitation rate g (green) as a step function and the interpolated data <span class="math notranslate nohighlight">\(f\)</span> (dark blue) as the piecewise linear function. The original time interval with fixed grid length <span class="math notranslate nohighlight">\(\delta t\)</span> is split equidistantly in three subintervals denoted by <span class="math notranslate nohighlight">\(I_i^{1,2,3}\)</span>, with the slopes in the subintervals as denoted by <span class="math notranslate nohighlight">\(k_i^{1,2,3}\)</span> . The sub-grid function values <span class="math notranslate nohighlight">\(f_i, f_i^{1,2}, f_{i+1}\)</span> are marked by red diamonds (Hittmeir et al. 2018).</span></p>
286</div>
287<p>The following lists the equations of the new algorithm.</p>
288<div class="math notranslate nohighlight">
289\[ \begin{align}\begin{aligned}f_i^{(1)}=&amp;\frac32 g_i -\frac{1}{12}f_{i}-\frac{5}{12}f_{i+1}\\f_i^{(2)}=&amp;\frac32 g_i -\frac{5}{12}f_{i}-\frac{1}{12}f_{i+1}\\f_{i+1}=&amp;\min\{3 g_i,3 g_{i+1},\sqrt{g_ig_{i+1}}\}\end{aligned}\end{align} \]</div>
290<div class="math notranslate nohighlight">
291\[\begin{split}\textbf{if}  \quad
292\mathrm{sgn}(k_{i}^{(2)})\cdot \mathrm{sgn}(k_{i  }^{(3)})&amp;=-1 \quad \wedge \\
293\mathrm{sgn}(k_{i  }^{(3)})\cdot \mathrm{sgn}(k_{i+1}^{(1)})&amp;=-1 \quad \wedge \\
294\mathrm{sgn}(k_{i+1}^{(1)})\cdot \mathrm{sgn}(k_{i+1}^{(2)})&amp;=-1  \quad
295\textbf{then}\end{split}\]</div>
296<div class="math notranslate nohighlight">
297\[ \begin{align}\begin{aligned}f_{i+1}^\diamond=&amp;\frac{18}{13}g_i-\frac{5}{13}f_i\\f_{i+1}^{\diamond\diamond}=&amp;\frac{18}{13}g_{i+1}-\frac{5}{13}f_{i+2}\\f_{i+1} =&amp; \min\left\{3 g_i,\, 3 g_{i+1},\, \sqrt{(f_{i+1}^\diamond\,f_{i+1}^{\diamond\diamond})_+}\right\}\\f_i^{(1)}=&amp; \frac32 g_i -\frac{1}{12}f_{i}-\frac{5}{12}f_{i+1}^{\textrm{mon}}\\f_i^{(2)}=&amp; \frac32 g_i -\frac{5}{12}f_{i}-\frac{1}{12}f_{i+1}^{\textrm{mon}}\\\textbf{endif}\end{aligned}\end{align} \]</div>
298<p>In the case of the new disaggregation method for precipitation, the two new sub grid points are added in the <code class="docutils literal notranslate"><span class="pre">flux</span></code> output files. They are identified by the forecast step parameter <code class="docutils literal notranslate"><span class="pre">step</span></code> which is 0 for the original time interval and 1 or 2 for the two new sub grid points respectively. The filenames do not change.</p>
299<div class="admonition note">
300<p class="first admonition-title">Note</p>
301<p>The new method for disaggregation was published in the Geoscientific Model Development Journal in 2018:</p>
302<p class="last">Hittmeir, S., Philipp, A., and Seibert, P.: A conservative reconstruction scheme for the interpolation of extensive quantities in the Lagrangian particle dispersion model FLEXPART, Geosci. Model Dev., 11, 2503-2523, <a class="reference external" href="https://doi.org/10.5194/gmd-11-2503-2018">https://doi.org/10.5194/gmd-11-2503-2018</a>, 2018.</p>
303</div>
304</div>
305<div class="section" id="disaggregation-for-the-rest-of-the-flux-fields">
306<h2>Disaggregation for the rest of the flux fields<a class="headerlink" href="#disaggregation-for-the-rest-of-the-flux-fields" title="Permalink to this headline"></a></h2>
307<p>The accumulated values for the other variables are first divided by the number of hours and
308then interpolated to the exact times X using a bicubic interpolation which conserves the integrals of the fluxes within each timespan.
309Disaggregation is done for 4 adjacent timespans (<span class="math notranslate nohighlight">\(p_a, p_b, p_c, p_d\)</span>) which generates a new, disaggregated value which is output at the central point of the 4 adjacent timespans.</p>
310<div class="math notranslate nohighlight">
311\[\begin{split}p_a &amp;= (a_3 - a_0 + 3. * (a_1 - a_2)) / 6. \\
312p_b &amp;= (a_2 + a_0) / 2. - a_1 - 9. * p_a / 2. \\
313p_c &amp;= a_1 - a_0 - 7. * p_a / 2. - 2. * p_b \\
314p_d &amp;= a_0 - p_a / 4. - p_b / 3. - p_c / 2.\end{split}\]</div>
315<p>This new point <span class="math notranslate nohighlight">\(p\)</span> is used for linear interpolation of the complete timeseries afterwards.</p>
316<div class="math notranslate nohighlight">
317\[p = 8. * p_a + 4. * p_b + 2. * p_c + p_d\]</div>
318<div class="toctree-wrapper compound">
319</div>
320</div>
321</div>
322
323
324           </div>
325           
326          </div>
327          <footer>
328 
329    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
330     
331        <a href="vertco.html" class="btn btn-neutral float-right" title="Vertical Coordinate" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
332     
333     
334        <a href="output.html" class="btn btn-neutral float-left" title="Output Data" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
335     
336    </div>
337 
338
339  <hr/>
340
341  <div role="contentinfo">
342    <p>
343        &copy; Copyright 2019, Anne Philipp and Leopold Haimberger
344
345    </p>
346  </div>
347  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
348
349</footer>
350
351        </div>
352      </div>
353
354    </section>
355
356  </div>
357 
358
359
360  <script type="text/javascript">
361      jQuery(function () {
362          SphinxRtdTheme.Navigation.enable(true);
363      });
364  </script>
365
366 
367 
368   
369   
370
371</body>
372</html>
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG