/[MITgcm]/MITgcm_contrib/netcdf_matlab_examples/king/raw_files/gridread.m
ViewVC logotype

Contents of /MITgcm_contrib/netcdf_matlab_examples/king/raw_files/gridread.m

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


Revision 1.1 - (show annotations) (download)
Tue Dec 30 05:10:00 2003 UTC (21 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
 o initial check-in

1 fid=fopen('tpg_ref.av11-341f2','r');
2
3 junk = fread(fid,1,'long');
4 iz = fread(fid,1,'long')
5 jz = fread(fid,1,'long')
6 ylat = fread(fid,2,'float32')
7 xlon = fread(fid,2,'float32')
8 junk = fread(fid,2,'long');
9 izjz = iz*jz;
10
11 ssh = fread(fid,izjz,'float32'); ssh = reshape(ssh,iz,jz); ssh = ssh';
12 ssh(33,:)
13
14 missing=-9999.;
15 [xx,yy]=find(ssh==missing);
16 nn=length(xx);
17 for ii=1:nn
18 ssh(xx(ii),yy(ii))=NaN;
19 end
20 ssh(:,181)=ssh(:,1); xlon(2)=xlon(2)+2;
21 yl=ylat(1):2:ylat(2); xl=xlon(1):2:xlon(2);
22 scon=-160:20:180; contour(xl,yl,ssh,scon)

  ViewVC Help
Powered by ViewVC 1.1.22