Exercise: track observation#
Altimetry data can be downloaded using
The REST API (requires API key)
watobs.DHIAltimetryRepository (which wraps the REST API)
import numpy as np
# Download csv from altimetry.dhigroup.com for roughly lat:50.0N-55.5N, lon:2.0W-9.0E
# For the period 2017-10-27 - 2017-10-30
# Read the csv file with pandas (note that the datetime is the third column)
# import TrackObservation from modelskill
# Create TrackObservation o1 with the "water_level" item
# create an appropriate ItemInfo and assign to o1.itemInfo
Compare to Model Result#
fn = "../data/NorthSea_HD_and_windspeed.dfsu"
# Create ModelResult mr with the right item (for comparison with o1)
# Create Connector with o1 and mr and extract to a variable cc
# Make a scatter plot
# Any outliers? Check the plot
# Find the timestep of the smallest and largest residual cc[0].residual
# hint: argmax() and cc[0].df and iloc[]
# print these rows of the original altimetry DataFrame df
# hint: df.loc[xx]
# Set the value of the "water_level" to np.nan for any outliers
# hint: df.loc[xx, "water_level"] = np.nan
# Create a new TrackObservation o1b with the corrected data and redo
# the skill assessment and the scatter plot