Clear Filters
Clear Filters

stream2 stepsize meaning ?

4 views (last 30 days)
quai20
quai20 on 18 Oct 2017
Hey there ! Quick question about the "stream2" function. I don't understand what represents the "stepsize" option. I mean, given that I provide a velocity field (in meter/second in my case) to the function, the step should be something in seconds but it appears to be quite something else related to my grid maybe.
My goal is to connect the streamline the function return with some timeline. Maybe it's not possible ?
My code for now :
XX=ncread('20150912-GLOBCURRENT-L4-CUReul_15m-ALT_SUM-v03.0-fv01.0.nc','lon');
YY=ncread('20150912-GLOBCURRENT-L4-CUReul_15m-ALT_SUM-v03.0-fv01.0.nc','lat');
UU=ncread('20150912-GLOBCURRENT-L4-CUReul_15m-ALT_SUM-v03.0-fv01.0.nc','eastward_eulerian_current_velocity');
VV=ncread('20150912-GLOBCURRENT-L4-CUReul_15m-ALT_SUM-v03.0-fv01.0.nc','northward_eulerian_current_velocity');
[mx,my]=meshgrid(XX,YY);
mu=griddata(XX,YY,UU',mx,my);
mv=griddata(XX,YY,VV',mx,my);
XY=stream2(mx,my,mu,mv,-72,34.0,[1 1000]);
load coastlines;
figure();
plot(coastlon, coastlat);
hold on;
streamline(XY);
quiver(mx,my,mu,mv,'linewidth',2);
The velocity file can be found here : github/quai20
Many thanks for your help.

Answers (0)

Categories

Find more on Geographic Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!