Home > hfrc > matlab > @HFRC > t_tide.m



T_TIDE - Method for the t_tide tidal analysis function.


function [ tstruct, ht, hnt ] = t_tide( h, varargin )


 T_TIDE - Method for the t_tide tidal analysis function.

 This functions uses the T_tide toolbox of R. Pawlowicz et al.
 (http://www2.ocgy.ubc.ca/~rich/#T_Tide) to do tidal analysis on HFRC
 data.  It performs the analysis on the complex data U+i*V.  For more
 information about the results, see the t_tide function.
 For quick and dirty tide removal, see lst_squ_harmonics.

 NOTE: t_tide must be on the path for this function to work.

 Usage: [ tide_struct, h_tide, h_notide ] = t_tide( hfrc_obj, PARAM1, VAL1, ... )
        [ tide_struct, v_tide, v_notide ] = t_tide( hfrc_obj, 'varname', 'U' or 'V', ... )

 PARAMn, VALn indicate parameter-value pairs, as in the generic t_tide
 function.  All the normal t_tide parameters are accepted.  Normally,
 'latitude', 'start time' and 'interval' are generated from
 hfrc_obj.totalGrid and hfrc_obj.matlab_time.  Note that 'start time' will
 be in the timezone of the HFRC object.  Also, 'output' is normally set to
 none.  If you give your own values for these parameters, they will
 override the default values.  Parameter-value pairs must be supplied - the
 basic parameters cannot be passed directly, as they can be in the generic
 t_tide function.

 The following additional parameters are also accepted:

       'varname' - name of variable to perform tidal analysis on.
       'no nodal' - A boolean that indicates whether to pass 'latitude' 
                    and 'start time' (as obtained from the HFRC object) to
                    the normal t_tide function so that nodal corrections
                    are calculated.  1 indicates not to pass the
                    parameters. Default is zero.

       'min_data' - the minimum fraction of good data points at a grid
                    point necessary for tidal analysis to be performed.
                    Defaults to 3 good data points.
 tide_struct will be a [1xgridPts] structure array, each element of
 which is the tide structure for an individual grid point.  

 Note that t_tide has a number of important restrictions: even time
 interval and relatively complete data.  Also note, that t_tide produces
 a predicted tide with bad data points filled in.  Therefore, the
 resulting tidal part will have no bad data, although the notide part
 will have bad data.

 NOTE: If nodal corrections are used, then the time of the HFRC object
 should probably be in GMT (UTC).  I assume this is the T_tide
 convention, but am not completely sure.


     $Id: t_tide.m,v 1.8 2006-12-18 15:20:19 dmk Exp $    

 Copyright (C) 2001 David M. Kaplan
 Licence: GPL



This function calls: This function is called by:
Generated on Mon 18-Dec-2006 07:26:46 by m2html © 2003