{ "cells": [ { "cell_type": "markdown", "id": "7fa5cb12", "metadata": {}, "source": [ "# Extreme Value Analysis" ] }, { "cell_type": "markdown", "id": "eaa08a9d", "metadata": {}, "source": [ "
\n", " \n", "Partial Solution\n", " \n", "The code below is provided to allow you to participate in the interpretation part of the workshop in case you were not able to write your own code to complete the analysis. The missing parts are indicated with a markdown cell contatining \"Your interpretation here.\"\n", " \n", "This is *not* the full solution, do not use it for studying. It was shared during the workshop.\n", "
\n", "\n", " \n", "This workshop uses the same file as in HW2: `Time_Series_DEN_lon_8_lat_56.5_ERA5.txt`\n", "
\n", "\n", " | date_&_time | \n", "significant_wave_height_(m) | \n", "mean_wave_period_(s) | \n", "Peak_wave_Period_(s) | \n", "mean_wave_direction_(deg_N) | \n", "10_meter_wind_speed_(m/s) | \n", "Wind_direction_(deg_N) | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "1950-01-01 00:00:00.000000000 | \n", "1.274487 | \n", "4.493986 | \n", "5.177955 | \n", "199.731575 | \n", "8.582743 | \n", "211.166241 | \n", "
1 | \n", "1950-01-01 04:00:00.000026880 | \n", "1.338850 | \n", "4.609748 | \n", "5.255064 | \n", "214.679306 | \n", "8.867638 | \n", "226.280409 | \n", "
2 | \n", "1950-01-01 07:59:59.999973120 | \n", "1.407454 | \n", "4.775651 | \n", "5.390620 | \n", "225.182820 | \n", "9.423382 | \n", "230.283209 | \n", "
3 | \n", "1950-01-01 12:00:00.000000000 | \n", "1.387721 | \n", "4.800286 | \n", "5.451532 | \n", "227.100041 | \n", "9.037646 | \n", "238.879880 | \n", "
4 | \n", "1950-01-01 16:00:00.000026880 | \n", "1.660848 | \n", "5.112471 | \n", "5.772289 | \n", "244.821975 | \n", "10.187995 | \n", "242.554054 | \n", "
\n", " \n", "Task 1:\n", "Apply POT to sample the extreme observations (you should have already done the function as homework!). Plot the results.\n", " \n", "Use a threshold of 5 meters and a declustering time of 72h.\n", "
\n", "\n", "Here the solutions are provided using PyExtremes package. You are not required to know who to use it, but you should be able to interpret the results of these analysis.\n", "
\n", "\n",
" \n",
"Task 2:\n",
"Fit the sampled extremes to fit a Generalized Pareto distribution. Print the shape parameter. What type of GPD are you obtaining?
\n",
"Hint: what kind of tail is implied by the parameter value?\n",
"
\n", " \n", "Task 3:\n", "Assess the goodness of fit of the distribution using a QQplot. Comment about the results of the fitting and compare it to those obtained using BM and GEV. Which one would you choose?\n", "
\n", "\n", " \n", "Task 4:\n", "Plot the return level plot and determine the value of the significant wave height that you need for design according to your calculated return period. Remember that return level plot presents in the x-axis the values of the variable (wave height, here) and in the y-axis the corresponding values of the return period. \n", "\n", "Compare it to the results obtained using BM + GEV.\n", "
\n", "\n", " \n", "Task 5:\n", "Apply two methods to justify why a threshold=5m and a declustering time=72h are reasonable or not. Write your conclusions.\n", "
\n", "\n", "Note that there will be some differences between your fitting and that provided by pyExtremes. You have probably defined the declustering time as the time between two extremes (two peaks). PyExtremes defines the declustering time as that between the crossing point over the threshold. The figure below illustrates the diffence.\n", "
\n", "\n", "Based on the above, would you expect more or less sampled extremes using pyExtremes? How would it affect to the calculated lambda?
\n", "