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

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

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

Initial import of Stark code.

Line 
1 newplot='y';
2 while newplot == 'y',
3 %
4 % Load data from files
5 %
6    ls *.pth
7    filename=input('Enter the name of .pth file: ','s');
8    filename=blank(filename(1:length(filename)-4));
9    [gridname,ndrog,ndts,tsec,pth]=read_pth(filename,4);
10    size(pth);
11    ndts=ans(1)/ndrog;
12    xdr=pth(:,1);
13    xdr=reshape(xdr,ndrog,ndts);
14    xdr=xdr';
15    ydr=pth(:,2);
16    ydr=reshape(ydr,ndrog,ndts);
17    ydr=ydr';
18    gridname=input('Enter the input path for grid files: (e.g. ../MESH/bank150)','s');
19    gridstruct=loadgrid(gridname);
20 %
21 % Plot boundary
22 %
23    figure
24    whitebg('w')
25    hold on
26    bndo=plotbnd(gridstruct);
27    set(bndo,'Color','k')
28    axis('equal')
29 %   cval=[50 100 200];
30 %   hc=lcontour2(ele,x,y,z,cval);
31 %   set(hc,'Color','k')
32 %
33 % Plot particle tracks
34 %
35    h=plot(xdr(1,:),ydr(1,:),'r*')
36    for i=1:ndrog
37       h=plot(xdr(:,i),ydr(:,i),'b-')
38    end
39    title(verbatim(filename))
40    zoom on
41    newplot=input('New plot? (y/n): ','s');
42 end
Note: See TracBrowser for help on using the browser.