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



PARTICLE_TRACK_2D_LARGEGRID - track the movement of one or more particles


function [ t, lon, lat ] = particle_track_2nd_largeGrid( h, start_t, end_t,coord,max_dist, rad,varargin )


 PARTICLE_TRACK_2D_LARGEGRID - track the movement of one or more particles 
 using a second order finite difference approach (Bennett and Clites,
 1987). This algorithm is optimized for large numbers of grid points!
 It acheives this by only using points closest to locations of particles
 at each time step.  This can produce slightly different results than
 normal algorithm.

 Usage: [t, lon, lat] = particle_track_2nd_largeGrid( hfrc_obj, start_t, end_t, ...
                                            coords, max_dist,
                                            circle_radius, ... )

 This function moves particles along with the currents.  It uses the 2nd
 order algorithm of Bennett and Clites (1987) with a variable time step
 that is determined so that no particle moves more than max_dist per
 time step.  It is assumed that velocities are in cm/s.

 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.  If absent, hfrc.totalGrid is used. max_dist specifies what is
 the maximum distance to move in a time step.  If absent, 0.25 kms is used.
 start_t and end_t are the start and end times of the tracking.  If absent,
 the entire time series will be used.  start_t and end_t should be in
 matlab units.

 This routine will end before end_t if all particles have gone out of
 data region (produced NaN).

 Nothing is done to bad data in this routine.  0's will be treated like
 zeros, NaNs like NaNs.  
 circle_radius is the radius of the circle around the current positions of
 the virtual particles that will be used to determine which grid points
 will be used for calculating the next movement of the particle.  All
 grid points within that distance of a virtual particle at that time
 step will be included.  Defaults to 10.

 The final ... represents extra arguments to griddata, such as 'method',
 to be used when interpolating values.


     $Id: particle_track_2nd_largeGrid.m,v 1.4 2004-11-11 20:29:56 dmk Exp $    

 Copyright (C) 2003 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