Programming project¶

Instructions¶

The programming tasks described below have to be done in groups of two. It's totally okay to ask for help or advice to others (also to me!), but copy-pasting from your classmates is strictly forbidden. You will see that some tasks require internet searches that go beyond what you've learned in my class notes. This is expected: my goal is for you to be able to solve new problems more or less independently.

Project due date: Sunday 11.06.2023, 23:59 (the return folders on OLAT will close at precisely this time - no exceptions!)

Please return two files:

  • the full notebook as .ipynb, executed with all outputs (I recommend to execute "Restart kernel and run all cells" one last time before submission)
  • any additional file you may have downloaded for your project (as zip or tar file containing several files if too large).

Please return only one project per group (one of the two has to upload the files).

Grading (30% of the final VU grade) will be based on the following criteria:

  • correctness of the code (the notebook should theoretically run on my laptop as well, assuming that the data files are in the folder)
  • correctness of the solutions (correct plot, correct values, etc.)
  • for the plots: correct use of title, axis labels, units, etc.
  • clarity of the code (no unused lines of code, presence of inline comments, etc.)
  • clarity and layout of the overall document (correct use of the Jupyter Notebook markdown format)
  • originality (for the open project)

You can download this notebook to get started. Delete this "Instructions" section, add your name and Matrikelnummer and start coding! For the tasks that ask for a written answer (e.g. some values, answers, etc.), please use the notebook's markdown format to write them down!

Preamble¶

  • Names: Christoph Killer
  • Matrikelnummer: 12214496

01 - An energy balance model with hysteresis¶

Based on the code we wrote in week 07, code the following extension. For this exercise it's OK to copy-paste my solutions and start from there. Only copy the necessary (no useless code)!

The planetary albedo $\alpha$ is in fact changing with climate change. As the temperature drops, sea-ice and ice sheets are extending (increasing the albedo). Inversely, the albedo decreases as temperature rises. The planetary albedo of our simple energy balance model follows the following equation:

$$ \alpha = \begin{cases} 0.3,& \text{if } T \gt 280\\ 0.7,& \text{if } T \lt 250\\ a T + b, & \text{otherwise} \end{cases} $$

01-01: Compute the parameters $a$ and $b$ so that the equation is continuous at T=250K and T=280K.

1
2
3
import numpy as np
import matplotlib.pyplot as plt
import scipy as sci
1
2
3
4
5
#0.3=a*280+b
#0.7=a*250+b
a=-0.4/30
b=0.3-280*a
print("a=",a,"b=",b)
a= -0.013333333333333334 b= 4.033333333333333

01-02: Now write a function called alpha_from_temperature which accepts a single positional parameter T as input (a scalar) and returns the corresponding albedo. Test your function using doctests to make sure that it complies to the instructions above.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def alpha_from_temperature(t):
    """albedo function labeled alpha returns a temperature for a chosen temperature
    Parameters
    ----------
    temperature (T) : float

    Returns
    -------
    alpha as a float

    Examples
    --------
    >>> print(f'{alpha_from_temperature(249)}')
    0.7
    >>> print(f'{alpha_from_temperature(281)}')
    0.3
    >>> print(f'{alpha_from_temperature(0)}')
    0.7
    >>> print(f'{alpha_from_temperature(1000)}')
    0.3
    
    """
    if t>280:
        alpha=0.3
    elif t<250:
        alpha=0.7
    else:
        alpha=a*t+b
    return alpha
1
2
import doctest 
doctest.testmod()
TestResults(failed=0, attempted=4)

01-03: Adapt the existing code from week 07 to write a function called temperature_change_with_hysteresis which accepts t0 (the starting temperature in K), n_years (the number of simulation years) as positional arguments and tau (the atmosphere transmissivity) as keyword argument (default value 0.611). Verify that:

  • the stabilization temperature with t0 = 292 and default tau is approximately 288K
  • the stabilization temperature with t0 = 265 and default tau is approximately 233K
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import numpy as np

def asr(t):
    s0 = 1362
    return (1 - alpha_from_temperature(t)) * s0 / 4

def olr(t, tau=0.611):
    sigma = 5.67E-8
    return sigma * tau * t**4

