1 |
gridname=input('Enter the name of grid: ','s'); |
---|
2 |
[in,x,y,z,bnd]=loadgrid(gridname); |
---|
3 |
newfile='y'; |
---|
4 |
while newfile == 'y', |
---|
5 |
% |
---|
6 |
% Load data from .v2c file |
---|
7 |
% |
---|
8 |
ls *.v2c |
---|
9 |
filename=input('Enter the name of .v2c file: ','s'); |
---|
10 |
[v2c,freq]=read_v2c(filename); |
---|
11 |
% |
---|
12 |
% Determine tidal ellipse parameters |
---|
13 |
% |
---|
14 |
per=2.0*pi/freq/3600.0; |
---|
15 |
[umaj,umin,orien,phase]=tellipse_cen(x,y,v2c(:,2),v2c(:,3),v2c(:,4),v2c(:,5),per); |
---|
16 |
% |
---|
17 |
% Scalar plot of major axis |
---|
18 |
% |
---|
19 |
scalar=umaj; |
---|
20 |
% |
---|
21 |
% Plot boundary |
---|
22 |
% |
---|
23 |
figure |
---|
24 |
whitebg('w') |
---|
25 |
hold on |
---|
26 |
bndo=plotbnd(x,y,bnd); |
---|
27 |
set(bndo,'Color','k') |
---|
28 |
axis([min(x) max(x) min(y) max(y)]) |
---|
29 |
set(gca,'Box','on'); |
---|
30 |
set(gca,'XTick',[]); |
---|
31 |
set(gca,'YTick',[]); |
---|
32 |
axis('square') |
---|
33 |
% cval=[50 100 200]; |
---|
34 |
% hc=lcontour2(ele,x,y,z,cval); |
---|
35 |
% set(hc,'Color','k') |
---|
36 |
% |
---|
37 |
% Make plot color plot of major axis magnitude |
---|
38 |
% |
---|
39 |
cmin=min(scalar) |
---|
40 |
cmax=max(scalar) |
---|
41 |
cmin=0.0 |
---|
42 |
cmax=0.25 |
---|
43 |
markersize=10.0 |
---|
44 |
plot_color_dots(x,y,scalar,cmin,cmax,markersize) |
---|
45 |
% cmin=min(scalar) |
---|
46 |
% cmax=max(scalar) |
---|
47 |
% cmin=cmax/2.0 |
---|
48 |
% caxis([cmin cmax]) |
---|
49 |
% hp=colormesh2d(in,x,y,scalar); |
---|
50 |
% mean(scalar); |
---|
51 |
% title(filename) |
---|
52 |
% colorbar |
---|
53 |
% colormap('jet'); |
---|
54 |
% drawnow |
---|
55 |
% |
---|
56 |
% New .v2c file? |
---|
57 |
% |
---|
58 |
newfile=input('New file? (y/n): ','s'); |
---|
59 |
end |
---|