HOBO Indices

Exercise 3: Transform time series data into indices.

Michael Stölzle mailto:michael.stoelzle@hydro.uni-freiburg.de (University of Freiburg)
2020-01-13

Table of Contents


Details
Due date 2019-01-14 (upload of indices)
Data 1-hour and 10-minute HOBO data frame
Challanges Calculate a variety of indices and provide them for the course

Aim

You should calculate 9 temperature indices and 2 light intensity indices to give an characterization of your HOBO location. Indices are the basis to compare your own data agianst other measurements.

Report: The research questions here are: “How different is your temperature series compared to other HOBO locations and what might be the reasons for the differences?”. First, shortly present/describe how you have calculated the indices (e.g. with code blocks) and give an overview of all index values. Are your index values reasonable? Then compare them with the other locations and discuss in the exercise report potential reasons for the differences. Light intensity might be very different across the different locations; briefly discuss your light intensity considering temperature peaks or the diurnal cycle of your light intensity. If possible, generate map(s) that visualize the spatial variability of one or more index values and discuss briefly why there are (no) differences across the city of Freiburg (this can be also done with QGIS and you can use maps generated during the second course week –> Mirko Maelicke). For advanced students a closer look on the similarity of indices around your HOBO location might be interesting: Are temperature series from locations that are nearer to my location are more similiar than series from location that a further away? Finally, make a short comparison of the temperature during christmas break 2019/2020 with the long-term average temperature.

1. Temperature indices

Calculate following temperature indices. Temperatures are given in Celsius (°C), temperature intervals are given in Kelvin (K). Use 3 decimal places for your index values.

No. Index Description Unit
1 \(T_{AVG}\) Avergage temperature °C
2 \(T_{DAY}\) Mean day temperature °C
3 \(T_{NHT}\) Mean night temperature °C
4 \(d_{ND}\) Difference \(T_{NHT}\) - \(T_{DAY}\) -
5 \(T_{AMP}\) Daily amplitude K
6 \(T_{FL}\) Flashiness index -
7 \({\Delta {T3}}\) Most rapid temperature change in 3 hours K
8 \({\Delta {T12}}\) Most rapid temperature change in 12 hours K
9 \(f_{NA}\) Fraction of missing values -

1.1 Mean temperatures \(T_{AVG}\), \(T_{DAY}\), \(T_{NHT}\)

Calculate the mean temperature of your entire hourly temperatur series (all hours, during day, during night). Note: For this exercise a day temperature is considered to be between 6:00am and 5:59pm, while a night temperature is considered to be between 6:00pm and 5:59am.

Group all day- and night-periods together and calculate the mean temperature based on your quality-checked 1-hour-temperature series. This results into two values: the average day temperature for your HOBO (\(T_{DAY}\)) and the average night temperature (\(T_{NHT}\)). You can use lubridate to convert your time information into an integer number for the hours (0-23).

Calculate \(d_{ND}\) to gain an index about the general temperature index for day and night.

1.2 Mean daily amplitude \(T_{AMP}\)

Calculate the temperature range between \(T_{max}\) and \(T_{min}\) for each day and then average these values. One day includes the hours 0 - 23.

1.3 Flashiness \(T_{FL}\)

Based on the R-B Index (or Flashiness Index) from Baker et al. (2004) link the pathlength of your filled HOBO-series is calculated to quantify how flashy or how stable/smooth your hourly temperature series is compared to other HOBO series:

\[T_{FL} = \frac{\sum_{i=2}^n|T_i - T_{i-1}|} {(n-1)}\] with \(n\) = number of observations and \(T_i\) temperature at point in time \(i\). The index \(T_{FL}\) quantifies the average absolute temperature change per hour in your HOBO series.

1.4 Most rapid temperature change \(\Delta{T}\)

What is the largest temperature change in your HOBO series within a specific time (e.g. 3 or 12 hours)? Consider both, rapid temperature increase and decrease.

A solution without for-loop is recommended.

Hints: First, implement a function to calculate the range between the max(x) and min(x) of a vector x. Use this function in the FUN= argument of the rollapply-function (from zoo package). Configure rollapply to be right-alinged and to fill gaps with NA. Then integrate the rollapply-function into a mutate-command, e.g. %>% mutate(t06 = rollapply(temp, 6, FUN=...)). Arrange your data_frame with the new column to identify the highest temperature change within 6 hours.

1.7 Fraction of NA-Values \(f_{NA}\)

Fraction of NA-values in entire data series (before filling data with reference stations). Index value should be between 0 and 1. Helpful functions: is.na, which,…

In case you have added manually NA-periods at the beginning or end of your time series to gain the predefined time period then excluded those synthetic NA-periods from this index.

2. Light intensity indices (with 10-min series)

Light intensity indices can give valueable information about the radiation influence during the temperature measurements.

Light intensity indices must be calculated with the 10-minute series (i.e. raw data series). Depending on your HOBO mesurement setup and the exposition the index values might vary markedly among the different HOBO locations.

No. Index Description Unit
10 \(L_{md}\) Average light intensity at midday (12:00) lux
11 \(L_{95}\) 95th percentile of light intensity lux

For \(L_{md}\) use your 10-minute light intensity series and extract all midday data points (i.e. hour = 12, minute = 0) and calculate the average of these values. Consider only days when the HOBO sensor was installed outside at your home location. Typical values of \(L_{md}\) may range between 100 and 25.000 lux.

For \(L_{95}\) use all 10-minute light intensity values and calulate the 95th percentile (i.e. only 5% of your values have higher light intensity).

Both indices should also be added to the Index Sheet (see below.)

3. Submit indices

Enter your indices in the Indices sheet in the HOBO Meta table. Three significant digits for all index values are enough.

Submission of indices here.

Due date: Tue, 2020-01-14

4. Long-term average

You should compare your \(T_{AVG,HOBO}\) value against the long-term \(T_{AVG,REF}\) temperature of one reference station. Therefore download a time series of reference temperature (e.g. DWD source) with a minimum of 20 years and calculate the average temperature for each period 14th Dec to 6th Jan for each year. Then compare your \(T_{AVG,HOBO}\) against the variability in temperature you gain from the 20 or more reference values.

Report: In the report briefly compare your average temperature against the long-term average to put your temperature measurement into perspective: Was the temperature during 2019-12-14 to 2020-01-06 similar, colder, warmer than the average temperature. You might consider for discussion here that your HOBo temperature measurement have an offset compared to the used reference station. You can also refer to the outcome of the corresponding regression model to better understand differences between the temperature at your location and the temperature at the reference station.

Additionally, you could calculate more indices from the reference station (e.g. average minimum, average maximum temperature, flashiness, rapid changes) and compare your indices against those calculated values.