Parent Directory
|
Revision Log
|
Revision Graph
Add eg for bin2cdf conversion for both lat-lon cs grid
| 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 |