source: trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_grib_pds.pro @ 134

Last change on this file since 134 was 134, checked in by navarro, 18 years ago

change *.pro file properties (del eof-style, del executable, set keywords Id

  • Property svn:keywords set to Id
File size: 969 bytes
Line 
1FUNCTION read_grib_pds, num, recstart
2;
3;
4  compile_opt idl2, strictarrsubs
5;
6  offset = recstart+8
7  a = assoc(num, bytarr(1, /nozero), offset-1)
8;
9  sizepds = bit2int([binary(a[1]), binary(a[2]), binary(a[3])])
10 ;
11  paramtableversion = (a[4])[0]
12 ;
13  centerid = (a[5])[0]
14 ;
15  procid = (a[6])[0]
16 ;
17  gridid = (a[7])[0]
18;
19  flag = binary(a[8])
20  gdsnotomitted = flag[0]
21  bmsnotomitted = flag[1]
22;
23  paramunitid = (a[9])[0]
24;
25  levtype = (a[10])[0] 
26  levalue1 = (a[11])[0]
27  levalue2 = (a[12])[0]
28;
29  year = (a[13])[0]
30  month = (a[14])[0]
31  day = (a[15])[0]
32  hour = (a[16])[0]
33  minute = (a[17])[0]
34  timeunit = (a[18])[0]
35  p1 = (a[19])[0]
36  p2 = (a[20])[0]
37  timerange = (a[21])[0]
38  n1 = (a[22])[0]
39  n2 = (a[23])[0]
40  nbmiss = (a[24])[0]
41  century = (a[25])[0]
42;
43  subcenterid = (a[26])[0]
44;
45  d =  bit2int([binary(a[27]), binary(a[28])], /checkneg)
46;.........
47
48
49  RETURN, {size:sizepds, gdsnotomitted:gdsnotomitted, bmsnotomitted:bmsnotomitted, d:d}
50END
Note: See TracBrowser for help on using the repository browser.