dap application 1. recurrent plots (recurrence plot tab … · 2018. 7. 5. · frequency-intensity...

17
Annex1. Drought Assessment Package Application (DAP APP) to Georgia temperature time series DAP APPLICATION Program package presents easy-to use friendly toolbox working with time series. Application is designed to work with TXT or DAT files which contain for example temperature or precipitationmeasures.Input files should have only one column. This package includes different popular instruments for data analysis: 1. Recurrent plots (RECURRENCE PLOT tab menu); 2. Detrended Fluctuation Analysis (DFA tab menu); 3. Power Spectrum and Histogram (HISTOGRAM/POWER SPECTRUM tab menu); 4. Correlation calculation (CORRELATION DIM/AUTOCORRELATION tab menu); 5. Lyapunov exponent calculation (LYAPUNOV EXPONENT tab menu); 6. Stationary test (STATIONARY TEST); The package includes Tbilisi Temperature daily series, Tbilisi Max Temperature (Tmax) summer period series, Duration (in days) of period with Tmax>30 C o series, Symbolic Tmax daily series (description is on the page 5 after Fig.7). All listed below applications are realized on the Tbilisi data. 1. IMPORT DATA .To import time series 2. go to the tab menu MAIN SETTING; 3. click on the button “Import TXT Series” as it is shown in the Fig.1: Fig. 1 (Instruction) !You can import your data in the above mentioned format (.dat; .txt; files only with one column is accepted) by just clicking on the data directory button “Import TXT Series” and dragging the icon of your file with data into this directory. In the appeared dialog box select input file (Fig. 2):

Upload: others

Post on 31-Jan-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

  • Annex1. Drought Assessment Package Application (DAP APP) to Georgia temperature time series

    DAP APPLICATION

    Program package presents easy-to use friendly toolbox working with time series. Application is designed to

    work with TXT or DAT files which contain for example temperature or precipitationmeasures.Input files

    should have only one column.

    This package includes different popular instruments for data analysis:

    1. Recurrent plots (RECURRENCE PLOT tab menu);

    2. Detrended Fluctuation Analysis (DFA tab menu);

    3. Power Spectrum and Histogram (HISTOGRAM/POWER SPECTRUM tab menu);

    4. Correlation calculation (CORRELATION DIM/AUTOCORRELATION tab menu);

    5. Lyapunov exponent calculation (LYAPUNOV EXPONENT tab menu);

    6. Stationary test (STATIONARY TEST);

    The package includes Tbilisi Temperature daily series, Tbilisi Max Temperature (Tmax) summer period series,

    Duration (in days) of period with Tmax>30 Co series, Symbolic Tmax daily series (description is on the page 5

    after Fig.7). All listed below applications are realized on the Tbilisi data.

    1. IMPORT DATA .To import time series

    2. go to the tab menu MAIN SETTING;

    3. click on the button “Import TXT Series” as it is shown in the Fig.1:

    Fig. 1 (Instruction)

    !You can import your data in the above mentioned format (.dat; .txt; files only with one column is

    accepted) by just clicking on the data directory button “Import TXT Series” and dragging the icon of

    your file with data into this directory.

    In the appeared dialog box select input file (Fig. 2):

  • Fig. 2 (Selecting input file)

    In the Memo the selected file name will be written:

    To view time series, go to the tab menu DATA VIEW and click on the button “Show”:

    Fig. 3 (Data view)

    There is option to show data step by step (in windows). For it in the Window length field indicate a length

    of window (step) and click on the button “SET”. (See Fig.3) To turn from one window on the other one, use

    buttons with arrows. All calculation in the next tabs will be performed on a selected window of time series.

  • 4. RECURRENCE PLOT

    This toolbox produces a recurrence plot of the, possibly multivariate, data set. That means, for each point in

    the data set it looks for all points, such that the distance between these two points is smaller than a given size

    in a given embedding space.

    Fig. 4 (Recurrence Plot tab)

    To build recurrence plot on imported time series go to the tab RECURRENCE PLOT (see Fig.4), indicate

    DIMENSION,DELAY and DISTANCE (Threshold value) between trajectories, and click on the button

    “Recurrence Plot”.If you have troubles with Recurrence Plot execution, read technical notes on the page 9.

    Example 1:

    We plottedRecurrence Plots (RP) on the Tbilisi Temperature Daily series (all seasons), which includes 1911-

    2011 years (Fig. 5a).

    Fig. 5a (Tbilisi daily series,

    1911-2011 years)

    Calculated PRs are shown on the Fig. 5b,c:

  • Fig.5RPs b) DIM:7, LAG:8, THESHOLD:5; c)DIM:5, LAG:365, THERSHOLD:4

    Pairs of integers representing the indexes on the Fig.5 b, c of the pairs of points having a distance smaller than

    THERSHOLD value are projected on the RECURRENCE PLOT.

    Diagonal lines in the RP on the Fig. 5b indicate the existence of the determinism in the system under

    consideration. The vertical distances between these diagonal lines reflect the characteristic time scales of the

    system. The RP on the Fig. 5cindicates the clear harmonic oscillations in Temperature daily series.

    RP plot can be saved as Image from context menu of a canvas (Command: Save Plot as Picture)

    Example 2: We took only summer month from Tmax daily series and calculated duration of periods (in days)

    with max temperature (Tmax) higher than 30 Co. In the result we get duration series which is depicted on the

    Fig. 6:

    Fig. 6 (Duration of periods with Tmax higher 30 Co)

    Fig. 7. Frequency-Intensity Estimate Plot: a) linear plot of number of droughts N with duration more than 2,

    5, 10, 15, 20, 25, 30, 35 days versus corresponding durations (intensity of droughts); b) the same in semilog

    scale - log N versus intensity with straight line approximation for all intensities; c) the same as 7b with

    straight line approximation for intensities from 2 to 15 days.

  • Frequency-Intensity Estimate Plot of high-temperature periods was done on Duration series (Fig. 6) and it

    manifests the presence of heavy-tail i.e. different statistics for extreme events (long droughts) with duration

    larger than 15 days. We observe that up to period length equal to 15 days, relationship between occurrence

    of high-temperature periods and period lengths is very well approximated by exponential function (Fig. 7c)

    and recurrence time TR can be accessed accurately. For example, 15 days drought reoccur as

    (antilog(log0.3))/4 (1/year) ≈ 2/4 ≈ 0.5 (1/year) or TR = once per two years. The linear approximation for a

    whole semilog plot (Fig. 7 b) is much less accurate and for 15 days drought reoccurrence we get

    (antilog(log0.6))/4 (1/year) ≈ 4/4 ≈ 1 (1/year) or TR ≈ once per year and for droughts with duration 35 days

    ((antilog(log(-0.35)))/4 (1/year) ≈ 0.45/4 (1/year) ≈ 0.1 (1/year) or TR ≈ once per ten years, which is

    much less than observed data. According to observed data ((antilog(log(0)))/4 (1/year) ≈ 1/4 (1/year) or TR

    ≈ once per four years. This shows that for hard droughts approximation we need to use special statistics

    (Humbel, etc).

    The calculated RP plots for duration series are depicted on the Figs. 8a, b:

    Fig.8. RPs a) DIM:7, LAG:8, THESHOLD:5; b)DIM:2, LAG:21, THERSHOLD:0.5

    RP plots depicted on the Fig 8 a, b indicate the existence of some regular recurrence structures as well as

    drifts in duration of periods with high temperature (>30 Co).

    Plot can be saved as Image (from context menu of Image Canvas).

    Example 3:

    Fig.9. RPs a) DIM:2, LAG:42, THESHOLD:0.5; b)DIM:3, LAG:365, THERSHOLD:0.05

  • RP plots depicted on the Fig.9 were done for symbolic Tmax series of summer period.

    How did we get it? Tmax value >30 Co was replaced on 1 (coded as 1) and all other values were coded as 0.

    In the result we get series of nulls (0) and ones (1). We can observe on these RP plots structures which say

    about similarity of patterns in summer periods and say that dry periods (with high air temperature) occur

    periodically often in Tbilisi.

    Additional information how to set parameters and theoretical part can be found in the book “Recurrence

    Quantification Analysis: Theory and Best Practices”, Charles L. Webber, Jr., Norbert Marwan, 2015

    5. DETRENDED FLUCTUATION ANALYSIS

    To estimate DFA slope of time series go to the tab DFA.

    Enter parameters: Polynom degree, The largest Box width, The smallest box width(or remain fields empty to

    use parameters by default) and click on the button Execute(Fig.10)The article “Peng C-K, Havlin S, Stanley HE,

    Goldberger AL. Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time

    series” contains theoretical bases of the method and explains how correctly to choose parameters.

    Input time series should have at least 4 windows, therefore default parameter for maxbox is equal to ¼ of

    series length. And the minbox depends on polynom degree. For polynom 2 minbox is equal 4.

    On the Fig. 8 the result is shown for Polynomdegree(default), The largest Box width (default), The smallest box

    width(default

    ):

    Fig. 10 (DFA analysis for Tmax daily series of summer period)

    DFA Slope Plot can be saved as Image (from context menu of Image Canvas).

    Scaling expoment 0.7 of Tmax summer period daily series considered in this study have long-range

    correlations.

    6. HISTOGRAM/POWER SPECTRUM

    By histograms we can estimate the scalar distribution of a time series. To plot histogram we use the tab

    HISTOGRAM/POWER SPECTRUM.

    Set parametrs: Enternumber of bins in the field or use parameter by default (remainthe field empty). Click on

    the button Plot Histogram:

  • Fig. 11 (Histogram for Tmax summer period daily series)

    A power spectrum is calculated by binning adjacent frequencies according to the option Frequency

    resolution.To plot power spectrum enter parameters (Sampling rate, Frequency resolution and so on) or

    remain fields empty to use default parameters, and click on the button Plot Spectrum.

    FREQUENCY RESOLUTION is equal to the inverse of the time duration during which a signal is being

    observed, i.e., 1/T. This parameter depends on the duration of our records. If we decrease resolution we skip

    frequencies and our spectrum looks more smooth.

    By changing the sampling rate we change frequency coverage. For example increasing the sampling rate we

    get that the frequency axis will span more values, but they will be spaced the same distance in Hz as the

    lower sampling rate.

    Example:

    Power spectrum is calculated for Duration series. We see on the Fig. 12 a dominant frequency 0.01 (1/day). It

    means we have dominant period in duration series equaled to about 100 days, what corresponds to summer

    period length.

    Fig. 12( Power Spectrum on the Duration time series from Fig. 6)

    Histogram and Spectrum plots can be saved as Image (from context menu of Image Canvas).

    7. CORRELATION DIM/AUTOCORRELATION

    Autocorrelation function is calculated by formula:

  • where s is the standard deviation of the dataxand y - its average

    To calculate autocorrelation function click on the button Autocorrelation:

    Fig. 13 (Autocorrelation function for the Tmax daily series (summer period) 1911-2014), only

    parameter Delay was set to 92)

    We observe weak positive correlation increase from the delay equal to 45 days for both Tmax

    summer periods daily and symbolic series.

    Fig. 14(Autocorrelation function for the Symboic daily series (summer peridod) 1911-2014, DIM:8,

    LAG:92)

    The correlation dimension is a measure of the dimensionality of the space occupied by a set of random

    points, often referred to as a type of fractal dimension.It is computed most efficiently by the correlation sum.

    𝐶(𝑚, 𝑒) =1

    𝑁𝑝𝑎𝑖𝑟𝑠∑ ∑ 𝜃(𝑒 − |𝑠𝑗−𝑠𝑘|)𝑘

  • Fig.15 (Correlation dimensionfor the Tmax daily series (summer period) 1911-2014), only

    parameter Delay was set to 92)

    Fig. 15 shows that all curves do collapse to some value (0.2), which is Correlation Dim.

    Hints:

    Plot Canvas iszoom able, what means we can zoom in, zoom out and scale plots. To Zoom In plot we

    should selected a region we want to see in details. To do it move pointer of the mouse to the upper left

    corner of interesting region, click left mouse button and holding button clicked moves to the bottom

    right corner of a region. Release button.

    To restore initial zoom, click left button in any place of canvas and holding it clicked moves to upper

    corner of canvas.

    To move plots, click right mouse button and holding it clicked move a plot.

    8. LYAPUNOV EXPONENT

    Lyapunov exponents are an important means of quantification for unstable systems. The Lyapunovexponent

    gives the rate of exponential divergence from perturbed initial conditions.

    Go to the tab LYAPUNOV EXPONENT

    Largest Lyapunov exponent of a given scalar data set is estimated by using the algorithm of [M. T.

    Rosenstein, J. J. Collins, C. J. De Luca, A practical method for calculating largest Lyapunov exponents from small

    data sets, Physica D 65, 117 (1993)]

    To estimate value enter parameters (DIMandLAG) and click on the button Execute:

    For detailed information about method read the next article: H. Kantz, A robust method to estimate the maximal

    Lyapunov exponent of a time series, Phys. Lett. A 185, 77 (1994).

    Fig.16 (Lyapunov exponent for the Tmax daily series (summer period) 1911-2014), MAX DIM:10,

    LAG:92)

  • Negative values of Lyapunov exponent at these parameters indicate on stable behavior of dynamics.

    Calculated Lyapunov curve can be exportedto txt file for further estimation of Lyapunov dimension

    (slope). Use command Export to file from the context menu of Image Canvas.

    9. STATIONARITY TEST

    To apply for stationary test go to the tab STATIONARITY TEST.

    This test seeks for nonstationarity in a time series by dividing it into a number of segments and calculating

    the cross-forecast errors between the different segments. The model used for the forecast is zeroth order

    model as proposed by [ T. Schreiber and A. Schmitz, Discrimination power of measures for nonlinearity in a time

    series, Phys. Rev. E 55, 5443 (1997).].

    For all possible combinations of the N segments the forecast errors are calculated.

    On the X axis the index of the segment that is forecasted is projected.

    The cross-forecast error normalized to the standard deviation of the segment that is forecasted is projected

    onto Y axis.

    Fig.17 (Stationarity test)

    Test on stationary was performed on Tmax summer period daily series. The time series was divided into 3

    segment. Cross-forecast error is used here as qualitative estimation of variation in the dynamics of one

    segment with respect to others.

    TECHNICAL NOTES:

    If during executing of recurrence plot the program stop working:

    http://www.mpipks-dresden.mpg.de/~tisean/TISEAN_2.1/docs/chaospaper/citation.html#statiohttp://www.mpipks-dresden.mpg.de/~tisean/TISEAN_2.1/docs/chaospaper/citation.html#statio

  • Try to do it

    1. Open your Start menu and click Control Panel

    2. Browse to “System Maintenance” then “System”

    3. In the left panel, select “Advanced System Settings” from the available links

    4. You should now see the System Properties Window, which will have three sections. The top

    section is labeled “Performance” and has a “Settings” button. Click this button.

    5. Select the “Data Execution Prevention” tab.

    6. Select the option which reads “Turn on DEP for all programs and services except those I select”

    7. Use the “Browse” button, go to the folder “DAPAPP_OCT2015” and select rpm.exefile and click

    Open to add it to your exceptions list.

    8. Click Apply or OK to commit your changes.

    Annex 2. Drought Assessment Package Application (DAP APP) to Greece temperature time series

    DAAP Application: Example, AthensTmax daily series

    Fig.1 (Summer periods (Jun,Jul,Aug ) Tmax daily series, 1915-2013 years)

    Fig.1 shows the Tmax daily series in Athens (Greece) for summer periods during 1915-2013 years.

  • The file with Tmax daily series of summer periods is Tmax_Athen_SummerPeriods1915-2013.txt

    Fig2. (PDF of Tmax summer periods distribution) in Athens (Greece)

    Fig. 3 (Power spectrum of Tmax summer periods daily seres, default parameters)

    On the figure 3 we observe one dominant peak (0.01) which period is about 100 days (summer length).

    Fig. 4 (Autocorrelation function for Tmax summer periods daily series, default parameters)

    Autocorrelation function just demonstrates as that correlation weakly increases in the second part of summer (after 45 days delay).

  • Fig. 5 (DFA analysis for Tmax summer periods daily series, default parameters)

    DFA exactly shows that there are 2 components in scaling behavior of temperature in summer periods.

    Fig. 6 (Lyapunov exponent of summer period time series, MAX DIM:10)

    Lyapunov exponent values are negatives what indicates on the stable dynamics in temperature variation

    during summer periods in Athens (Greece).

  • Fig. 7 (RPs for Tmax summer periods symbolic series DIM:12, LAG:90, THRESHOLD0.05:

    a) 1915-1947 yy; b)1947-1979 yy; c)1979-2013 yy)

    Tmax summer periods series was transformed into so called “symbolic series”.

    It means that all Tmax values higher or equal to 32 was replaced by “1” and all values 32 oC). On the figure 8 on the X axis is projected the number of such periods and on Y axis- the length (number of days) of a given period.

    The file with periodical series is Tmax_periods_higher32_Athen1915-2013.dat

  • Fig. 9 RP of Periodical series (DIM:3, LAG:4, THESHOLD:2)

    Fig. 10. RP of Periodical series ( DIM:8, LAG:10, THESHOLD:8)

    RP plots depicted on the Fig 9, 10 indicate the existence of some drifts in periodical series.

    Fig. 11. Frequency Estimate Plots (Athens Temperature data (Greece) : a) linear plot of number of droughts N

    with duration more than 2 days versus corresponding durations (intensity of droughts); b) the same in semilog

    scale - log N versus intensity with straight line approximation for all intensities; c) the same as 7b with straight

    line approximation for intensities from 15 to 30 days.

  • Frequency-Intensity Estimate Plot of high-temperature periods was done on Greece duration series (Fig. 6)

    and it manifests the presence of heavy-tail i.e. different statistics for extreme events (long droughts) with

    duration larger than 15 days. We observe that like in case of Georgia (Annex 1, Fig. 7) the plot of N versus m

    has a knee in the interval of m 15-20 days. On the whole the relationship between occurrence of high-

    temperature periods N and period lengths m is better approximated by exponential function than Georgian

    plot. The linear approximation for droughts longer than 35 days (Fig. 11 b) reoccurrence results in

    (antilog(log-0.25))/5 (1/year) ≈ 0.56/5 ≈ 0.11 (1/year) or TR ≈ once per ten years, which is close to result

    obtained in Georgia.

  • Fig.11 (DFA of periodical series, default parameters)

    DFA analysis on periodical series gives us scaling exponent equal to 0.53. It indicated on a weak correlation in high temperature periods.

    Weak correlation isalso revealed from the autocorrelation function depicted on the figure 12.

    Fig.12 Autocorrelation function of Periodical series (DELAY:90)