Exercise 4

In this exercise we use historical air temperature measurements from Potsdam, to be found at https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/monthly/kl/historical/monatswerte_KL_03987_18930101_20221231_hist.zip. The file 'product_klima_monat...' contains the monthly mean temperatures in column 'MO_TT'.

- Load the temperature time series using the command
`np.loadtxt( file, delimiter=';', skiprows=1, usecols=5 )`

. - The data is available from January 1893 to today. Plot the data against the year (1893,1894,...) using the
`plt.plot()`

function. - Subtract the mean from the timeseries and calculate and plot the autocorrelation function of the data. What is the dominant feature?
- Calculate and plot the power spectral density using the fast Fourier transform
`scipy.fftpack.fft()`

.

The yearly cycle is the dominant feature of monthly temperature data. In order to see other features, we can use yearly data by averaging data of each year. The resulting timeseries has 1/12th of the length of the original series.

- Calculate and plot the autocorrelation function of the data. How fast/slow is the decay?
- Calculate a scaling function, either by using the power spectrum or the time-averaged MSD (of
`cumsum(x)`

). Assuming power-law decay of autocorrelations: what is the exponent?