Rijkswaterstaat / wm-ws-dl

wm-ws-dl documentation
https://rijkswaterstaatdata.nl/waterdata
11 stars 2 forks source link

data is distributed over NAP/MSL hoedanigheid for some stations #17

Open veenstrajelmer opened 5 months ago

veenstrajelmer commented 5 months ago

Since we cannot retrieve the entire dataset at once directly via waterwebservices, the minimal code below uses netcdf files from the getijverandering project, retrieved from DDL with ddlpy. The timeseries seem complete but part of it is referenced in NAP and part in MSL. Since the corrections in DDL data on 22-02-2024, the MSL timeseries is now complete, but the (duplicated) NAP data should still be removed. Would be great if this can be cleaned up. Once this is cleaned up, we can https://github.com/Deltares/ddlpy/issues/89

import xarray as xr
import matplotlib.pyplot as plt
plt.close("all")

dse1 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_MSL\EURPFM.nc")
dse2 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_NAP\EURPFM.nc")
dsl1 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_MSL\LICHTELGRE.nc")
dsl2 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_NAP\LICHTELGRE.nc")
dsb1 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_MSL\BORSLA.nc")
dsb2 = xr.open_dataset(r"p:\11210366-003-getijverandering\insitu_data\RWS_DDL\retrieved_NAP\BORSLA.nc")
alpha = 0.6

fig, (ax1,ax2,ax3) = plt.subplots(3,1, sharex=True)
dse1.waterlevel.plot(ax=ax1, label="EURPFM MSL", alpha=alpha)
dse2.waterlevel.plot(ax=ax1, label="EURPFM NAP", alpha=alpha)
ax1.legend(loc=2)

dsl1.waterlevel.plot(ax=ax2, label="LICHTELGRE MSL", alpha=alpha)
dsl2.waterlevel.plot(ax=ax2, label="LICHTELGRE NAP", alpha=alpha)
ax2.legend(loc=2)

dsb1.waterlevel.plot(ax=ax3, label="BORSLA MSL", alpha=alpha)
dsb2.waterlevel.plot(ax=ax3, label="BORSLA NAP", alpha=alpha)
ax3.set_ylim(-3,3) # required because of outlier
ax3.legend(loc=2)

image

Also consider the extremes for these stations, in the past they sometimes were available under NAP and sometimes under MSL.

When looking at the differences between NAP and MSL we see outliers for BORSLA, but the other two have 0 difference (so timeseries are equal):

fig, ax = plt.subplots()
(dse1.drop_duplicates(dim="time").waterlevel - dse2.drop_duplicates(dim="time").waterlevel).plot(ax=ax, label="EURPFM")
(dsl1.drop_duplicates(dim="time").waterlevel - dsl2.drop_duplicates(dim="time").waterlevel).plot(ax=ax, label="LICHTELGRE")
(dsb1.drop_duplicates(dim="time").waterlevel - dsb2.drop_duplicates(dim="time").waterlevel).plot(ax=ax, label="BORSLA")
ax.legend()
ax.set_ylim(-0.2, 0.1)

Gives: image

TvLoon-RWS commented 3 months ago

Check if the same issue exists in Donar

KDoekes-RWS commented 3 months ago

Yes, the same issue exists in DONAR. In 2003 the managers of the Meetnet Noordzee, then not integrated yet in LMW, announced that the water level data of Euro platform were now relative to NAP instead of to NAP. Although this proved wrong the data have been stopred as relative to NAP ever since. We will discuss this again with the managers of LMW. The double storage of water level data of BORSLA, both relative to MSL (correct) and to NAp (incorrect), was already noted sometimes ago. The managers of LMW should first stop the storage in DONAr of the wrong data series before it can be removed from DONAR.

veenstrajelmer commented 3 months ago

Thank you, it would be helpful if this could indeed be resolved in the future.