Skip to content

Commit 7838a8a

Browse files
authored
Merge pull request #6 from open-data-rescue/main
ISO and outliers
2 parents 84434a3 + cc26c51 commit 7838a8a

File tree

128 files changed

+6425
-471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+6425
-471
lines changed

DRAW-post-processing/config.py

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,60 @@
55

66
# assigning post-process ID's to field ID's
77
# assign a TUPLE to multiple field_id's with one PPID; otherwise assign integer for single field_id
8+
# 1: pressure(in_hg), 2: vapour pressure(in_Hg), 3:temperature (F), 4: precipitation (in), 5: direction, 6: velocity (miles), 7: weather, 8: cloud type, 9:time, 10: RH (%), 11: cloud cover (tenths), 12 :various (character)
89
ppid_to_field_id = {1: (4, 6, 7, 8, 67, 69),
910
2: 14,
10-
3: (5,9,10,11,12,13,36,37,38,39,63,64,68,76,77,78,79),
11-
4: (25, 26, 27, 28, 29, 30, 31, 50, 70, 71),
12-
5: (16, 17, 22, 23, 24, 53, 54),
13-
6: (19, 20, 21, 34, 35, 48, 61, 85),
14-
7: (18, 40, 41, 44, 51, 52, 56, 57, 66, 80, 82, 83)}
15-
16-
sef_type_to_field_id ={ "atb": (5,68),
17-
"au": (47),
18-
"cl":(22,53),
19-
"cd":(23),
20-
"ch":(16,54),
21-
"dd":(19),
22-
"e":(14),
23-
"hd":(17),
24-
"mslp":(7),
25-
"nl":(24),
26-
"p": (4,67),
27-
"p_cor":(7,69),
28-
"pr":(27,31),
29-
"ptb":(25,28),
30-
"pte":(26,29),
31-
"rh":(15,58,59,73,75,60,72),
32-
"rrt":(66),
33-
"sd":(50),
34-
"rain_dur":(70),
35-
"snow_dur":(71),
36-
"ss":(65),
37-
"ta":9,
38-
"ta_cor":(10),
39-
"tb":(11),
40-
"tb_cor":(12),
41-
"td":(33),
42-
"TGn":(62,81),
43-
"Tn":(38,76),
44-
"Tn_cor":(37,77),
45-
"Tx":(36,78),
46-
"Tx_cor":(37,79),
47-
"Tsx":(63,64),
48-
"wf":(85),
49-
"w":(34,48,35),
50-
"ws":(20),
51-
"ww":(18,52,40,44,57,56,80,83),
52-
"w2":(51,41,82)
53-
}
54-
sef_type_to_unit={ "atb": "C",
11+
3: (5, 9, 10, 11, 12, 13, 33, 36, 37, 38, 39, 62, 63, 64, 68, 76, 77, 78, 79, 81),
12+
4: (27, 30, 31, 50),
13+
5: (17, 19, 23),
14+
6: (20),
15+
7: (18, 40, 41, 44, 51, 52, 56, 57, 66, 80, 82, 83),
16+
8: (16, 22, 53, 54),
17+
9: (25, 26, 28, 29, 46, 65, 70, 71),
18+
10: (15, 58, 59, 60, 72, 74, 75),
19+
11: (24),
20+
12: (21, 61, 42, 47, 66),
21+
13: (34, 35, 48)}
22+
23+
sef_type_to_field_id = {"atb": (5, 68),
24+
"au": (47),
25+
"cl": (22, 53),
26+
"cd": (23),
27+
"ch": (16, 54),
28+
"dd": (19),
29+
"e": (14),
30+
"hd": (17),
31+
"mslp": (7),
32+
"nl": (24),
33+
"p": (4, 67),
34+
"p_cor": (7, 69),
35+
"pr": (27, 31),
36+
"ptb": (25, 28),
37+
"pte": (26, 29),
38+
"rh": (15, 58, 59, 73, 75, 60, 72),
39+
"rrt": (66),
40+
"sd": (50),
41+
"rain_dur": (70),
42+
"snow_dur": (71),
43+
"ss": (65),
44+
"ta": (9),
45+
"ta_cor": (10),
46+
"tb": (11),
47+
"tb_cor": (12),
48+
"td": (33),
49+
"TGn": (62, 81),
50+
"Tn": (38, 76),
51+
"Tn_cor": (37, 77),
52+
"Tx": (36, 78),
53+
"Tx_cor": (37, 79),
54+
"Tsx": (63, 64),
55+
"wf": (85),
56+
"w": (34, 48, 35),
57+
"ws": (20),
58+
"ww": (18, 52, 40, 44, 57, 56, 80, 83),
59+
"w2": (51, 41, 82)
60+
}
61+
sef_type_to_unit={"atb": "C",
5562
"au": "text",
5663
"cl":"lct",
5764
"cd":"dir",
@@ -166,23 +173,26 @@ def possible_pressure_formats(value, for_leading_digits):
166173

167174
temperature_min = -100.0
168175
temperature_max= {
169-
"5": 100,
176+
"5": 100,
170177
"9": 120,
171178
"10": 120,
172-
"11": 110,
179+
"11": 110,
173180
"12": 110,
174181
"13": 110,
182+
"33": 130,
175183
"36": 130,
176184
"37": 130,
177185
"38": 100,
178186
"39": 100,
187+
"62": 130,
179188
"63": 160,
180189
"64": 160,
181190
"68": 100,
182191
"76": 100,
183192
"77": 100,
184193
"78": 130,
185-
"79": 130
194+
"79": 130,
195+
"81": 130
186196
}
187197

188198

@@ -203,7 +213,7 @@ def possible_pressure_formats(value, for_leading_digits):
203213
temperature_air_wet_bulb=[[9,11,13],[10,12,13]] #same observation time: abs(abs(field[0]-field[1])-abs(field[2]))<air_wet_bulb_threshold
204214

205215
# temperature fields to detect stat outliers
206-
temperature_stat_outliers=[9,10]
216+
temperature_stat_outliers=[9,10]
207217

208218
#define whether to display or not graphs for outliers
209219
temperature_plot_outliers=False

0 commit comments

Comments
 (0)