def temperature_change_with_hysteresis(t0, n_years, tau=0.611):
    """
    Temperature change scenario after changing transmissivity and considering albedo change.
    
    Parameters:
    t0 : float
        The starting temperature (K).
    n_years : int
        The number of simulation years.
    tau : float, optional
        The atmosphere transmissivity (-).
    
    Returns:
    (time, temperature) : ndarrays of size n_years + 1
    
    Examples:
    >>> y, t = temperature_change_with_hysteresis(292, 1000)
    >>> print(f'{int(t[1000])}')
    288
    >>> y, t = temperature_change_with_hysteresis(265, 1000)
    >>> print(f'{int(t[1000])}')
    233
    """
    years = np.arange(n_years + 1)
    temperature = np.zeros(n_years + 1)
    temperature[0] = t0
    C = 4.0e+08
    dt = 60 * 60 * 24 * 365
    
    for i in range(n_years):
        asr_value = asr(temperature[i])
        olr_value = olr(temperature[i], tau=tau)
        temperature[i + 1] = temperature[i] + dt / C * (asr_value - olr_value)
    
    return years, temperature

import doctest
doctest.testmod()
TestResults(failed=0, attempted=8)

01-04: Realize a total of N simulations with starting temperatures regularly spaced between t0=206K, and t0=318K and plot them on a single plot for n_years=50. The plot should look somewhat similar to this example for N=21.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import pandas as pd
import numpy as np

N = 1000
t0 = np.linspace(206, 318, num=N)
n_years = 50
data = []

for i in t0:
    y, t = temperature_change_with_hysteresis(i, n_years, tau=0.611)
    data.append(t)

df = pd.DataFrame(data, columns=np.arange(n_years+1))
df.index = t0

plt.plot(df.T)
plt.xlabel("time/year")
plt.ylabel("Temperature in K")
plt.title("Climate change scenario")
plt.legend(df.index)
plt.show()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[2], line 10
      7 data = []
      9 for i in t0:
---> 10     y, t = temperature_change_with_hysteresis(i, n_years, tau=0.611)
     11     data.append(t)
     13 df = pd.DataFrame(data, columns=np.arange(n_years+1))

NameError: name 'temperature_change_with_hysteresis' is not defined

Bonus: only if you want (and if time permits), you can try to increase N and add colors to your plot to create a graph similar to this one.

1
 

02 - Weather station data files¶

I downloaded 10 min data from the recently launched ZAMG data hub. The data file contains selected parameters from the "INNSBRUCK-FLUGPLATZ (ID: 11804)" weather station.

You can download the data from the following links (right-click + "Save as..."):

  • station data
  • parameter metadata
  • station list from the ZAMG (in a better format than last time)

Let me open the data for you and display its content:

1
2
3
4
5
6
7
8
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

df = pd.read_csv('INNSBRUCK-FLUGPLATZ_Datensatz_20150101_20211231.csv', index_col=1, parse_dates=True)
df.head()
df = df.drop("station", axis=1)
df.head()
DD FF GSX P RF RR SO TB1 TB2 TB3 TL TP
time
2015-01-01 00:00:00 232.0 1.0 0.0 965.7 96.0 0.0 0.0 3.2 3.6 5.2 -2.7 -3.4
2015-01-01 00:10:00 248.0 1.6 0.0 965.6 97.0 0.0 0.0 3.2 3.6 5.2 -2.4 -2.9
2015-01-01 00:20:00 252.0 1.6 0.0 965.6 97.0 0.0 0.0 3.2 3.6 5.2 -2.4 -2.9
2015-01-01 00:30:00 267.0 1.3 0.0 965.7 97.0 0.0 0.0 3.2 3.6 5.2 -2.7 -3.2
2015-01-01 00:40:00 279.0 1.4 0.0 965.7 97.0 0.0 0.0 3.2 3.6 5.2 -2.5 -3.0

02-01: after reading the documentation of the respective functions (and maybe try a few things yourself), explain in plain sentences:

  • what am I asking pandas to do with the index_col=1, parse_dates=True keyword arguments? Why am I doing this?
  • what am I asking pandas to do with .drop()? Why axis=1?

