s_tide計算理論深度基準面和潮流最大可能流速
潮流最大可能流速可以依據(jù)下面的經(jīng)驗公式進行計算,但是過程繁瑣。理論深度基準面其實就算最低可能潮位,計算同樣很復雜且繁瑣。網(wǎng)上似乎也沒有公開的程序計算這兩個參數(shù)。

S_TIDE v1.23提供了s_estimate_max_tidalcurrent函數(shù)來計算潮流最大可能流速和方向,提供s_tdd函數(shù)來計算理論深度基準面,這兩個函數(shù)并沒有采用經(jīng)驗公式,而是根據(jù)給定的主要分潮振幅和遲角結(jié)合交點因子和訂正角重構(gòu)18.61年以上的水位/流速,然后找到最大流速和最低潮位。
s_demo里的例子如下:
?load tidalcurrents.mat
[Stv,Htv,Gtv,coef,xoutv,ju,Stint,Htint,Gtint,aa,bb,namev]=s_tide_m8(v,1,1,{'M2';'S2';'K1';'O1';'N2';'Q1';'P1';'K2'},8,1,'spline','robustfit',20.5,[2010,08,23,01,00,00],'corrected');
[Stu,Htu,Gtu,coef,xoutu,ju,Stint,Htint,Gtint,aa,bb,nameu]=s_tide_m8(u,1,1,{'M2';'S2';'K1';'O1';'N2';'Q1';'P1';'K2'},8,1,'spline','robustfit',20.5,[2010,08,23,01,00,00],'corrected');
% 20.5 is the latitude of the observation,[2010,08,23,01,00,00] is the start time of observation, users only need to change these two inputs when perform their own harmonic analysis.
% v and u are observed tidal currents at y and x axis
[mct,angle]=s_estimate_max_tidalcurrent(Htu(:,1),Gtu(:,1),Htv(:,1),Gtv(:,1),{'M2';'S2';'K1';'O1';'N2';'Q1';'P1';'K2'});
%mct: maximum possible tidal current speed
%angle: the angle of maximum tidal current
[tdd]=s_tdd(Htu(:,1),Gtu(:,1),{'M2';'S2';'K1';'O1';'N2';'Q1';'P1';'K2'}) %calculate the theoretical depth datum(tdd)