r_t_tide Page

 I've made some enhancements to Rich Pawlowicz's t_tide package.  Please refer to Leffler and Jay (2009) for details.   It now uses robust methods, rather than standard least squares for the harmonic fitting.  This version requires the Matlab Signal Processing and Statistics Toolboxes.  The changes will eventually be included in the main version of t_tide, but should be considered an offshoot of t_tide for the moment.

Download the software : Citation is appreciated if you find the code useful :
Leffler, Keith E and Jay, David A.  Enhancing tidal harmonic analysis: Robust (hybrid L-1/L-2) solutions.  Continental Shelf Research, 2009, v 29, p 78-88.


r_t_tide has a few differences from t_tide in the parameters passed to the main function r_t_tide.  PLEASE read the readme.txt file in the download package. 
Summarizing the major differences:

So an example :
given observed times t and heights or currents x, a basic robust calculation would look like this :

[name,freq,tidecon,xout,stats] = r_t_tide(t,x,'method','cauchy','latitude',45.0,'greenwichcorrflag',true,'nodalcorrflag',true);

The structure of tidecon is in the header, lines 132-140, and is the same as standard t-tide.