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

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

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

Initial import of Stark code.

Line 
1 ls *.s2c
2 filename=input('Enter the name of .s2c file: ','s');
3 [s2c,freq,gridname]=read_v2r(filename);
4 amp=s2c(:,2);
5 pha=s2c(:,3);
6 gridname=blank(gridname(1:length(gridname)-1));
7 [in,x,y,z,bnd]=loadgrid(gridname);
8 %
9 % Plot boundary
10 %
11 figure
12 whitebg('w')
13 hold on
14 bndo=plotbnd(x,y,bnd);
15 set(bndo,'Color','k')
16 axis('equal')
17 % cval=[50 100 200];
18 % hc=lcontour2(ele,x,y,z,cval);
19 % set(hc,'Color','k')
20 %
21 % Plot Tidal Amplitudes
22 %
23 title([filename])
24 scalar=amp;
25 scrange(scalar)
26 cint=input('Enter the contour interval: ');
27 if cint > 0
28 cmin=cint*ceil(min(scalar)/cint);
29 cmax=cint*floor(max(scalar)/cint);
30 clear cval
31 i=1;
32 cval(i)=cmin;
33 while cval(i) < cmax
34    i=i+1;
35    cval(i)=cval(i-1)+cint;
36 end
37 cval
38 % [csa,ha]=lcontour3(in,x,y,scalar,cval);
39 [csa,ha]=lcontour3_holboke(in,x,y,scalar,cval);
40 hla=clabel(csa,ha,'manual')
41 % hlabel=extclabel(csa,'fontsize',6);
42 % delete(ha)
43 end
44 %
45 % Plot Tidal Phases
46 %
47 title([filename])
48 scalar=pha;
49 scrange(scalar)
50 cint=input('Enter the contour interval: ');
51 if cint > 0
52 cmin=cint*ceil(min(scalar)/cint);
53 cmax=cint*floor(max(scalar)/cint);
54 clear cval
55 i=1;
56 cval(i)=cmin;
57 while cval(i) < cmax
58    i=i+1;
59    cval(i)=cval(i-1)+cint;
60 end
61 cval
62 %[csp,hp]=lcontour3(in,x,y,scalar,cval);
63 [csp,hp]=lcontour3_holboke(in,x,y,scalar,cval);
64 set(hp,'Color','g');
65 hlp=clabel(csp,hp,'manual')
66 % hlabel=extclabel(cs,'fontsize',6);
67 % delete(h)
68 end
69 %
70 %
71 %
Note: See TracBrowser for help on using the browser.