Professional Documents
Culture Documents
Milan Dragosavac
Slide 1
Langen
Slide 1
Slide 2
Langen
Slide 2
Encoding
Decoding
Low maintenance costs
Portable
User friendly
Slide 3
Langen
Slide 3
C
- Reading/writing BUFR data
- gbyte, sbyte routines to do bit manipulations
Slide 4
Langen
Slide 4
http://www.ecmwf.int/products/data/software/
Go to Free download and get bufr_000320.tar.gz file
gunzip bufr_000320.tar.gz
cd bufr_000320
Read README file for explanations
Execute make command which will create libbufr.a
cd examples
Slide 5
Langen
Slide 5
1 maa ma
-rwxr--r--
1 maa ma
-rwxr--r--
Langen
Slide 6
1 maa ma
-rwxr--r--
1 maa ma
Slide 7
Langen
Slide 7
Slide 8
Langen
Slide 8
Langen
Slide 9
Langen
Slide 10
Bufr format
Binary universal form for the representation of
meteorological data
Indicator section
Identification section
Optional section
Langen
Slide 11
5-7
Slide 12
Langen
Slide 12
Identification section
Octet number Content
1-3
Length of section 1
5-6
7-8
Langen
Slide 13
10
11
12
13
Local sub-category
Slide 14
Langen
Slide 14
Content
14
15
16 - 17
Year ( 4 digits )
18
Month
19
Day
20
Hour
21
Minute
22
Second
23-
Slide 15
Langen
Slide 15
Optional section
Octet number Content
1-3
5-
Slide 16
Langen
Slide 16
4
5-6
7
17
Collection of descriptors Slide
defining
the data
Langen
Slide 17
Data section
Octet number Content
1-3
5-
Slide 18
Langen
Slide 18
End section
Octet number Content
1-4
Slide 19
Langen
Slide 19
Langen
Slide 20
Slide 20
Slide 21
Langen
Slide 21
Bssswwwwwxxxxxyyyzzz.TXT
Cssswwwwwxxxxxyyyzzz.TXT
Dssswwwwwxxxxxyyyzzz.TXT
sss
- Originating centre
yyy
zzz
Langen
Slide 22
export BUFR_TABLES=/xxx/
setenv BUFR_TABLES /xxx/
The path must end with back slash /
Defaults
Integer missing value indicator
NVIND=2147483647
Slide 23
RVIND= 1.7E38
WMO BUFR training course
Langen
Slide 23
Slide 24
Langen
Slide 24
PBIO routines
FORTRAN routines to handle products in an unblocked binary file
Output arguments:
kunit - integer unit number
Langen
Slide 25
PBIO routines
kerr - 0, successful
-1, file does not exist
Slide 26
Langen
Slide 26
PBIO routines
To read Bufr product
kret
Langen
Slide 27
Slide 27
PBIO routines
kret from pbbufr subroutine:
-1
-2
-3
Langen
Slide 28
PBIO routines
subroutine PBCLOSE (kunit, kret)
Langen
Slide 29
PBIO routines
File handling FORTRAN subroutines
Langen
Slide 30
PBIO routines
Output argument is an integer:
kret - status return code
Slide 31
Langen
Slide 31
PBIO routines
subroutine PBREAD (kunit, karray, kount, kret)
Input arguments are integers:
-1
-2
Langen
Slide 32
PBIO routines
subroutine PBWRITE( kunit, karray, kount, kerr)
Langen
Slide 33
kbuff
Langen
Slide 34
ksec0
ksec1
ksec2
ksec3
ksec4
Langen
Slide 35
Content
Slide 36
Langen
Slide 36
Content
Origination centre
Slide 37
Langen
Slide 37
Content
Year
10
Month
11
Day
12
Hour
13
Minute
Slide 38
Langen
Slide 38
Content
14
15
16
Originating sub-centre
17
International sub-category
18
Second
19-
Langen
Slide 39
Content
2-
Slide 40
Langen
Slide 40
Content
Reserved
Number of subsets
Slide 41
Langen
Slide 41
Array
index
Content
2-
Reserved
Slide 42
Langen
Slide 42
Content
Number of subsets
43
Total bufr message length in Slide
bytes
Langen
Slide 43
Slide 44
Langen
Slide 44
Slide 45
Langen
Slide 45
ksec0
ksec1
ksec2
ksec3
Langen
Slide 46
kdlen
kdata
Slide 47
Langen
Slide 47
Output arguments:
Langen
Slide 48
Langen
Slide 49
Langen
Slide 50
Langen
Slide 51
Langen
Slide 52
Langen
Slide 53
Slide 54
Langen
Slide 54
/bufr_000320/examples/tdexp.f
or
Bufrviewer application
Slide 55
Langen
Slide 55
Slide 56
Langen
Slide 56
Langen
Slide 57
index=i +(KAPP-1)*klen
WMO BUFR training course
Langen
Slide 58
Slide 59
Langen
Slide 59
kapp
klen
Langen
Slide 60
vals
cboxn
cboxu
Slide 61
Langen
Slide 61
************** 222000.0
**************
98.0
**************
1.0
4 STATISTICS (008024/008023)
**************
********
**************
********
**************
********
10.0
70.0
320.0
70.0
Langen
Slide 62
Slide 62
- class 33 element
- associated field
- Operator 222000 + bit map
- 033220 variation analysis report event , valid for whole
report( observation)
Slide 63
Langen
Slide 63
204001
031021
011001
204000
After expansion
031021 associate field significance
Slide 64
Langen
Slide 64
222000
101005
031031
001031
001032
101005
033007
Slide 65
Langen
Slide 65
224000
237000 Use previously define bit map
001031
001032
008023 First order statistics
101005
224255 First order statistics marker
Slide 66
Langen
Slide 66
225000
237000 Use previously define bit map
001031
001032
008024 Difference statistics
101005
225255 Difference statistics marker
Slide 67
Langen
Slide 67
Pre-process observations
- unpacking
- reorganization of data
- possible quality control
- grouping of observations which belong to
particular analysis cycle
- creating RDB key for further more efficient processing
Slide 68
Langen
Slide 68
Slide 69
Langen
Slide 69