/[MITgcm]/MITgcm_contrib/gmaze_pv/subfct/readrec_cs510.m
ViewVC logotype

Annotation of /MITgcm_contrib/gmaze_pv/subfct/readrec_cs510.m

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


Revision 1.1 - (hide annotations) (download)
Tue Jan 30 22:10:34 2007 UTC (18 years, 5 months ago) by gmaze
Branch: MAIN
CVS Tags: HEAD
Add eg for bin2cdf conversion for both lat-lon cs grid

1 gmaze 1.1 % C = READREC_CS510(fnam,NZ,fldprec)
2     %
3     % Get one record from the CS510 run
4     %
5     % fnam : string to the file (include path)
6     % NZ : number of levels to read
7     % fldprec : float32 or float64
8     % ouput is: C(510,510,NZ,6)
9     %
10     %
11    
12     function C = readrec_cs510(fnam,NZ,fldprec)
13    
14     fmt = 'ieee-be';
15     nx = 510;
16     ny = 510;
17    
18    
19     fid = fopen(fnam,'r',fmt);
20     C = fread(fid,6*nx*ny*NZ,fldprec);
21     fclose(fid);
22     C = reshape(C,[6*nx ny NZ]);
23    
24    

  ViewVC Help
Powered by ViewVC 1.1.22