NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/opnml/FCAST_1.2/matlab_cen/plot_v2r.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1 newplot='y';
2 while newplot == 'y',
3 %
4 % Load data from files
5 %
6    ls *.v2r
7    filename=input('Enter the name of .v2r file: ','s');
8    [v2r,freq,gridname]=read_v2r(filename);
9    u=v2r(:,2);
10    v=v2r(:,3);
11    gridname=blank(gridname(1:length(gridname)-1));
12    [in,x,y,z,bnd]=loadgrid(gridname);
13 %
14 % Plot boundary
15 %
16    figure
17    whitebg('w')
18    hold on
19    bndo=plotbnd(x,y,bnd);
20    set(bndo,'Color','k')
21    axis('equal')
22    cval=[25 50 75];
23    hc=lcontour2(in,x,y,z,cval);
24    set(hc,'Color','k')
25 %
26 % Plot vector field
27 %
28    newscale='y';
29    while newscale == 'y',
30       title([verbatim(filename)])
31       vmax=max(abs(u+sqrt(-1.0)*v))
32       scale=input('Enter the desired vector scale: ');
33       hv=vecplot2(x,y,u,v,scale,'m/s',max(x)-0.1*(max(x)-min(x)),min(y)+0.9*(max(y)-min(y)))
34       set(hv,'Color','k')
35       axis([min(x) max(x) min(y) max(y)])
36       zoom on
37       newscale=input('New scale? (y/n): ','s');
38       if newscale == 'y',
39          delete(hv);
40       end
41    end
42    newplot=input('New plot? (y/n): ','s');
43 end
Note: See TracBrowser for help on using the browser.