knmi 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/Gemfile +5 -4
- data/Gemfile.lock +22 -1
- data/README.rdoc +114 -101
- data/VERSION +1 -1
- data/data/current_stations.yml +1584 -0
- data/data/daily_data_key.yml +312 -0
- data/data/data_key.yml +491 -0
- data/data/hourly_data_key.yml +181 -0
- data/knmi.gemspec +34 -7
- data/lib/.DS_Store +0 -0
- data/lib/knmi.rb +67 -186
- data/lib/knmi/httpservice.rb +125 -0
- data/lib/knmi/parameters.rb +98 -0
- data/lib/knmi/station.rb +113 -0
- data/test/helper.rb +5 -2
- data/test/test_httpservice.rb +53 -0
- data/test/test_knmi.rb +144 -4
- data/test/test_parameters.rb +180 -0
- data/test/test_station.rb +102 -0
- metadata +74 -15
@@ -0,0 +1,312 @@
|
|
1
|
+
---
|
2
|
+
- parameter: YYYYMMDD
|
3
|
+
category:
|
4
|
+
description: Time Stamp
|
5
|
+
validate:
|
6
|
+
conversion: |-
|
7
|
+
Time.utc(
|
8
|
+
year = n.to_s[(0..3)],
|
9
|
+
month = n.to_s[(4..5)],
|
10
|
+
day = n.to_s[(6..7)]
|
11
|
+
)
|
12
|
+
units: Time
|
13
|
+
period: daily
|
14
|
+
- parameter: DDVEC
|
15
|
+
category: WIND
|
16
|
+
description: Wind Direction
|
17
|
+
validate: (0..360).include?(n)
|
18
|
+
conversion: "n == 0 ? nil : n"
|
19
|
+
units: Polar Coordinates (360=north, 90=east, 180=south, 270=west, 0=calm/variable)
|
20
|
+
period: daily
|
21
|
+
- parameter: FHVEC
|
22
|
+
category: WIND
|
23
|
+
description: Vector Mean Wind Speed
|
24
|
+
validate: n.integer?
|
25
|
+
conversion: n / 10
|
26
|
+
units: m/s
|
27
|
+
period: daily
|
28
|
+
- parameter: FG
|
29
|
+
category: WIND
|
30
|
+
description: Daily Mean Wind Speed
|
31
|
+
validate: n.integer?
|
32
|
+
conversion: n / 10
|
33
|
+
units: m/s
|
34
|
+
period: daily
|
35
|
+
- parameter: FHX
|
36
|
+
category: WIND
|
37
|
+
description: Maximum Hourly Mean Windspeed
|
38
|
+
validate: n.integer?
|
39
|
+
conversion: n / 10
|
40
|
+
units: m/s
|
41
|
+
period: daily
|
42
|
+
- parameter: FHXH
|
43
|
+
category: WIND
|
44
|
+
description: Hourly Division at Which Maximum Wind Speed Was Measured
|
45
|
+
validate: (1..24).include?(n)
|
46
|
+
conversion:
|
47
|
+
units: Hour
|
48
|
+
period: daily
|
49
|
+
- parameter: FHN
|
50
|
+
category: WIND
|
51
|
+
description: Minimum Hourly Mean Windspeed
|
52
|
+
validate: n.integer?
|
53
|
+
conversion: n / 10
|
54
|
+
units: m/s
|
55
|
+
period: daily
|
56
|
+
- parameter: FHNH
|
57
|
+
category: WIND
|
58
|
+
description: Hourly Division at Which Minimum Wind Speed Was Measured
|
59
|
+
validate: (1..24).include?(n)
|
60
|
+
conversion:
|
61
|
+
units: Hour
|
62
|
+
period: daily
|
63
|
+
- parameter: FXX
|
64
|
+
category: WIND
|
65
|
+
description: Maximum Instantaneous Wind Speed
|
66
|
+
validate: n.integer?
|
67
|
+
conversion: n / 10
|
68
|
+
units: m/s
|
69
|
+
period: daily
|
70
|
+
- parameter: FXXH
|
71
|
+
category: WIND
|
72
|
+
description: Hourly Division at Which Maximum Instantaneous Wind Speed Was Measured
|
73
|
+
validate: (1..24).include?(n)
|
74
|
+
conversion:
|
75
|
+
units: Hour
|
76
|
+
period: daily
|
77
|
+
- parameter: TG
|
78
|
+
category: TEMP
|
79
|
+
description: Daily Mean Temperature
|
80
|
+
validate: n.integer?
|
81
|
+
conversion: n / 10
|
82
|
+
units: C
|
83
|
+
period: daily
|
84
|
+
- parameter: TN
|
85
|
+
category: TEMP
|
86
|
+
description: Minimum Temperature
|
87
|
+
validate: n.integer?
|
88
|
+
conversion: n / 10
|
89
|
+
units: C
|
90
|
+
period: daily
|
91
|
+
- parameter: TNH
|
92
|
+
category: TEMP
|
93
|
+
description: Hourly Division in Which Mimimum Temperature Was Measured
|
94
|
+
validate: (1..24).include?(n)
|
95
|
+
conversion:
|
96
|
+
units: Hour
|
97
|
+
period: daily
|
98
|
+
- parameter: TX
|
99
|
+
category: TEMP
|
100
|
+
description: Maximum Temperature
|
101
|
+
validate: n.integer?
|
102
|
+
conversion: n / 10
|
103
|
+
units: C
|
104
|
+
period: daily
|
105
|
+
- parameter: TXH
|
106
|
+
category: TEMP
|
107
|
+
description: Hourly Division in Which Maximum Temperature Was Measured
|
108
|
+
validate: (1..24).include?(n)
|
109
|
+
conversion:
|
110
|
+
units: Hour
|
111
|
+
period: daily
|
112
|
+
- parameter: T10N
|
113
|
+
category: TEMP
|
114
|
+
description: Minimum Temperature at 10 Cm Above Surface
|
115
|
+
validate: n.integer?
|
116
|
+
conversion: n / 10
|
117
|
+
units: C
|
118
|
+
period: daily
|
119
|
+
- parameter: T10NH
|
120
|
+
category: TEMP
|
121
|
+
description: Six Hourly Division at Which Minimum Temperature at 10 Cm Above Surface Was Measured
|
122
|
+
validate: (6..24).step(6)
|
123
|
+
conversion:
|
124
|
+
units:
|
125
|
+
period: daily
|
126
|
+
- parameter: SQ
|
127
|
+
category: RADT
|
128
|
+
description: Sunshine Duration
|
129
|
+
validate: (-1..6).include?(n)
|
130
|
+
conversion: "n == -1 ? 0.05 : (n / 10) * 60"
|
131
|
+
units: minutes
|
132
|
+
period: daily
|
133
|
+
- parameter: SP
|
134
|
+
category: RADT
|
135
|
+
description: Percent of Maximum Sunshine Duration
|
136
|
+
validate: (0..100).include?(n)
|
137
|
+
conversion:
|
138
|
+
units: %
|
139
|
+
period: daily
|
140
|
+
- parameter: Q
|
141
|
+
category: RADT
|
142
|
+
description: Global Radiation
|
143
|
+
validate: n.integer?
|
144
|
+
conversion:
|
145
|
+
units: J/cm^2
|
146
|
+
period: daily
|
147
|
+
- parameter: DR
|
148
|
+
category: PRCP
|
149
|
+
description: Precipitation Duration
|
150
|
+
validate: (0..6).include?(n)
|
151
|
+
conversion: (n / 10) * 60
|
152
|
+
units: minutes
|
153
|
+
period: daily
|
154
|
+
- parameter: RH
|
155
|
+
category: PRCP
|
156
|
+
description: Daily Precipitation
|
157
|
+
validate: n.integer?
|
158
|
+
conversion: n / 10
|
159
|
+
units: mm
|
160
|
+
period: daily
|
161
|
+
- parameter: RHX
|
162
|
+
category: PRCP
|
163
|
+
description: Maximum Hourly Precipitation
|
164
|
+
validate: n.integer?
|
165
|
+
conversion: "n == -1 ? 0.05 : n / 10"
|
166
|
+
units: mm
|
167
|
+
period: daily
|
168
|
+
- parameter: RHXH
|
169
|
+
category: PRCP
|
170
|
+
description: Hourly Division in Which Maximum Hourly Precipitation Was Measured
|
171
|
+
validate: (1..24).include?(n)
|
172
|
+
conversion:
|
173
|
+
units: Hour
|
174
|
+
period: daily
|
175
|
+
- parameter: EV24
|
176
|
+
category: ATMS
|
177
|
+
description: Potential Evapotranspiration
|
178
|
+
validate: n.integer?
|
179
|
+
conversion: n / 10
|
180
|
+
units: mm
|
181
|
+
period: daily
|
182
|
+
- parameter: PG
|
183
|
+
category: ATMS
|
184
|
+
description: Daily Mean Sea Level Pressure
|
185
|
+
validate: n.integer?
|
186
|
+
conversion: n / 10
|
187
|
+
units: hPa
|
188
|
+
period: daily
|
189
|
+
- parameter: PX
|
190
|
+
category: ATMS
|
191
|
+
description: Maximum Hourly Sea Level Pressure
|
192
|
+
validate: n.integer?
|
193
|
+
conversion: n / 10
|
194
|
+
units: hPa
|
195
|
+
period: daily
|
196
|
+
- parameter: PXH
|
197
|
+
category: ATMS
|
198
|
+
description: Hourly Division on Which Maximum Hourly Sea Level Pressure Was Measured
|
199
|
+
validate: (1..24).include?(n)
|
200
|
+
conversion:
|
201
|
+
units: Hour
|
202
|
+
period: daily
|
203
|
+
- parameter: PN
|
204
|
+
category: ATMS
|
205
|
+
description: Minimum Hourly Sea Level Pressure
|
206
|
+
validate: n.integer?
|
207
|
+
conversion: n / 10
|
208
|
+
units: hPa
|
209
|
+
period: daily
|
210
|
+
- parameter: PNH
|
211
|
+
category: ATMS
|
212
|
+
description: Hourly Division in Which Minimum Hourly Sea Level Pressure Was Measured
|
213
|
+
validate: (1..24).include?(n)
|
214
|
+
conversion:
|
215
|
+
units: Hour
|
216
|
+
period: daily
|
217
|
+
- parameter: VVN
|
218
|
+
category: VISB
|
219
|
+
description: Minimum Visibility
|
220
|
+
validate: (0..89).include(n)
|
221
|
+
conversion: |-
|
222
|
+
if n == 0
|
223
|
+
'< 100 meters'
|
224
|
+
elsif (1..49).include?(n)
|
225
|
+
(n * 100).to_s + '-' + ((n+1) * 100).to_s + ' meters'
|
226
|
+
elsif n == 50
|
227
|
+
'5-6 kilometers'
|
228
|
+
elsif (56..79).include?(n)
|
229
|
+
(n - 50).to_s + '-' + (n - 49).to_s + ' kilometers'
|
230
|
+
elsif (80..88).include?(n)
|
231
|
+
(n - 50).to_s + '-' + (n - 45).to_s + ' kilometers'
|
232
|
+
elsif n == 89
|
233
|
+
'> 70 kilometers'
|
234
|
+
end
|
235
|
+
units:
|
236
|
+
period: daily
|
237
|
+
- parameter: VVNH
|
238
|
+
category: VISB
|
239
|
+
description: Hourly Division in Which Minimum Visibility Was Measured
|
240
|
+
validate: (1..24).include?(n)
|
241
|
+
conversion:
|
242
|
+
units: Hour
|
243
|
+
period: daily
|
244
|
+
- parameter: VVX
|
245
|
+
category: VISB
|
246
|
+
description: Maximum Visibility
|
247
|
+
validate: (0..89).include(n)
|
248
|
+
conversion: |-
|
249
|
+
if n == 0
|
250
|
+
'< 100 meters'
|
251
|
+
elsif (1..49).include?(n)
|
252
|
+
(n * 100).to_s + '-' + ((n+1) * 100).to_s + ' meters'
|
253
|
+
elsif n == 50
|
254
|
+
'5-6 kilometers'
|
255
|
+
elsif (56..79).include?(n)
|
256
|
+
(n - 50).to_s + '-' + (n - 49).to_s + ' kilometers'
|
257
|
+
elsif (80..88).include?(n)
|
258
|
+
(n - 50).to_s + '-' + (n - 45).to_s + ' kilometers'
|
259
|
+
elsif n == 89
|
260
|
+
'> 70 kilometers'
|
261
|
+
end
|
262
|
+
units:
|
263
|
+
period: daily
|
264
|
+
- parameter: VVXH
|
265
|
+
category: VISB
|
266
|
+
description: Hourly Division in Which Maximum Visibility Was Measured
|
267
|
+
validate: (1..24).include?(n)
|
268
|
+
conversion:
|
269
|
+
units: Hour
|
270
|
+
period: daily
|
271
|
+
- parameter: NG
|
272
|
+
category: VISB
|
273
|
+
description: Mean Daily Cloud Cover
|
274
|
+
validate: (0..9).include?(n)
|
275
|
+
conversion:
|
276
|
+
units:
|
277
|
+
period: daily
|
278
|
+
- parameter: UG
|
279
|
+
category: ATMS
|
280
|
+
description: Daily Mean Relative Humidity
|
281
|
+
validate: (0..100).include?(n)
|
282
|
+
conversion:
|
283
|
+
units: %
|
284
|
+
period: daily
|
285
|
+
- parameter: UX
|
286
|
+
category: ATMS
|
287
|
+
description: Maximum Relative Humidity
|
288
|
+
validate: (0..100).include?(n)
|
289
|
+
conversion:
|
290
|
+
units: %
|
291
|
+
period: daily
|
292
|
+
- parameter: UXH
|
293
|
+
category: ATMS
|
294
|
+
description: Hourly Division in Which Maximum Relative Humidty Was Measured
|
295
|
+
validate: (1..24).include?(n)
|
296
|
+
conversion:
|
297
|
+
units: Hour
|
298
|
+
period: daily
|
299
|
+
- parameter: UN
|
300
|
+
category: ATMS
|
301
|
+
description: Minimum Relative Humidity
|
302
|
+
validate: (0..100).include?(n)
|
303
|
+
conversion:
|
304
|
+
units: %
|
305
|
+
period: daily
|
306
|
+
- parameter: UNH
|
307
|
+
category: ATMS
|
308
|
+
description: Hourly Division in Which Minimum Relative Humidity Was Measured
|
309
|
+
validate: (1..24).include?(n)
|
310
|
+
conversion:
|
311
|
+
units: Hour
|
312
|
+
period: daily
|
data/data/data_key.yml
ADDED
@@ -0,0 +1,491 @@
|
|
1
|
+
---
|
2
|
+
- parameter: YYYYMMDD
|
3
|
+
category:
|
4
|
+
description: Time Stamp
|
5
|
+
validate:
|
6
|
+
conversion: |-
|
7
|
+
Time.utc(
|
8
|
+
year = n.to_s[(0..3)],
|
9
|
+
month = n.to_s[(4..5)],
|
10
|
+
day = n.to_s[(6..7)]
|
11
|
+
)
|
12
|
+
units: Time
|
13
|
+
period: daily
|
14
|
+
- parameter: DDVEC
|
15
|
+
category: WIND
|
16
|
+
description: Wind Direction
|
17
|
+
validate: (0..360).include?(n)
|
18
|
+
conversion: "n == 0 ? nil : n"
|
19
|
+
units: Polar Coordinates (360=north, 90=east, 180=south, 270=west, 0=calm/variable)
|
20
|
+
period: daily
|
21
|
+
- parameter: FHVEC
|
22
|
+
category: WIND
|
23
|
+
description: Vector Mean Wind Speed
|
24
|
+
validate: n.integer?
|
25
|
+
conversion: n / 10
|
26
|
+
units: m/s
|
27
|
+
period: daily
|
28
|
+
- parameter: FG
|
29
|
+
category: WIND
|
30
|
+
description: Daily Mean Wind Speed
|
31
|
+
validate: n.integer?
|
32
|
+
conversion: n / 10
|
33
|
+
units: m/s
|
34
|
+
period: daily
|
35
|
+
- parameter: FHX
|
36
|
+
category: WIND
|
37
|
+
description: Maximum Hourly Mean Windspeed
|
38
|
+
validate: n.integer?
|
39
|
+
conversion: n / 10
|
40
|
+
units: m/s
|
41
|
+
period: daily
|
42
|
+
- parameter: FHXH
|
43
|
+
category: WIND
|
44
|
+
description: Hourly Division at Which Maximum Wind Speed Was Measured
|
45
|
+
validate: (1..24).include?(n)
|
46
|
+
conversion:
|
47
|
+
units: Hour
|
48
|
+
period: daily
|
49
|
+
- parameter: FHN
|
50
|
+
category: WIND
|
51
|
+
description: Minimum Hourly Mean Windspeed
|
52
|
+
validate: n.integer?
|
53
|
+
conversion: n / 10
|
54
|
+
units: m/s
|
55
|
+
period: daily
|
56
|
+
- parameter: FHNH
|
57
|
+
category: WIND
|
58
|
+
description: Hourly Division at Which Minimum Wind Speed Was Measured
|
59
|
+
validate: (1..24).include?(n)
|
60
|
+
conversion:
|
61
|
+
units: Hour
|
62
|
+
period: daily
|
63
|
+
- parameter: FXX
|
64
|
+
category: WIND
|
65
|
+
description: Maximum Instantaneous Wind Speed
|
66
|
+
validate: n.integer?
|
67
|
+
conversion: n / 10
|
68
|
+
units: m/s
|
69
|
+
period: daily
|
70
|
+
- parameter: FXXH
|
71
|
+
category: WIND
|
72
|
+
description: Hourly Division at Which Maximum Instantaneous Wind Speed Was Measured
|
73
|
+
validate: (1..24).include?(n)
|
74
|
+
conversion:
|
75
|
+
units: Hour
|
76
|
+
period: daily
|
77
|
+
- parameter: TG
|
78
|
+
category: TEMP
|
79
|
+
description: Daily Mean Temperature
|
80
|
+
validate: n.integer?
|
81
|
+
conversion: n / 10
|
82
|
+
units: C
|
83
|
+
period: daily
|
84
|
+
- parameter: TN
|
85
|
+
category: TEMP
|
86
|
+
description: Minimum Temperature
|
87
|
+
validate: n.integer?
|
88
|
+
conversion: n / 10
|
89
|
+
units: C
|
90
|
+
period: daily
|
91
|
+
- parameter: TNH
|
92
|
+
category: TEMP
|
93
|
+
description: Hourly Division in Which Mimimum Temperature Was Measured
|
94
|
+
validate: (1..24).include?(n)
|
95
|
+
conversion:
|
96
|
+
units: Hour
|
97
|
+
period: daily
|
98
|
+
- parameter: TX
|
99
|
+
category: TEMP
|
100
|
+
description: Maximum Temperature
|
101
|
+
validate: n.integer?
|
102
|
+
conversion: n / 10
|
103
|
+
units: C
|
104
|
+
period: daily
|
105
|
+
- parameter: TXH
|
106
|
+
category: TEMP
|
107
|
+
description: Hourly Division in Which Maximum Temperature Was Measured
|
108
|
+
validate: (1..24).include?(n)
|
109
|
+
conversion:
|
110
|
+
units: Hour
|
111
|
+
period: daily
|
112
|
+
- parameter: T10N
|
113
|
+
category: TEMP
|
114
|
+
description: Minimum Temperature at 10 Cm Above Surface
|
115
|
+
validate: n.integer?
|
116
|
+
conversion: n / 10
|
117
|
+
units: C
|
118
|
+
period: daily
|
119
|
+
- parameter: T10NH
|
120
|
+
category: TEMP
|
121
|
+
description: Six Hourly Division at Which Minimum Temperature at 10 Cm Above Surface Was Measured
|
122
|
+
validate: (6..24).step(6)
|
123
|
+
conversion:
|
124
|
+
units:
|
125
|
+
period: daily
|
126
|
+
- parameter: SQ
|
127
|
+
category: RADT
|
128
|
+
description: Sunshine Duration
|
129
|
+
validate: (-1..6).include?(n)
|
130
|
+
conversion: "n == -1 ? 0.05 : (n / 10) * 60"
|
131
|
+
units: minutes
|
132
|
+
period: daily
|
133
|
+
- parameter: SP
|
134
|
+
category: RADT
|
135
|
+
description: Percent of Maximum Sunshine Duration
|
136
|
+
validate: (0..100).include?(n)
|
137
|
+
conversion:
|
138
|
+
units: %
|
139
|
+
period: daily
|
140
|
+
- parameter: Q
|
141
|
+
category: RADT
|
142
|
+
description: Global Radiation
|
143
|
+
validate: n.integer?
|
144
|
+
conversion:
|
145
|
+
units: J/cm^2
|
146
|
+
period: daily
|
147
|
+
- parameter: DR
|
148
|
+
category: PRCP
|
149
|
+
description: Precipitation Duration
|
150
|
+
validate: (0..6).include?(n)
|
151
|
+
conversion: (n / 10) * 60
|
152
|
+
units: minutes
|
153
|
+
period: daily
|
154
|
+
- parameter: RH
|
155
|
+
category: PRCP
|
156
|
+
description: Daily Precipitation
|
157
|
+
validate: n.integer?
|
158
|
+
conversion: n / 10
|
159
|
+
units: mm
|
160
|
+
period: daily
|
161
|
+
- parameter: RHX
|
162
|
+
category: PRCP
|
163
|
+
description: Maximum Hourly Precipitation
|
164
|
+
validate: n.integer?
|
165
|
+
conversion: "n == -1 ? 0.05 : n / 10"
|
166
|
+
units: mm
|
167
|
+
period: daily
|
168
|
+
- parameter: RHXH
|
169
|
+
category: PRCP
|
170
|
+
description: Hourly Division in Which Maximum Hourly Precipitation Was Measured
|
171
|
+
validate: (1..24).include?(n)
|
172
|
+
conversion:
|
173
|
+
units: Hour
|
174
|
+
period: daily
|
175
|
+
- parameter: EV24
|
176
|
+
category: ATMS
|
177
|
+
description: Potential Evapotranspiration
|
178
|
+
validate: n.integer?
|
179
|
+
conversion: n / 10
|
180
|
+
units: mm
|
181
|
+
period: daily
|
182
|
+
- parameter: PG
|
183
|
+
category: ATMS
|
184
|
+
description: Daily Mean Sea Level Pressure
|
185
|
+
validate: n.integer?
|
186
|
+
conversion: n / 10
|
187
|
+
units: hPa
|
188
|
+
period: daily
|
189
|
+
- parameter: PX
|
190
|
+
category: ATMS
|
191
|
+
description: Maximum Hourly Sea Level Pressure
|
192
|
+
validate: n.integer?
|
193
|
+
conversion: n / 10
|
194
|
+
units: hPa
|
195
|
+
period: daily
|
196
|
+
- parameter: PXH
|
197
|
+
category: ATMS
|
198
|
+
description: Hourly Division on Which Maximum Hourly Sea Level Pressure Was Measured
|
199
|
+
validate: (1..24).include?(n)
|
200
|
+
conversion:
|
201
|
+
units: Hour
|
202
|
+
period: daily
|
203
|
+
- parameter: PN
|
204
|
+
category: ATMS
|
205
|
+
description: Minimum Hourly Sea Level Pressure
|
206
|
+
validate: n.integer?
|
207
|
+
conversion: n / 10
|
208
|
+
units: hPa
|
209
|
+
period: daily
|
210
|
+
- parameter: PNH
|
211
|
+
category: ATMS
|
212
|
+
description: Hourly Division in Which Minimum Hourly Sea Level Pressure Was Measured
|
213
|
+
validate: (1..24).include?(n)
|
214
|
+
conversion:
|
215
|
+
units: Hour
|
216
|
+
period: daily
|
217
|
+
- parameter: VVN
|
218
|
+
category: VISB
|
219
|
+
description: Minimum Visibility
|
220
|
+
validate: (0..89).include(n)
|
221
|
+
conversion: |-
|
222
|
+
if n == 0
|
223
|
+
'< 100 meters'
|
224
|
+
elsif (1..49).include?(n)
|
225
|
+
(n * 100).to_s + '-' + ((n+1) * 100).to_s + ' meters'
|
226
|
+
elsif n == 50
|
227
|
+
'5-6 kilometers'
|
228
|
+
elsif (56..79).include?(n)
|
229
|
+
(n - 50).to_s + '-' + (n - 49).to_s + ' kilometers'
|
230
|
+
elsif (80..88).include?(n)
|
231
|
+
(n - 50).to_s + '-' + (n - 45).to_s + ' kilometers'
|
232
|
+
elsif n == 89
|
233
|
+
'> 70 kilometers'
|
234
|
+
end
|
235
|
+
units:
|
236
|
+
period: daily
|
237
|
+
- parameter: VVNH
|
238
|
+
category: VISB
|
239
|
+
description: Hourly Division in Which Minimum Visibility Was Measured
|
240
|
+
validate: (1..24).include?(n)
|
241
|
+
conversion:
|
242
|
+
units: Hour
|
243
|
+
period: daily
|
244
|
+
- parameter: VVX
|
245
|
+
category: VISB
|
246
|
+
description: Maximum Visibility
|
247
|
+
validate: (0..89).include(n)
|
248
|
+
conversion: |-
|
249
|
+
if n == 0
|
250
|
+
'< 100 meters'
|
251
|
+
elsif (1..49).include?(n)
|
252
|
+
(n * 100).to_s + '-' + ((n+1) * 100).to_s + ' meters'
|
253
|
+
elsif n == 50
|
254
|
+
'5-6 kilometers'
|
255
|
+
elsif (56..79).include?(n)
|
256
|
+
(n - 50).to_s + '-' + (n - 49).to_s + ' kilometers'
|
257
|
+
elsif (80..88).include?(n)
|
258
|
+
(n - 50).to_s + '-' + (n - 45).to_s + ' kilometers'
|
259
|
+
elsif n == 89
|
260
|
+
'> 70 kilometers'
|
261
|
+
end
|
262
|
+
units:
|
263
|
+
period: daily
|
264
|
+
- parameter: VVXH
|
265
|
+
category: VISB
|
266
|
+
description: Hourly Division in Which Maximum Visibility Was Measured
|
267
|
+
validate: (1..24).include?(n)
|
268
|
+
conversion:
|
269
|
+
units: Hour
|
270
|
+
period: daily
|
271
|
+
- parameter: NG
|
272
|
+
category: VISB
|
273
|
+
description: Mean Daily Cloud Cover
|
274
|
+
validate: (0..9).include?(n)
|
275
|
+
conversion:
|
276
|
+
units:
|
277
|
+
period: daily
|
278
|
+
- parameter: UG
|
279
|
+
category: ATMS
|
280
|
+
description: Daily Mean Relative Humidity
|
281
|
+
validate: (0..100).include?(n)
|
282
|
+
conversion:
|
283
|
+
units: %
|
284
|
+
period: daily
|
285
|
+
- parameter: UX
|
286
|
+
category: ATMS
|
287
|
+
description: Maximum Relative Humidity
|
288
|
+
validate: (0..100).include?(n)
|
289
|
+
conversion:
|
290
|
+
units: %
|
291
|
+
period: daily
|
292
|
+
- parameter: UXH
|
293
|
+
category: ATMS
|
294
|
+
description: Hourly Division in Which Maximum Relative Humidty Was Measured
|
295
|
+
validate: (1..24).include?(n)
|
296
|
+
conversion:
|
297
|
+
units: Hour
|
298
|
+
period: daily
|
299
|
+
- parameter: UN
|
300
|
+
category: ATMS
|
301
|
+
description: Minimum Relative Humidity
|
302
|
+
validate: (0..100).include?(n)
|
303
|
+
conversion:
|
304
|
+
units: %
|
305
|
+
period: daily
|
306
|
+
- parameter: UNH
|
307
|
+
category: ATMS
|
308
|
+
description: Hourly Division in Which Minimum Relative Humidity Was Measured
|
309
|
+
validate: (1..24).include?(n)
|
310
|
+
conversion:
|
311
|
+
units: Hour
|
312
|
+
period: daily
|
313
|
+
- parameter: YYYYMMDD
|
314
|
+
category:
|
315
|
+
description: Time Stamp
|
316
|
+
validate:
|
317
|
+
conversion: |-
|
318
|
+
Time.utc(
|
319
|
+
year = n.to_s[(0..3)],
|
320
|
+
month = n.to_s[(4..5)],
|
321
|
+
day = n.to_s[(6..7)]
|
322
|
+
)
|
323
|
+
units: Time
|
324
|
+
period: hourly
|
325
|
+
- parameter: HH
|
326
|
+
category:
|
327
|
+
description: Hour
|
328
|
+
validate: (1..24).include?(n)
|
329
|
+
conversion:
|
330
|
+
units: hour
|
331
|
+
period: hourly
|
332
|
+
- parameter: DD
|
333
|
+
category: WIND
|
334
|
+
description: Mean Wind Direction During the 10-Minute Period Preceding the Time of Observation
|
335
|
+
validate: (0..360).to_a.push(990).include?(n)
|
336
|
+
conversion:
|
337
|
+
units: Polar Coordinates (360=north, 90=east, 180=south, 270=west,0=calm, 990=variable)
|
338
|
+
period: hourly
|
339
|
+
- parameter: FH
|
340
|
+
category: WIND
|
341
|
+
description: Hourly Mean Wind Speed
|
342
|
+
validate: n.integer?
|
343
|
+
conversion: n / 10
|
344
|
+
units: m/s
|
345
|
+
period: hourly
|
346
|
+
- parameter: FF
|
347
|
+
category: WIND
|
348
|
+
description: Mean Wind Speed
|
349
|
+
validate: n.integer?
|
350
|
+
conversion: n / 10
|
351
|
+
units: m/s
|
352
|
+
period: hourly
|
353
|
+
- parameter: FX
|
354
|
+
category: WIND
|
355
|
+
description: Maximum Wind Gust
|
356
|
+
validate: n.integer?
|
357
|
+
conversion: n / 10
|
358
|
+
units: m/s
|
359
|
+
period: hourly
|
360
|
+
- parameter: T
|
361
|
+
category: TEMP
|
362
|
+
description: Air Temperature at 1.5 m
|
363
|
+
validate: n.integer?
|
364
|
+
conversion: n / 10
|
365
|
+
units: C
|
366
|
+
period: hourly
|
367
|
+
- parameter: T10N
|
368
|
+
category: TEMP
|
369
|
+
description: Minimum Air Temperature at 10 cm in the Preceding 6 Hours
|
370
|
+
validate: n.integer?
|
371
|
+
conversion: n / 10
|
372
|
+
units: C
|
373
|
+
period: hourly
|
374
|
+
- parameter: TD
|
375
|
+
category: TEMP
|
376
|
+
description: Dew Point Temperature
|
377
|
+
validate: n.integer?
|
378
|
+
conversion: n / 10
|
379
|
+
units: C
|
380
|
+
period: hourly
|
381
|
+
- parameter: SQ
|
382
|
+
category: RDTN
|
383
|
+
description: Sunshine Duration
|
384
|
+
validate: (-1..240).include?(n)
|
385
|
+
conversion: "n == -1 ? 0.05 : (n / 10) * 60"
|
386
|
+
units: minutes
|
387
|
+
period: hourly
|
388
|
+
- parameter: Q
|
389
|
+
category: RDTN
|
390
|
+
description: Golbal Radiation
|
391
|
+
validate: n.integer?
|
392
|
+
conversion:
|
393
|
+
units: J/cm^2
|
394
|
+
period: hourly
|
395
|
+
- parameter: DR
|
396
|
+
category: PRCP
|
397
|
+
description: Precipitation Duration
|
398
|
+
validate: (0..240).include?(n)
|
399
|
+
conversion: (n / 10) * 60
|
400
|
+
units: minutes
|
401
|
+
period: hourly
|
402
|
+
- parameter: RH
|
403
|
+
category: PRCP
|
404
|
+
description: Precipitation
|
405
|
+
validate: n.integer?
|
406
|
+
conversion: n / 10
|
407
|
+
units: mm
|
408
|
+
period: hourly
|
409
|
+
- parameter: P
|
410
|
+
category: ATMS
|
411
|
+
description: Air Pressure
|
412
|
+
validate: n.integer?
|
413
|
+
conversion: n / 10
|
414
|
+
units: hPa
|
415
|
+
period: hourly
|
416
|
+
- parameter: VV
|
417
|
+
category: VISB
|
418
|
+
description: Visibility
|
419
|
+
validate:
|
420
|
+
conversion: |-
|
421
|
+
if n == 0
|
422
|
+
'< 100 meters'
|
423
|
+
elsif (1..49).include?(n)
|
424
|
+
(n * 100).to_s + '-' + ((n+1) * 100).to_s + ' meters'
|
425
|
+
elsif n == 50
|
426
|
+
'5-6 kilometers'
|
427
|
+
elsif (56..79).include?(n)
|
428
|
+
(n - 50).to_s + '-' + (n - 49).to_s + ' kilometers'
|
429
|
+
elsif (80..88).include?(n)
|
430
|
+
(n - 50).to_s + '-' + (n - 45).to_s + ' kilometers'
|
431
|
+
elsif n == 89
|
432
|
+
'> 70 kilometers'
|
433
|
+
end
|
434
|
+
units:
|
435
|
+
period: hourly
|
436
|
+
- parameter: N
|
437
|
+
category: VISB
|
438
|
+
description: Cloud Cover
|
439
|
+
validate: (0..9).include?(n)
|
440
|
+
conversion:
|
441
|
+
units:
|
442
|
+
period: hourly
|
443
|
+
- parameter: U
|
444
|
+
category: ATMS
|
445
|
+
description: Relative Humidity
|
446
|
+
validate: (0..100).include?(n)
|
447
|
+
conversion:
|
448
|
+
units: %
|
449
|
+
period: hourly
|
450
|
+
- parameter: M
|
451
|
+
category: WTHR
|
452
|
+
description: Fog
|
453
|
+
validate: (0..1).include?(n)
|
454
|
+
conversion:
|
455
|
+
units: boolean
|
456
|
+
period: hourly
|
457
|
+
- parameter: R
|
458
|
+
category: WTHR
|
459
|
+
description: Rainfall
|
460
|
+
validate: (0..1).include?(n)
|
461
|
+
conversion:
|
462
|
+
units: boolean
|
463
|
+
period: hourly
|
464
|
+
- parameter: S
|
465
|
+
category: WTHR
|
466
|
+
description: Snow
|
467
|
+
validate: (0..1).include?(n)
|
468
|
+
conversion:
|
469
|
+
units: boolean
|
470
|
+
period: hourly
|
471
|
+
- parameter: O
|
472
|
+
category: WTHR
|
473
|
+
description: Thunder
|
474
|
+
validate: (0..1).include?(n)
|
475
|
+
conversion:
|
476
|
+
units: boolean
|
477
|
+
period: hourly
|
478
|
+
- parameter: Y
|
479
|
+
category: WTHR
|
480
|
+
description: Ice
|
481
|
+
validate: (0..1).include?(n)
|
482
|
+
conversion:
|
483
|
+
units: boolean
|
484
|
+
period: hourly
|
485
|
+
- parameter: WW
|
486
|
+
category: WTHR
|
487
|
+
description: Weather Code
|
488
|
+
validate: (0..99).include?(n)
|
489
|
+
conversion:
|
490
|
+
units: code
|
491
|
+
period: hourly
|