By looking at df.head() we can see a few things index_col=1 means which column to take as the index of the dataframe, i.e. what is the furthest left i.e. what is determining the index of the data. by choosing parse_dates=true we are asking pd to go through our index and parse through the values to convert them into dates. by using.drop() we are asking pd to remove the station row/column and by selecting axis=1 we are removing the station column NOT the row.

Now let me do something else from you:

1
2
dfmeta = pd.read_csv('ZEHNMIN Parameter-Metadaten.csv', index_col=0)
dfmeta.head()
Kurzbeschreibung Beschreibung Einheit
DD Windrichtung Windrichtung, vektorielles Mittel über 10 Minuten °
DDX Windrichtung zum Böenspitzenwert Windrichtung der maximalen Windgeschwindigkeit... °
DDX_FLAG Qualitätsflag der Windrichtung der maximalen W... Qualitätsflag für die Windrichtung der maximal... code
DD_FLAG Qualitätsflag der Windrichtung Qualitätsflag für die Windrichtung - Qualitäts... code
FF vektorielle Windgeschwindigkeit Windgeschwindigkeit, vektorielles Mittel über ... m/s

02-02: again, explain in plain sentences what the dfmeta.loc[df.columns] is doing, and why it works that way.

1
2
#testing and comparing the dfs
dfmeta.loc[df.columns]
Kurzbeschreibung Beschreibung Einheit
DD Windrichtung Windrichtung, vektorielles Mittel über 10 Minuten °
FF vektorielle Windgeschwindigkeit Windgeschwindigkeit, vektorielles Mittel über ... m/s
GSX Globalstrahlung Globalstrahlung, arithmetisches Mittel über 10... W/m²
P Luftdruck Luftdruck, Basiswert zur Minute10 hPa
RF Relative Feuchte Relative Luftfeuchte, Basiswert zur Minute10 %
RR Niederschlag 10 Minuten Summe des Niederschlags, Summe der ... mm
SO Sonnenscheindauer Sonnenscheindauer, Sekundensumme über 10 Minuten s
TB1 Erdbodentemperatur in 10cm Tiefe Erdbodentemperatur in 10cm Tiefe, Basiswert zu... °C
TB2 Erdbodentemperatur in 20cm Tiefe Erdbodentemperatur in 20cm Tiefe, Basiswert zu... °C
TB3 Erdbodentemperatur in 50cm Tiefe Erdbodentemperatur in 50cm Tiefe, Basiswert zu... °C
TL Lufttemperatur in 2m Lufttemperatur in 2m Höhe, Basiswert zur Minute10 °C
TP Taupunkt Taupunktstemperatur, Basiswert zur Minute10 °C

***it's finding the columns that are in our dataframe " df " above and matching the corresponding index values so in other words its finding which columns are relevant for us and then showing us the remaining data at that index dfmeta.loc[df.columns] is finding the indexes that are corresponding/matching to the columns in df and then showing us the dataframe at those indexes. similar how when you specify an index in a list, e.g. list[1] it gives us only the values at that index****

Finally, let me do a last step for you before you start coding:

1
dfh = df.resample('H').mean()
1
dfh.head()
DD FF GSX P RF RR SO TB1 TB2 TB3 TL TP
time
2015-01-01 00:00:00 257.333333 1.383333 0.0 965.666667 97.000000 0.0 0.0 3.20 3.6 5.2 -2.533333 -3.066667
2015-01-01 01:00:00 160.666667 0.766667 0.0 965.966667 97.666667 0.0 0.0 3.15 3.6 5.2 -3.250000 -3.716667
2015-01-01 02:00:00 227.000000 0.816667 0.0 966.316667 98.500000 0.0 0.0 3.10 3.6 5.2 -3.583333 -3.933333
2015-01-01 03:00:00 258.833333 1.933333 0.0 966.466667 97.000000 0.0 0.0 3.10 3.6 5.2 -3.250000 -3.766667
2015-01-01 04:00:00 241.500000 1.266667 0.0 966.416667 95.166667 0.0 0.0 3.10 3.6 5.2 -3.116667 -3.883333

