s_tide计算理论深度基准面和潮流最大可能流速
潮流最大可能流速可以依据下面的经验公式进行计算,但是过程繁琐。理论深度基准面其实就算最低可能潮位,计算同样很复杂且繁琐。网上似乎也没有公开的程序计算这两个参数。

S_TIDE v1.23提供了s_estimate_max_tidalcurrent函数来计算潮流最大可能流速和方向,提供s_tdd函数来计算理论深度基准面,这两个函数并没有采用经验公式,而是根据给定的主要分潮振幅和迟角结合交点因子和订正角重构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)