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

particle_track

PURPOSE ^

PARTICLE_TRACK - track the movement of one or more particles.

SYNOPSIS ^

function [ lon, lat ] = particle_track( h, coord, rBD, start_t, end_t,varargin )

DESCRIPTION ^

 PARTICLE_TRACK - track the movement of one or more particles.

 Usage: [lon, lat] = particle_track( hfrc_obj, coords, baddata, start_t, end_t, ... )

 This function moves particles along with the currents.  It uses the
 simplest of all possible methods for doing so:  currents, interpolated
 at the point of interest, are used to advect the particle at each time
 step.

 hfrc_obj will be temporally sorted before tracking is done.

 coords is a 2 column array of longitudes and latitudes of the particles to
 be tracked.  start_t and end_t are the start and end times of the
 tracking.  If absent, the entire time series will be used.

 baddata tells the function whether or not to remove any bad data points
 before doing tracking.  The default for this is true.  Set it to false
 either when you have all good data (speeds things up) or when you want to
 run into bad data.  In this case, bad data will be left as is.  Set
 baddata to NaN when you want to convert U=0, V=0 to NaN's prior to
 tracking.

 ... represents other arguments to be passed to griddata (e.g. method of
 interpolation).

 Note: The last current map is not used as dt is not known, so you
 typically want to make end_t one time step longer than the number of
 times you actually want.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     $Id: particle_track.m,v 1.10 2003-04-02 00:56:07 dmk Exp $    

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

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