rb-grib 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/BSDL +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +13 -12
- data/README.rdoc +23 -0
- data/Rakefile +5 -0
- data/data/tp_ecmwf.grib +0 -0
- data/ext/grib.c +376 -68
- data/lib/numru/grib.rb +5 -1
- data/lib/numru/grib/definitions/grib1/localConcepts/kwbc/name.def +125 -0
- data/lib/numru/grib/definitions/grib1/localConcepts/kwbc/paramId.def +126 -0
- data/lib/numru/grib/definitions/grib1/localConcepts/kwbc/shortName.def +125 -0
- data/lib/numru/grib/definitions/grib1/localConcepts/kwbc/units.def +126 -0
- data/lib/numru/grib/definitions/grib2/localConcepts/rjtd/name.def +30 -0
- data/lib/numru/grib/definitions/grib2/localConcepts/rjtd/paramId.def +30 -0
- data/lib/numru/grib/definitions/grib2/localConcepts/rjtd/shortName.def +30 -0
- data/lib/numru/grib/definitions/grib2/localConcepts/rjtd/units.def +30 -0
- data/lib/numru/grib/grib.rb +132 -182
- data/lib/numru/grib/setenv.rb +12 -0
- data/lib/numru/grib/version.rb +1 -1
- data/rb-grib.gemspec +2 -1
- data/spec/grib_read_spec.rb +105 -76
- metadata +48 -7
data/lib/numru/grib.rb
CHANGED
@@ -0,0 +1,125 @@
|
|
1
|
+
#Surface lifted index
|
2
|
+
'Surface lifted index' = {
|
3
|
+
table2Version = 2 ;
|
4
|
+
indicatorOfParameter = 131 ;
|
5
|
+
}
|
6
|
+
#Best (4-layer) lifted index
|
7
|
+
'Best (4-layer) lifted index' = {
|
8
|
+
table2Version = 2 ;
|
9
|
+
indicatorOfParameter = 132 ;
|
10
|
+
}
|
11
|
+
#Vertical speed shear
|
12
|
+
'Vertical speed shear' = {
|
13
|
+
table2Version = 2 ;
|
14
|
+
indicatorOfParameter = 136 ;
|
15
|
+
}
|
16
|
+
#Categorical rain
|
17
|
+
'Categorical rain' = {
|
18
|
+
table2Version = 2 ;
|
19
|
+
indicatorOfParameter = 140 ;
|
20
|
+
}
|
21
|
+
#Categorical freezing rain
|
22
|
+
'Categorical freezing rain' = {
|
23
|
+
table2Version = 2 ;
|
24
|
+
indicatorOfParameter = 141 ;
|
25
|
+
}
|
26
|
+
#Categorical ice pellets
|
27
|
+
'Categorical ice pellets' = {
|
28
|
+
table2Version = 2 ;
|
29
|
+
indicatorOfParameter = 142 ;
|
30
|
+
}
|
31
|
+
#Categorical snow
|
32
|
+
'Categorical snow' = {
|
33
|
+
table2Version = 2 ;
|
34
|
+
indicatorOfParameter = 143 ;
|
35
|
+
}
|
36
|
+
#Volumetric soil moisture content
|
37
|
+
'Volumetric soil moisture content' = {
|
38
|
+
table2Version = 2 ;
|
39
|
+
indicatorOfParameter = 144 ;
|
40
|
+
}
|
41
|
+
#Potential evaporation rate
|
42
|
+
'Potential evaporation rate' = {
|
43
|
+
table2Version = 2 ;
|
44
|
+
indicatorOfParameter = 145 ;
|
45
|
+
}
|
46
|
+
#Cloud work function
|
47
|
+
'Cloud work function' = {
|
48
|
+
table2Version = 2 ;
|
49
|
+
indicatorOfParameter = 146 ;
|
50
|
+
}
|
51
|
+
#Zonal flux of gravity wave stress
|
52
|
+
'Zonal flux of gravity wave stress' = {
|
53
|
+
table2Version = 2 ;
|
54
|
+
indicatorOfParameter = 147 ;
|
55
|
+
}
|
56
|
+
#Meridional flux of gravity wave stress
|
57
|
+
'Meridional flux of gravity wave stress' = {
|
58
|
+
table2Version = 2 ;
|
59
|
+
indicatorOfParameter = 148 ;
|
60
|
+
}
|
61
|
+
#Cloud water mixing ratio
|
62
|
+
'Cloud water mixing ratio' = {
|
63
|
+
table2Version = 2 ;
|
64
|
+
indicatorOfParameter = 153 ;
|
65
|
+
}
|
66
|
+
#Ozone mixing ratio
|
67
|
+
'Ozone mixing ratio' = {
|
68
|
+
table2Version = 2 ;
|
69
|
+
indicatorOfParameter = 154 ;
|
70
|
+
}
|
71
|
+
#Ground heat flux
|
72
|
+
'Ground heat flux' = {
|
73
|
+
table2Version = 2 ;
|
74
|
+
indicatorOfParameter = 155 ;
|
75
|
+
}
|
76
|
+
#Convective inhibition
|
77
|
+
'Convective inhibition' = {
|
78
|
+
table2Version = 2 ;
|
79
|
+
indicatorOfParameter = 156 ;
|
80
|
+
}
|
81
|
+
#Convective available potential energy
|
82
|
+
'Convective available potential energy' = {
|
83
|
+
table2Version = 2 ;
|
84
|
+
indicatorOfParameter = 157 ;
|
85
|
+
}
|
86
|
+
#Downward short-wave radiation flux
|
87
|
+
'Downward short-wave radiation flux' = {
|
88
|
+
table2Version = 2 ;
|
89
|
+
indicatorOfParameter = 204 ;
|
90
|
+
}
|
91
|
+
#Downward long-wave radiation flux
|
92
|
+
'Downward long-wave radiation flux' = {
|
93
|
+
table2Version = 2 ;
|
94
|
+
indicatorOfParameter = 205 ;
|
95
|
+
}
|
96
|
+
#Upward short-wave radiation flux
|
97
|
+
'Upward short-wave radiation flux' = {
|
98
|
+
table2Version = 2 ;
|
99
|
+
indicatorOfParameter = 211 ;
|
100
|
+
}
|
101
|
+
#Upward long-wave radiation flux
|
102
|
+
'Upward long-wave radiation flux' = {
|
103
|
+
table2Version = 2 ;
|
104
|
+
indicatorOfParameter = 212 ;
|
105
|
+
}
|
106
|
+
#Convective precipitation rate
|
107
|
+
'Convective precipitation rate' = {
|
108
|
+
table2Version = 2 ;
|
109
|
+
indicatorOfParameter = 214 ;
|
110
|
+
}
|
111
|
+
#Planetary boundary layer height
|
112
|
+
'Planetary boundary layer height' = {
|
113
|
+
table2Version = 2 ;
|
114
|
+
indicatorOfParameter = 221 ;
|
115
|
+
}
|
116
|
+
#5-wave geopotential height
|
117
|
+
'5-wave geopotential height' = {
|
118
|
+
table2Version = 2 ;
|
119
|
+
indicatorOfParameter = 222 ;
|
120
|
+
}
|
121
|
+
#5-wave geopotential height anomaly
|
122
|
+
'5-wave geopotential height anomaly' = {
|
123
|
+
table2Version = 2 ;
|
124
|
+
indicatorOfParameter = 230 ;
|
125
|
+
}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
#Surface lifted index
|
2
|
+
'260127' = {
|
3
|
+
table2Version = 2 ;
|
4
|
+
indicatorOfParameter = 131 ;
|
5
|
+
}
|
6
|
+
#Best (4-layer) lifted index
|
7
|
+
'260128' = {
|
8
|
+
table2Version = 2 ;
|
9
|
+
indicatorOfParameter = 132 ;
|
10
|
+
}
|
11
|
+
#Vertical speed shear
|
12
|
+
'260068' = {
|
13
|
+
table2Version = 2 ;
|
14
|
+
indicatorOfParameter = 136 ;
|
15
|
+
}
|
16
|
+
#Categorical rain
|
17
|
+
'260029' = {
|
18
|
+
table2Version = 2 ;
|
19
|
+
indicatorOfParameter = 140 ;
|
20
|
+
}
|
21
|
+
#Categorical freezing rain
|
22
|
+
'260030' = {
|
23
|
+
table2Version = 2 ;
|
24
|
+
indicatorOfParameter = 141 ;
|
25
|
+
}
|
26
|
+
#Categorical ice pellets
|
27
|
+
'260031' = {
|
28
|
+
table2Version = 2 ;
|
29
|
+
indicatorOfParameter = 142 ;
|
30
|
+
}
|
31
|
+
#Categorical snow
|
32
|
+
'260032' = {
|
33
|
+
table2Version = 2 ;
|
34
|
+
indicatorOfParameter = 143 ;
|
35
|
+
}
|
36
|
+
#Volumetric soil moisture content
|
37
|
+
'260185' = {
|
38
|
+
table2Version = 2 ;
|
39
|
+
indicatorOfParameter = 144 ;
|
40
|
+
}
|
41
|
+
#Potential evaporation rate
|
42
|
+
'260037' = {
|
43
|
+
table2Version = 2 ;
|
44
|
+
indicatorOfParameter = 145 ;
|
45
|
+
}
|
46
|
+
#Cloud work function
|
47
|
+
'260111' = {
|
48
|
+
table2Version = 2 ;
|
49
|
+
indicatorOfParameter = 146 ;
|
50
|
+
}
|
51
|
+
#Zonal flux of gravity wave stress
|
52
|
+
'260081' = {
|
53
|
+
table2Version = 2 ;
|
54
|
+
indicatorOfParameter = 147 ;
|
55
|
+
}
|
56
|
+
#Meridional flux of gravity wave stress
|
57
|
+
'260082' = {
|
58
|
+
table2Version = 2 ;
|
59
|
+
indicatorOfParameter = 148 ;
|
60
|
+
}
|
61
|
+
#Colud water mixing ratio
|
62
|
+
'22' = {
|
63
|
+
table2Version = 2 ;
|
64
|
+
indicatorOfParameter = 153 ;
|
65
|
+
}
|
66
|
+
#Ozone mixing ratio
|
67
|
+
'260131' = {
|
68
|
+
table2Version = 2 ;
|
69
|
+
indicatorOfParameter = 154 ;
|
70
|
+
}
|
71
|
+
#Ground heat flux
|
72
|
+
'260186' = {
|
73
|
+
table2Version = 2 ;
|
74
|
+
indicatorOfParameter = 155 ;
|
75
|
+
}
|
76
|
+
#Convective inhibition
|
77
|
+
'228001' = {
|
78
|
+
table2Version = 2 ;
|
79
|
+
indicatorOfParameter = 156 ;
|
80
|
+
}
|
81
|
+
#Convective available potential energy
|
82
|
+
'59' = {
|
83
|
+
table2Version = 2 ;
|
84
|
+
indicatorOfParameter = 157 ;
|
85
|
+
}
|
86
|
+
#Downward short-wave radiation flux
|
87
|
+
'260087' = {
|
88
|
+
table2Version = 2 ;
|
89
|
+
indicatorOfParameter = 204 ;
|
90
|
+
}
|
91
|
+
#Downward long-wave radiation flux
|
92
|
+
'260097' = {
|
93
|
+
table2Version = 2 ;
|
94
|
+
indicatorOfParameter = 205 ;
|
95
|
+
}
|
96
|
+
#Upward short-wave radiation flux
|
97
|
+
'260088' = {
|
98
|
+
table2Version = 2 ;
|
99
|
+
indicatorOfParameter = 211 ;
|
100
|
+
}
|
101
|
+
#Upward long-wave radiation flux
|
102
|
+
'260098' = {
|
103
|
+
table2Version = 2 ;
|
104
|
+
indicatorOfParameter = 212 ;
|
105
|
+
}
|
106
|
+
#Convective precipitation rate
|
107
|
+
'260033' = {
|
108
|
+
table2Version = 2 ;
|
109
|
+
indicatorOfParameter = 214 ;
|
110
|
+
}
|
111
|
+
#Planetary boundary layer height
|
112
|
+
'260083' = {
|
113
|
+
table2Version = 2 ;
|
114
|
+
indicatorOfParameter = 221 ;
|
115
|
+
}
|
116
|
+
#5-wave geopotential height
|
117
|
+
'260080' = {
|
118
|
+
table2Version = 2 ;
|
119
|
+
indicatorOfParameter = 222 ;
|
120
|
+
}
|
121
|
+
#5-wave geopotential height anomaly
|
122
|
+
'260084' = {
|
123
|
+
table2Version = 2 ;
|
124
|
+
indicatorOfParameter = 230 ;
|
125
|
+
}
|
126
|
+
|
@@ -0,0 +1,125 @@
|
|
1
|
+
#Surface lifted index
|
2
|
+
'lftx' = {
|
3
|
+
table2Version = 2 ;
|
4
|
+
indicatorOfParameter = 131 ;
|
5
|
+
}
|
6
|
+
#Best (4-layer) lifted index
|
7
|
+
'4lftx' = {
|
8
|
+
table2Version = 2 ;
|
9
|
+
indicatorOfParameter = 132 ;
|
10
|
+
}
|
11
|
+
#Vertical speed shear
|
12
|
+
'vwsh' = {
|
13
|
+
table2Version = 2 ;
|
14
|
+
indicatorOfParameter = 136 ;
|
15
|
+
}
|
16
|
+
#Categorical rain
|
17
|
+
'crain' = {
|
18
|
+
table2Version = 2 ;
|
19
|
+
indicatorOfParameter = 140 ;
|
20
|
+
}
|
21
|
+
#Categorical freezing rain
|
22
|
+
'cfrzr' = {
|
23
|
+
table2Version = 2 ;
|
24
|
+
indicatorOfParameter = 141 ;
|
25
|
+
}
|
26
|
+
#Categorical ice pellets
|
27
|
+
'cicep' = {
|
28
|
+
table2Version = 2 ;
|
29
|
+
indicatorOfParameter = 142 ;
|
30
|
+
}
|
31
|
+
#Categorical snow
|
32
|
+
'csnow' = {
|
33
|
+
table2Version = 2 ;
|
34
|
+
indicatorOfParameter = 143 ;
|
35
|
+
}
|
36
|
+
#Volumetric soil moisture content
|
37
|
+
'soilw' = {
|
38
|
+
table2Version = 2 ;
|
39
|
+
indicatorOfParameter = 144 ;
|
40
|
+
}
|
41
|
+
#Potential evaporation rate
|
42
|
+
'pevpr' = {
|
43
|
+
table2Version = 2 ;
|
44
|
+
indicatorOfParameter = 145 ;
|
45
|
+
}
|
46
|
+
#Cloud work function
|
47
|
+
'cwork' = {
|
48
|
+
table2Version = 2 ;
|
49
|
+
indicatorOfParameter = 146 ;
|
50
|
+
}
|
51
|
+
#Zonal flux of gravity wave stress
|
52
|
+
'u-gwd' = {
|
53
|
+
table2Version = 2 ;
|
54
|
+
indicatorOfParameter = 147 ;
|
55
|
+
}
|
56
|
+
#Meridional flux of gravity wave stress
|
57
|
+
'v-gwd' = {
|
58
|
+
table2Version = 2 ;
|
59
|
+
indicatorOfParameter = 148 ;
|
60
|
+
}
|
61
|
+
#Cloud water mixing ratio
|
62
|
+
'clwmr' = {
|
63
|
+
table2Version = 2 ;
|
64
|
+
indicatorOfParameter = 153 ;
|
65
|
+
}
|
66
|
+
#Ozone mixing ratio
|
67
|
+
'o3mr' = {
|
68
|
+
table2Version = 2 ;
|
69
|
+
indicatorOfParameter = 154 ;
|
70
|
+
}
|
71
|
+
#Ground heat flux
|
72
|
+
'gflux' = {
|
73
|
+
table2Version = 2 ;
|
74
|
+
indicatorOfParameter = 155 ;
|
75
|
+
}
|
76
|
+
#Convective inhibition
|
77
|
+
'cin' = {
|
78
|
+
table2Version = 2 ;
|
79
|
+
indicatorOfParameter = 156 ;
|
80
|
+
}
|
81
|
+
#Convective available potential energy
|
82
|
+
'cape' = {
|
83
|
+
table2Version = 2 ;
|
84
|
+
indicatorOfParameter = 157 ;
|
85
|
+
}
|
86
|
+
#Downward short-wave radiation flux
|
87
|
+
'dswrf' = {
|
88
|
+
table2Version = 2 ;
|
89
|
+
indicatorOfParameter = 204 ;
|
90
|
+
}
|
91
|
+
#Downward long-wave radiation flux
|
92
|
+
'dlwrf' = {
|
93
|
+
table2Version = 2 ;
|
94
|
+
indicatorOfParameter = 205 ;
|
95
|
+
}
|
96
|
+
#Upward short-wave radiation flux
|
97
|
+
'uswrf' = {
|
98
|
+
table2Version = 2 ;
|
99
|
+
indicatorOfParameter = 211 ;
|
100
|
+
}
|
101
|
+
#Upward long-wave radiation flux
|
102
|
+
'ulwrf' = {
|
103
|
+
table2Version = 2 ;
|
104
|
+
indicatorOfParameter = 212 ;
|
105
|
+
}
|
106
|
+
#Convective precipitation rate
|
107
|
+
'cprat' = {
|
108
|
+
table2Version = 2 ;
|
109
|
+
indicatorOfParameter = 214 ;
|
110
|
+
}
|
111
|
+
#Planetary boundary layer height
|
112
|
+
'hpbl' = {
|
113
|
+
table2Version = 2 ;
|
114
|
+
indicatorOfParameter = 221 ;
|
115
|
+
}
|
116
|
+
#5-wave geopotential height
|
117
|
+
'5wavh' = {
|
118
|
+
table2Version = 2 ;
|
119
|
+
indicatorOfParameter = 222 ;
|
120
|
+
}
|
121
|
+
#5-wave geopotential height anomaly
|
122
|
+
'5wava' = {
|
123
|
+
table2Version = 2 ;
|
124
|
+
indicatorOfParameter = 230 ;
|
125
|
+
}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
#Surface lifted index
|
2
|
+
'K' = {
|
3
|
+
table2Version = 2 ;
|
4
|
+
indicatorOfParameter = 131 ;
|
5
|
+
}
|
6
|
+
#Best (4-layer) lifted index
|
7
|
+
'K' = {
|
8
|
+
table2Version = 2 ;
|
9
|
+
indicatorOfParameter = 132 ;
|
10
|
+
}
|
11
|
+
#Vertical speed shear
|
12
|
+
's**-1' = {
|
13
|
+
table2Version = 2 ;
|
14
|
+
indicatorOfParameter = 136 ;
|
15
|
+
}
|
16
|
+
|
17
|
+
#Categorical rain
|
18
|
+
'(Code table 4.222)' = {
|
19
|
+
table2Version = 2 ;
|
20
|
+
indicatorOfParameter = 140 ;
|
21
|
+
}
|
22
|
+
#Categorical freezing rain
|
23
|
+
'(Code table 4.222)' = {
|
24
|
+
table2Version = 2 ;
|
25
|
+
indicatorOfParameter = 141 ;
|
26
|
+
}
|
27
|
+
#Categorical ice pellets
|
28
|
+
'(Code table 4.222)' = {
|
29
|
+
table2Version = 2 ;
|
30
|
+
indicatorOfParameter = 142 ;
|
31
|
+
}
|
32
|
+
#Categorical snow
|
33
|
+
'(Code table 4.222)' = {
|
34
|
+
table2Version = 2 ;
|
35
|
+
indicatorOfParameter = 143 ;
|
36
|
+
}
|
37
|
+
#Volumetric soil moisture content
|
38
|
+
'Proportion' = {
|
39
|
+
table2Version = 2 ;
|
40
|
+
indicatorOfParameter = 144 ;
|
41
|
+
}
|
42
|
+
#Potential evaporation rate
|
43
|
+
'W m**-2' = {
|
44
|
+
table2Version = 2 ;
|
45
|
+
indicatorOfParameter = 145 ;
|
46
|
+
}
|
47
|
+
#Cloud work function
|
48
|
+
'J kg**-1' = {
|
49
|
+
table2Version = 2 ;
|
50
|
+
indicatorOfParameter = 146 ;
|
51
|
+
}
|
52
|
+
#Zonal flux of gravity wave stress
|
53
|
+
'N m**-2' = {
|
54
|
+
table2Version = 2 ;
|
55
|
+
indicatorOfParameter = 147 ;
|
56
|
+
}
|
57
|
+
#Meridional flux of gravity wave stress
|
58
|
+
'N m**-2' = {
|
59
|
+
table2Version = 2 ;
|
60
|
+
indicatorOfParameter = 148 ;
|
61
|
+
}
|
62
|
+
#Cloud water mixing ratio
|
63
|
+
'kg kg**-1' = {
|
64
|
+
table2Version = 2 ;
|
65
|
+
indicatorOfParameter = 153 ;
|
66
|
+
}
|
67
|
+
#Ozone mixing ratio
|
68
|
+
'kg kg**-1' = {
|
69
|
+
table2Version = 2 ;
|
70
|
+
indicatorOfParameter = 154 ;
|
71
|
+
}
|
72
|
+
#Ground heat flux
|
73
|
+
'W m**-2' = {
|
74
|
+
table2Version = 2 ;
|
75
|
+
indicatorOfParameter = 155 ;
|
76
|
+
}
|
77
|
+
#Convective inhibition
|
78
|
+
'J kg**-1' = {
|
79
|
+
table2Version = 2 ;
|
80
|
+
indicatorOfParameter = 156 ;
|
81
|
+
}
|
82
|
+
#Convective available potential energy
|
83
|
+
'J kg**-1' = {
|
84
|
+
table2Version = 2 ;
|
85
|
+
indicatorOfParameter = 157 ;
|
86
|
+
}
|
87
|
+
#Downward short-wave radiation flux
|
88
|
+
'W m**-2' = {
|
89
|
+
table2Version = 2 ;
|
90
|
+
indicatorOfParameter = 204 ;
|
91
|
+
}
|
92
|
+
#Downward long-wave radiation flux
|
93
|
+
'W m**-2' = {
|
94
|
+
table2Version = 2 ;
|
95
|
+
indicatorOfParameter = 205 ;
|
96
|
+
}
|
97
|
+
#Upward short-wave radiation flux
|
98
|
+
'W m**-2' = {
|
99
|
+
table2Version = 2 ;
|
100
|
+
indicatorOfParameter = 211 ;
|
101
|
+
}
|
102
|
+
#Upward long-wave radiation flux
|
103
|
+
'W m**-2' = {
|
104
|
+
table2Version = 2 ;
|
105
|
+
indicatorOfParameter = 212 ;
|
106
|
+
}
|
107
|
+
#Convective precipitation rate
|
108
|
+
'kg m**-2 s**-1' = {
|
109
|
+
table2Version = 2 ;
|
110
|
+
indicatorOfParameter = 214 ;
|
111
|
+
}
|
112
|
+
#Planetary boundary layer height
|
113
|
+
'm' = {
|
114
|
+
table2Version = 2 ;
|
115
|
+
indicatorOfParameter = 221 ;
|
116
|
+
}
|
117
|
+
#5-wave geopotential height
|
118
|
+
'gpm' = {
|
119
|
+
table2Version = 2 ;
|
120
|
+
indicatorOfParameter = 222 ;
|
121
|
+
}
|
122
|
+
#5-wave geopotential height anomaly
|
123
|
+
'gpm' = {
|
124
|
+
table2Version = 2 ;
|
125
|
+
indicatorOfParameter = 230 ;
|
126
|
+
}
|