source: flex_extract.git/For_developers/Sphinx/source/Documentation/disagg.rst @ f20342a

ctbtodev
Last change on this file since f20342a was f20342a, checked in by Petra Seibert <petra.seibert [at) univie.ac.at>, 4 years ago

Language corrections for the Sections Developers, Support, Changelog, and the home directory (index.html)

further improvment of documentation, close to final

  • Property mode set to 100644
File size: 10.7 KB
RevLine 
[0b00607]1***************************
[f20342a]2Disaggregation of flux data
[0b00607]3***************************
[41c9dbc]4   
[f20342a]5``FLEXPART`` interpolates meteorological input data linearly to the position of computational
6particles in time and space. This method requires point values in the discrete input fields.
7However, flux data (as listed in table :ref:`ref-table-fluxpar` below) from the ECMWF represent cell
8averages or integrals and are accumulated over a specific time interval, depending on the data
9set. Hence, to conserve the integral quantity with the linear interpolation used in ``FLEXPART``,
10pre-processing has to be applied.
[0b00607]11
12.. _ref-table-fluxpar:
13
[f20342a]14.. csv-table:: Flux fields
[0b00607]15    :header: "Short Name", "Name", "Units", "Interpolation Type"
16    :align: center
17    :widths: 5,15,5,10
18   
19    LSP,  "large-scale precipitation",          ":math:`m`",          "modified linear interpolation"
20    CP,   "convective precipitation",           ":math:`m`",          "modified linear interpolation"
21    SSHF, "surface sensible heat flux",         ":math:`J m^{-2}`",   "bicubic interpolation"
22    EWSS, "eastward turbulent surface stress",  ":math:`N m^{-2} s`", "bicubic interpolation"
23    NSSS, "northward turbulent surface stress", ":math:`N m^{-2} s`", "bicubic interpolation"
24    SSR,  "surface net solar radiation",        ":math:`J m^{-2}`",   "bicubic interpolation"
25   
26
[f20342a]27The first step is to *de-accumulate* the fields in time so that each value represents non-overlapping integrals in x-, y-, and t-space.
28Afterwards, a *disaggregation* scheme is applied which means to convert the integral value to corresponding point values to be used late for the interpolation.
29The disaggregation procedure as proposed by Paul James (currently, the standard) requires additional flux data for one day at the beginning and one day at the end of the period specified.
30They are retrieved automatically. 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 ``flex_extract`` and are not contained in the final ``FLEXPART`` input files.
[0b00607]31
[f20342a]32The flux disaggregation produces files named ``fluxYYYYMMDDHH``, where ``YYYYMMDDHH`` is the date format. Note that the first two and last two flux files do not contain any data.
[0b00607]33
34.. note::
35
[f20342a]36    Note also that for operational retrievals (``BASETIME`` set to 00 or 12), forecast fluxes are only available until ``BASETIME``, so that no polynomial interpolation is possible in the last two time intervals. This is the reason why setting ``BASETIME`` is not recommended for on-demand scripts.       
[0b00607]37       
38
39Disaggregation for precipitation in older versions
40--------------------------------------------------
41
[f20342a]42In ``flex_extract`` up to version 5, the disaggregation was done with a Fortran program (FLXACC2). In version 6, this part was recoded in Python.
[0b00607]43
[f20342a]44In the old versions (below 7.1), a relatively simple method processes the precipitation fields in a way that is consistent with the linear interpolation between times where input fields are available that is applied in ``FLEXPART`` for all variables.
45This scheme (from Paul James) at first divides the accumulated values by the number of hours (i.e., 3 or 6). ???
[0b00607]46The best option for disaggregation, which was realised, is conservation within the interval under consideration plus the two adjacent ones.
47Unfortunately, this leads to undesired temporal smoothing of the precipitation time series – maxima are damped and minima are raised.
48It is even possible to produce non-zero precipitation in dry intervals bordering a precipitation period as shown in Fig. 1.
49This is obviously undesirable as it will affect wet scavenging, a very efficient removal process for many atmospheric trace species.
50Wet 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.
51Horizontally, the precipitation values are averages for a grid cell around the grid point to which they are ascribed, and ``FLEXPART`` uses bilinear interpolation to obtain precipitation rates at particle positions.
52However, the supporting points in space are not shifted between precipitation and other variables as is the case for the temporal dimension.
53
54
55.. _ref-fig-olddisagg:
56
57.. figure:: ../_files/old_disagg.png
58    :figclass: align-center
59
[f20342a]60    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 half a time interval compared to the times when other meteorological fields are available (Hittmeir et al. 2018).
[0b00607]61
62
63
[f20342a]64Disaggregation is done for four adjacent timespans (:math:`a_0, a_1, a_2, a_3`) which generates a new, disaggregated value which is output at the central point of the four adjacent timespans.
[0b00607]65
66.. math::
67
68       p_{ac} &= 0.5 * a_1\\
69            m &= a_0 + a_2 > 0.\\
70    p_{ac}(m) &= a_1(m) * a_2(m) / (a_0(m) + a_2(m))\\
71       p_{bd} &= 0.5 * a_2\\
72            m &= a_1 + a_3 > 0.\\
73    p_{bd}(m) &= a_1(m) * a_2(m) / (a_1(m) + a_3(m))\\
74
75
[f20342a]76This new point :math:`p` is used for linear interpolation of the complete timeseries afterwards. If one of the four original timespans has a value below 0, it is set to 0 prior to the calculation.
[0b00607]77   
78.. math::
79
80    p = p_{ac} + p_{bd}
81
82
83
84
85Disaggregation for precipitation in version 7.1
86-----------------------------------------------
87
[f20342a]88Due to the problems mentioned above, 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 of preserving the integral precipitation in each time interval, guaranteeing continuity at interval boundaries, and maintaining non-negativity. An additional filter improves monotonicity.
89The more natural requirements of symmetry, reality, computational efficiency and easy implementation motivates the use of a linear formulation.
90These requirements for the reconstruction algorithm imply that time intervals with no precipitation remain unchanged, i. e., the reconstructed values vanish throughout this whole time interval, too.
[0b00607]91In 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.
92The 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).
93The height is thereby determined by the condition of conservation of the integral of the function over the time interval.
94 
95   
96.. _ref-fig-newdisagg:                       
97
98.. figure:: ../_files/new_disagg.png         
99    :figclass: align-center
100   
101    Fig. 2: Precipitation rate linearly interpolated using a sub-grid with two additional points. Colours as in Fig. 1 (Hittmeir et al. 2018).       
102   
103
104Figure 3 shows an overview of the new algorithm and its components.
105   
106.. _ref-fig-IA3:                       
107
108.. figure:: ../_files/IA3.png         
[d9abaac]109    :figclass: align-center
[0b00607]110   
111    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 :math:`f` (dark blue) as the piecewise linear function. The original time interval with fixed grid length :math:`\delta t` is split equidistantly in three subintervals denoted by :math:`I_i^{1,2,3}`, with the slopes in the subintervals as denoted by :math:`k_i^{1,2,3}` . The sub-grid function values :math:`f_i, f_i^{1,2}, f_{i+1}` are marked by red diamonds (Hittmeir et al. 2018).
112   
113
114The following lists the equations of the new algorithm.
115   
116.. math::
117
118    f_i^{(1)}=&\frac32 g_i -\frac{1}{12}f_{i}-\frac{5}{12}f_{i+1}
119   
120    f_i^{(2)}=&\frac32 g_i -\frac{5}{12}f_{i}-\frac{1}{12}f_{i+1}
121   
122    f_{i+1}=&\min\{3 g_i,3 g_{i+1},\sqrt{g_ig_{i+1}}\}
123   
124.. math::
125   
126    \textbf{if}  \quad
127    \mathrm{sgn}(k_{i}^{(2)})\cdot \mathrm{sgn}(k_{i  }^{(3)})&=-1 \quad \wedge \\
128    \mathrm{sgn}(k_{i  }^{(3)})\cdot \mathrm{sgn}(k_{i+1}^{(1)})&=-1 \quad \wedge \\
129    \mathrm{sgn}(k_{i+1}^{(1)})\cdot \mathrm{sgn}(k_{i+1}^{(2)})&=-1  \quad
130    \textbf{then}
131
132.. math:: 
133   
134    f_{i+1}^\diamond=&\frac{18}{13}g_i-\frac{5}{13}f_i
135   
136    f_{i+1}^{\diamond\diamond}=&\frac{18}{13}g_{i+1}-\frac{5}{13}f_{i+2}
137   
138    f_{i+1} =& \min\left\{3 g_i,\, 3 g_{i+1},\, \sqrt{(f_{i+1}^\diamond\,f_{i+1}^{\diamond\diamond})_+}\right\}   
139   
140    f_i^{(1)}=& \frac32 g_i -\frac{1}{12}f_{i}-\frac{5}{12}f_{i+1}^{\textrm{mon}}
141   
142    f_i^{(2)}=& \frac32 g_i -\frac{5}{12}f_{i}-\frac{1}{12}f_{i+1}^{\textrm{mon}}
143   
144    \textbf{endif}
145
146
[f20342a]147In the case of the new disaggregation method for precipitation, the two new sub-grid points are added in the ``flux`` output files. They are identified by the forecast step parameter ``step`` which is 0 for the original time interval, and 1 or 2, respectively, for the two new sub-grid points. The filenames do not change.   
[0b00607]148
149   
150.. note::
151
[f20342a]152    The new method for disaggregation was published in the journal Geoscientific Model Development in 2018:
[0b00607]153   
154    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, https://doi.org/10.5194/gmd-11-2503-2018, 2018.
155
156
157
158
[f20342a]159Disaggregation for the other flux fields
[0b00607]160----------------------------------------------
161     
162The accumulated values for the other variables are first divided by the number of hours and
[f20342a]163then interpolated to the exact times using a bicubic interpolation which conserves the integrals of the fluxes within each timespan.
164Disaggregation is done for four adjacent timespans (:math:`p_a, p_b, p_c, p_d`) which produces a new, disaggregated value that is the output at the central point of the four adjacent timespans.
[0b00607]165
166.. math::
167   
168    p_a &= (a_3 - a_0 + 3. * (a_1 - a_2)) / 6. \\   
169    p_b &= (a_2 + a_0) / 2. - a_1 - 9. * p_a / 2. \\
170    p_c &= a_1 - a_0 - 7. * p_a / 2. - 2. * p_b \\   
171    p_d &= a_0 - p_a / 4. - p_b / 3. - p_c / 2.
172
173This new point :math:`p` is used for linear interpolation of the complete timeseries afterwards.
174
175.. math::
176   
177    p = 8. * p_a + 4. * p_b + 2. * p_c + p_d
178
179
180
181       
[41c9dbc]182       
183.. toctree::
184    :hidden:
185    :maxdepth: 2
186   
[d9abaac]187   
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG