/[MITgcm]/MITgcm_contrib/osse/utils/test.m
ViewVC logotype

Contents of /MITgcm_contrib/osse/utils/test.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Jan 5 20:40:46 2005 UTC (20 years, 6 months ago) by afe
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
regridder suite demo

1 % converts U (rho), V (theta) and W in polar coords into
2 % proper u,v, and w in cartesian coords, plus into theta and
3 % rho vector components in a more physical annulus layout
4
5 % load data
6 U=rdmds('U');
7 V=rdmds('V');
8 W=rdmds('W');
9 T=rdmds('T');
10 % set null-space areas to NaN (makes interpolation happier)
11 U(find(U==0))=NaN;
12 V(find(V==0))=NaN;
13 W(find(W==0))=NaN;
14 T(find(T==0))=NaN;
15
16 % this determines resolution of interpolated fields
17 % 0.5 is perhaps a bit fine, but it looks pretty
18 step=0.5;
19 % good for quiver plots
20 % step=1;
21
22 % convert theta/rho vector fields to u/v
23 [u v]=cyl2cartuv(U,V,-30:step:30,-30:step:30);
24
25 % convert w (effectively a scalar)
26 w=cyl2cart(W,-30:step:30,-30:step:30);
27 % Tc=cyl2cart(T,-30:step:30,-30:step:30);
28
29 % interpolate theta and rho into annulus
30 azim=cyl2cart(U,-30:step:30,-30:step:30);
31 radial=cyl2cart(V,-30:step:30,-30:step:30);

  ViewVC Help
Powered by ViewVC 1.1.22