/[MITgcm]/MITgcm/verification/flt_example/input/read_flt_traj.m
ViewVC logotype

Diff of /MITgcm/verification/flt_example/input/read_flt_traj.m

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

revision 1.3 by jmc, Sun Jan 4 01:03:59 2009 UTC revision 1.4 by jmc, Thu Feb 5 01:03:33 2009 UTC
# Line 11  function [flt,data,header] = read_flt_tr Line 11  function [flt,data,header] = read_flt_tr
11  % $Header$  % $Header$
12  % $Name$  % $Name$
13    
14  imax=10;                % record size  imax=13;                % record size
15  ieee='b';               % IEEE big-endian format  ieee='b';               % IEEE big-endian format
16  bytesPerRec=imax*8;     % 8 bytes per real*8  bytesPerRec=imax*8;     % 8 bytes per real*8
17    
# Line 41  for k=1:size(fls,1) Line 41  for k=1:size(fls,1)
41   data=[data ldata(:,2:end)];   data=[data ldata(:,2:end)];
42  end  end
43    
44  flt=struct('numsteps',[],'time',[],'x',[],'y',[],'k',[]);  flt=struct('numsteps',[],'time',[],'x',[],'y',[],'z',[]);
45    
46  % Sort it all out  % Sort it all out
47  for k=1:max(max(data(1,:)));  for k=1:max(max(data(1,:)));
48   j=find( data(1,:)==k );   j=find( data(1,:)==k );
49   [t,jj]=sort( data(2,j) ); j=j(jj);   [t,jj]=sort( data(2,j) ); j=j(jj);
50   flt(k).time=data(2,j);   flt(k).time=data(2,j);
51   flt(k).x=data(3,j);   flt(k).x=data( 3,j);
52   flt(k).y=data(4,j);   flt(k).y=data( 4,j);
53   flt(k).k=data(5,j);   flt(k).z=data( 5,j);
54   flt(k).u=data(6,j);   flt(k).i=data( 6,j);
55   flt(k).v=data(7,j);   flt(k).j=data( 7,j);
56   flt(k).t=data(8,j);   flt(k).k=data( 8,j);
57   flt(k).s=data(9,j);   flt(k).p=data( 9,j);
58   flt(k).p=data(10,j);   flt(k).u=data(10,j);
59     flt(k).v=data(11,j);
60     flt(k).t=data(12,j);
61     flt(k).s=data(13,j);
62  end  end

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22