02-03: explore the dfh dataframe. Explain, in plain words, what the purpose of .resample('H') followed by mean() is. Explain what .resample('H').max() and .resample('H').sum() would do.

with .resample("H") it downsamples our data into hourly bins so it takes the values which are every 10 minutes and puts them into bigger bins which are separated by the hour, so from 0-1 hr is one bin, 1-2hrs is another bin and so on, then by taking taking .mean of the new resample its taking the bin for each of the bins and so finding an hourly value. .max would find the highest value for each resample and .sum would add all the values in each bin, the sum of the values between 0-1hr ,1-2 hrs etc.

02-04: Using np.allclose, make sure that the average of the first hour (that you'll compute yourself from df) is indeed equal to the first row of dfh. Now, two variables in the dataframe have units that aren't suitable for averaging. Please convert the following variables to the correct units:

  • RR needs to be converted from the average of 10 min sums to mm/h
  • SO needs to be converted from the average of 10 min sums to s/h
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
df_firsthour = df.iloc[0:6].mean()
print("Average values for the first 6 hours:")
print(df_firsthour)

dfh_firsthour = dfh.iloc[0]
are_equal = np.allclose(df_firsthour, dfh_firsthour)
print("Are the average values equal to the first hour values?", are_equal)

rr_description = dfmeta.loc["RR"]["Beschreibung"]
so_description = dfmeta.loc["SO"]["Beschreibung"]
print("Description for 'RR':", rr_description)
print("Description for 'SO':", so_description)

def to_hourly(x):
    return x * 6

dfh["RR"] = dfh["RR"].apply(to_hourly)
dfh["SO"] = dfh["SO"].apply(to_hourly)

# Alternatively:
# dfh["RR"] = dfh["RR"] * 6
# dfh["SO"] = dfh["SO"] * 6

print("Modified DataFrame 'dfh' with hourly values:")
print(dfh.head(100))

num_days = dfh.shape[0] / 24
print("Number of days in 'dfh':", num_days)
DD     257.333333
FF       1.383333
GSX      0.000000
P      965.666667
RF      97.000000
RR       0.000000
SO       0.000000
TB1      3.200000
TB2      3.600000
TB3      5.200000
TL      -2.533333
TP      -3.066667
dtype: float64
10 Minuten Summe des Niederschlags, Summe der Basiswerte über 10 Minuten Sonnenscheindauer, Sekundensumme über 10 Minuten
2557.0

From now on, we will use the hourly data only (and further aggregations when necessary). The 10 mins data are great but require a little bit more of pandas kung fu (the chinese term, not the sport) to be used efficiently.

Spend some time exploring the dfh dataframe we just created. What time period does it cover? What variables does it contain?

2557 days , weather variables from windspeed to global radiation and others

Note on pandas: all the exercises below can be done with or without pandas. Each question can be answered with very few lines of code (often one or two) with pandas, and I recommend to use it as much as possible. If you want, you can always use numpy in case of doubt: you can access the data as a numpy array with: df[column_name].values.

03 - Precipitation¶

In this section, we will focus on precipitation only.

03-01: Compute the average annual precipitation (m/year) over the 7-year period.

1
2
3
4
5
6
7
df_RR_A = pd.DataFrame(df["RR"].resample("A").sum())
average = np.mean(df_RR_A.values)

print("Annual precipitation data:")
print(df_RR_A.head(7))

print(f"Average annual precipitation over the 7-year period: {np.round(average, 0)} mm/year")
Average annual precipitation: 921.0 mm/year over the the 7 year-period
RR
time
2015-12-31 852.4
2016-12-31 911.8
2017-12-31 1026.5
2018-12-31 783.0
2019-12-31 1037.3
2020-12-31 920.7
2021-12-31 912.2

03-02: What is the smallest non-zero precipitation measured at the station? What is the maximum hourly precipitation measured at the station? When did this occur?

03-03: Plot a histogram of hourly precipitation, with bins of size 0.2 mm/h, starting at 0.1 mm/h and ending at 25 mm/h. Plot the same data, but this time with a logarithmic y-axis. Compute the 99th percentile (or quantile) of hourly precipitation.

1
 
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import matplotlib.pyplot as plt

# Create a filtered DataFrame excluding zero values
filtered_dfh = dfh[dfh['RR'] > 0]

# Plot histogram with linear y-axis
plt.hist(filtered_dfh['RR'], bins=np.arange(0.1, 25.2, 0.2))
plt.xlabel('Hourly Precipitation (mm/h)')
plt.ylabel('Frequency')
plt.title('Histogram of Hourly Precipitation (Non-zero values)')
plt.show()

# Plot histogram with logarithmic y-axis
plt.hist(filtered_dfh['RR'], bins=np.arange(0.1, 25.2, 0.2), log=True)
plt.xlabel('Hourly Precipitation (mm/h)')
plt.ylabel('Frequency (Log scale)')
plt.title('Histogram of Hourly Precipitation (Non-zero values)')
plt.show()

# Compute the 99th percentile of hourly precipitation
percentile_99 = np.percentile(filtered_dfh['RR'], 99)
print("99th Percentile of Hourly Precipitation (Non-zero values): {:.2f} mm/h".format(percentile_99))
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[3], line 1
----> 1 import matplotlib.pyplot as plt
      3 # Create a filtered DataFrame excluding zero values
      4 filtered_dfh = dfh[dfh['RR'] > 0]

ModuleNotFoundError: No module named 'matplotlib'

03-04: Compute daily sums (mm/d) of precipitation (tip: use .resample again). Compute the average number or rain days per year in Innsbruck (a "rain day" is a day with at least 0.1 mm / d of measured precipitation).

1
2
3
4
5
6
7
# Compute daily sums of precipitation
df_daily = df['RR'].resample('D').sum()

# Compute the average number of rain days per year
rain_days_per_year = (df_daily >= 0.1).groupby(df_daily.index.year).mean().mean()

print("Average number of rain days per year in Innsbruck:", rain_days_per_year)
Average number of rain days per year in Innsbruck: 170

03-05: Now select (subset) the daily dataframe to keep only only daily data in the months of December, January, February (DFJ). To do this, note that dfh.index.month exists and can be used to subset the data efficiently. Compute the average precipitation in DJF (mm / d), and the average number of rainy days in DJF. Repeat with the months of June, July, August (JJA).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Compute daily sums of precipitation
dfd = df['RR'].resample('D').sum()

# Create a column for rainy days
dfd['rainday'] = dfd['RR'] > 0

# Filtering the data for the specified time periods
dfd_DJF = dfd[dfd.index.to_series().between('2015-12-01', '2021-02-28', inclusive=True)]
dfd_JJA = dfd[dfd.index.to_series().between('2015-06-01', '2021-08-31', inclusive=True)]

# Calculating average precipitation and rainy days for DJF
avg_prec_DJF = dfd_DJF['RR'].mean()
avg_rain_days_DJF = dfd_DJF['rainday'].mean()

# Calculating average precipitation and rainy days for JJA
avg_prec_JJA = dfd_JJA['RR'].mean()
avg_rain_days_JJA = dfd_JJA['rainday'].mean()

# Printing the results
print(f'Average precipitation in December/January/February: {avg_prec_DJF:.2f} mm/d, average rainy days in December/January/February: {avg_rain_days_DJF:.2f}')
print(f'Average precipitation in June/July/August: {avg_prec_JJA:.2f} mm/d, average rainy days in June/July/August: {avg_rain_days_JJA:.2f}')
print('All values are for the time period 2015 to 2021')
Average precipitation in December/January/February: 1.7726265822784812 mm/d, average rainy days in December/January/February: 37.57142857142857
Average precipitation in June/July/August: 4.024844720496894 mm/d, average rainy days in Junge/July/August: 53.142857142857146
All values are for the timeperiod 2015 to 2021

03-06: Repeat the DJF and JJA subsetting, but this time with hourly data. Count the total number of times that hourly precipitation in DJF is above the 99th percentile computed in exercise 03-03. Repeat with JJA.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Filtering the data for the specified time periods
dfh_DJF = dfh[dfh.index.to_series().between('2015-12-01', '2021-02-28', inclusive=True)]
dfh_JJA = dfh[dfh.index.to_series().between('2015-06-01', '2021-08-31', inclusive=True)]

# Counting the occurrences above the 99th percentile for DJF and JJA
above99_DJF = (dfh_DJF['RR'] > percentile_99).sum()
above99_JJA = (dfh_JJA['RR'] > percentile_99).sum()

# Printing the results
print(f"From 2015 to 2021, the hourly precipitation exceeded the 99th percentile {above99_DJF} times in December/January/February, and {above99_JJA} times in June/July/August.")
From 2015 to 2021, the hourly precipitation was 68 times above the 99th percentile (over the whole 7 years) in December/January/February, and 308 times in June/July/August

03-07: Compute and plot the average daily cycle of hourly precipitation in DFJ and JJA. I expect a plot similar to this example. To compute the daily cycle, I recommend to combine two very useful tools. First, start by noticing that ds.index.hour exists and can be used to categorize data. Then, note that df.groupby exists and can be used exactly for that (documentation).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Compute average daily cycle for DFJ
daily_cycle_DFJ = dfh_DJF.groupby(dfh_DJF.index.hour)['RR'].mean()

# Compute average daily cycle for JJA
daily_cycle_JJA = dfh_JJA.groupby(dfh_JJA.index.hour)['RR'].mean()

# Create a figure and axes
fig, ax = plt.subplots(figsize=(10, 6))

# Plot the average daily cycle for DFJ and JJA
ax.plot(daily_cycle_DFJ.index, daily_cycle_DFJ.values, label='DFJ')
ax.plot(daily_cycle_JJA.index, daily_cycle_JJA.values, label='JJA')

# Set labels and title
ax.set_xlabel('Hour of the day')
ax.set_ylabel('Average hourly precipitation')
ax.set_title('Average daily cycle of hourly precipitation')

# Display the legend
ax.legend()

# Show the plot
plt.show()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[4], line 2
      1 # Compute average daily cycle for DFJ
----> 2 daily_cycle_DFJ = dfh_DJF.groupby(dfh_DJF.index.hour)['RR'].mean()
      4 # Compute average daily cycle for JJA
      5 daily_cycle_JJA = dfh_JJA.groupby(dfh_JJA.index.hour)['RR'].mean()

NameError: name 'dfh_DJF' is not defined

04 - A few other variables¶

In this section, we will continue to analyze the weather station data.

04-01: Verify that the three soil temperatures have approximately the same average value over the entire period. Now plot the three soil temperature timeseries in hourly resolution over the course of the year of 2020 (example). Repeat the plot with the month of may 2020.

04-02: Plot the average daily cycle of all three soil temperatures.

04-03: Compute the difference (in °C) between the air temperature and the dewpoint temperature. Now plot this difference on a scatter plot (x-axis: relative humidity, y-axis: temperature difference).

05 - Free coding project¶

The last part of this semester project is up to you! You are free to explore whatever interests you. I however add three requirements:

  1. This section should have at least 5 original plots in it. They are the output of your analysis.
  2. This section should also use additional data that you downloaded yourself. The easiest way would probably be to download another station(s) from the ZAMG database, or data from the same station but for another time period (e.g. for trend or change analysis). You can, however, decide to do something completely different if you prefer (as long as you download and read one more file).
  3. this section should contain at least one regression or correlation analysis between two parameters. Examples:
    • between two different variables at the same station (like we did with the dewpoint above)
    • between different stations (for example, average temperature as a function of station elevation)
    • between average temperature and time (trends analysis)
    • etc.

That's it! Here are a few ideas:

  • detection of trends and changes at the station Innsbruck for 1993-2021
  • comparison of 5-yr climatologies at various stations in Tirol, taking elevation or location into account
  • compute the theoretical day length from the station's longitude and latitude (you can find solutions for this online, just let me know the source if you used a solution online), and use these computations to compare the measured sunshine duration to the maximum day length. This can be used to classify "sunshine days" for example.
  • use the python "windrose" library to plot a windrose at different locations and time of day.
  • etc.

If you have your own idea but are unsure about whether this is too much or not enough, come to see me in class! In general, the three requirements above should be enough.

My goal with this section is to let you formulate a programming goal and implement it.