@@ -20,17 +20,36 @@ def calculate_flowlines(input_xr,seed_points,uv_varnames=['u','v'],xy_varnames=[
2020 """
2121 % (C) Nick Holschuh - Amherst College -- 2022 ([email protected] ) 2222 %
23- % This function prints out the minimum and maximum values of an array
23+ % This function takes a vector field described in an xarray dataset, an
24+ % array of points, and calculates flowlines that pass through the array
25+ % points following the vector field.
2426 %
2527 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2628 % The inputs are:
2729 %
28- % input_xr -- xarray dataarray that has the gradient objects in it
30+ % input_xr -- this must be an xarray dataset with two dataarrays, represting
31+ % the x components and the y components of a vector field. The data
32+ % variables and the coordinate variables that describe them can have
33+ % any name, but the defaults are 'u','v','x','y'.
34+ % seed_points -- this should be an nx2 array containing x/y pairs for seed points
35+ % used to constrain the calculated flowlines
36+ % uv_varnames -- default=['u','v'], these are the datavariable names for the
37+ % vector field components.
38+ % xy_varnames -- default=['x','y'], these are the coordinate variable names
39+ % describing the columns and rows of the vector field arrays
40+ % steps -- default=20000, this is the number of steps to take away from the seed
41+ % in either the forward or backward direction
42+ % ds -- default=2, this is the step-size to take when propagating the flowline away
43+ % from the seedpoint (in the same units as the coordinate variables
44+ % forward0_both1_backward2 -- default=1, this sets whether or not you want
45+ % the flowlines to extend down-vector, up-vector, or
46+ % both from the seed point.
2947 %
3048 %%%%%%%%%%%%%%%
3149 % The outputs are:
3250 %
33- % output -- the min and max in a 1x2 array
51+ % output -- a list of nx2 arrays containing the flowlines associated with
52+ % each seed point
3453 %
3554 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3655 """
0 commit comments