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



T_PREDIC - Method for the t_predic tidal analysis function.


function [ ht, hnt ] = t_predic( h, names, tidestruct, varargin )


 T_PREDIC - Method for the t_predic tidal analysis function.

 This functions uses the T_tide toolbox of R. Pawlowicz et al.
 (http://www2.ocgy.ubc.ca/~rich/#T_Predic) to predict tides at a set of
 locations and times given by the HFRC object.

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

 Usage: [ h_tide, h_notide ] = t_predic( hfrc_obj, NAMES, TIDESTRUCT, PARAM1, VAL1, ... )
        [ v_tide, v_notide ] = t_predic( hfrc_obj, NAMES, TIDESTRUCT, PARAM1, VAL1, ... )

 NAMES contains the names of the tidal components that you wish to use.
 This can be a subset of the tidal frequencies that were actually
 obtained in the analysis.

 TIDESTRUCT should be a matrix of tide structures, as is returned by
 HFRC/t_tide.  TIDESTRUCT should have the same length as the HFRC object
 has grid points.  If TIDESTRUCT.TIDECON is an Nx8 matrix, then an entire
 HFRC object is returned.  If TIDESTRUCT.TIDECON is an Nx4 matrix, then a
 single matrix is returned and the TIDECON is assumed to be the result of a
 tidal analysis on a single variable (U or V, eg.).

 PARAMn, VALn indicate parameter-value pairs, as in the generic t_predic
 function.  All the normal t_predic parameters are accepted.  Normally,
 'latitude' is generated from hfrc_obj.totalGrid.  If you give your own
 value for this parameter, it will override the default value.
 Parameter-value pairs must be supplied - the basic parameters cannot be
 passed directly, as they can be in the generic t_predic function.

 The following additional parameters are also accepted:

       'varname' - in case where you are predicting just a single
                   variable, this gives the name of the variable that is
                   being predicted (typically U or V).  This is only
                   used in the calculation of the tideless part of that
                   variable.  If an entire HFRC object is being returned
                   or only the tide part of the variable is desired,
                   this is ignored.
       'no nodal' - A boolean that indicates whether to pass 'latitude' 
                    to the normal t_predic function so that nodal
                    corrections are calculated.  1 indicates not to pass
                    the parameters. Default is zero.
       'matlab_time' - If given, the results will be returned at the
                       times given, not h.matlab_time, as is the default. 

 NOTE: All the individual TIDESTRUCTs in the TIDESTRUCT array passed to
 this function should have the tidal components in the same order
 (i.e. they should probably be the result of a single tidal analysis).

     $Id: t_predic.m,v 1.3 2003-04-02 00:56:06 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