import modelskill as ms
MIKE21 HD
Water level comparison between MIKE21 HD and observations from the Oresund.
= ms.model_result('../data/Oresund2D.dfsu',
mr ='Surface elevation')
item mr
<DfsuModelResult>: Oresund2D
Time: 2018-03-04 00:00:00 - 2018-03-10 22:40:00
Quantity: Surface Elevation [m]
="Blues_r"); mr.data.geometry.plot(cmap
mr.data.geometry.projection
'UTM-33'
Coordinate reference system used in this model is UTM-33.
= ms.PointObservation('../data/smhi_2095_klagshamn.dfs0', item=0,
o1 =366844.15, y=6154291.6) # UTM-33
x o1
<PointObservation>: smhi_2095_klagshamn
Location: 366844.15, 6154291.6
Time: 2015-01-01 01:00:00 - 2020-09-28 00:00:00
Quantity: Water Level [m]
Spatial overview
Confirm that the observation is correctly located in the model domain.
=(4, 4)); ms.plotting.spatial_overview(o1, mr, figsize
Match the observed data to the model result (interpolate the model result to the observation points).
cmp = ms.match(o1, mr)
cmp
<Comparer>
Quantity: Water Level [m]
Observation: smhi_2095_klagshamn, n_points=167
Model(s):
0: Oresund2D
= cmp.plot.timeseries(backend="plotly")
fig fig.show()
The reference level is not the same for the model and the observation. We can remove the bias from the model result to make the comparison more fair.
= cmp.remove_bias()
ub_cmp ="plotly").show(); ub_cmp.plot.timeseries(backend
The bias is removed, which affects the rmse, but not the un-biased version urmse.
cmp.skill()
n | bias | rmse | urmse | mae | cc | si | r2 | |
---|---|---|---|---|---|---|---|---|
observation | ||||||||
smhi_2095_klagshamn | 167 | 0.185752 | 0.190176 | 0.04078 | 0.185752 | 0.83973 | 0.377661 | -5.4291 |
ub_cmp.skill()
n | bias | rmse | urmse | mae | cc | si | r2 | |
---|---|---|---|---|---|---|---|---|
observation | ||||||||
smhi_2095_klagshamn | 167 | -2.659217e-17 | 0.04078 | 0.04078 | 0.033354 | 0.83973 | 0.377661 | 0.704384 |
Scatter plot
"MOOD")
ms.load_style(=True); ub_cmp.plot.scatter(skill_table