Deltares-research / kenmerkendewaarden

Derive indicators from waterlevel measurements
https://deltares-research.github.io/kenmerkendewaarden/
GNU General Public License v3.0
2 stars 0 forks source link

Consider adding components for springneap kromme #173

Closed veenstrajelmer closed 3 weeks ago

veenstrajelmer commented 3 weeks ago

springneap kromme is based on "zuiveren harmonischen van S2 en M2". This seems not to be the case, the code below shows the shallow water components that are only dependent on M2/S2, which is more than the list in the 1991 document. In the past, this list resulted in a kromme that was not repetitive, is this still the case?

import hatyan
import numpy as np
import pandas as pd

const_list_year = hatyan.get_const_list_hatyan("all_schureman")
dummy,shallowrel,dummy = hatyan.foreman.get_foreman_shallowrelations()
bool_M2S2only = shallowrel[1].isin([1,2]) & shallowrel[3].isin(['M2','S2']) & shallowrel[5].isin(['M2','S2',np.nan]) & shallowrel.index.isin(const_list_year)
bool_even = shallowrel[2]%1==0 # to avoid M7 to be included
shallowdeps_M2S2 = shallowrel.loc[bool_M2S2only & bool_even,:5]
# extended version of `components_sn` in `kw.calc_gemiddeldgetij()`
list_harmonischen_M2S2_code = shallowdeps_M2S2.index.append(pd.Index(["M2","S2","MU2"]))
# print(list_harmonischen_M2S2_code)
#['2SM2', '3MS4', 'M4', 'MS4', 'S4', 'M6', '2MS6', '2SM6', 'M8', '3MS8', 'M10', 'M12', 'SM', '3MS2', '4MS4', '4MS6', '2(MS)8', '4MS10', '3M2S10', '5MS12', '4M2S12']

list_harmonischen_M2S2_1991 = pd.Index(['SM','3MS2','MU2','M2','S2','2SM2','3MS4','M4','MS4','4MS6','M6','2MS6','M8','3MS8','M10','4MS10','M12','5MS12'])
# print(list_harmonischen_M2S2_1991)

# list_harmonischen_M2S2_1991[~pd.Series(list_harmonischen_M2S2_1991).isin(list_harmonischen_M2S2_code)]
print(list_harmonischen_M2S2_code[~pd.Series(list_harmonischen_M2S2_code).isin(list_harmonischen_M2S2_1991)])
# ['S4', '2SM6', '4MS4', '2(MS)8', '3M2S10', '4M2S12']

So this would result in 6 different components. If we use all schureman components instead of the year-list, "S6" is also included.

veenstrajelmer commented 3 weeks ago

When using the original series, we get a (raw) springneap tide kromme like this: image

When using the extended series, we get a (raw) springneap tide kromme like this: image

When alternating the image, it is clearly visible that this has an impact on the raw gemiddelde getijkromme for spring/neap tide. However, it is not investigated whether this will have a significant impact on the eventual scaled krommes. For now, stick to what was done before. However, in the future it can be reconsidered to extend the components used for generating the raw spring/neap kromme.