-
Notifications
You must be signed in to change notification settings - Fork 0
/
contribute.html
495 lines (476 loc) · 150 KB
/
contribute.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Contribute | Meteostat Developers</title>
<meta name="generator" content="VuePress 1.8.2">
<script>
var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.meteostat.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<meta name="description" content="Documentation for the Meteostat developers platform.">
<meta name="theme-color" content="#0678BE">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta rel="icon" type="image/png" sizes="16x16" href="https://media.meteostat.net/favicon-16x16.png">
<meta rel="icon" type="image/png" sizes="32x32" href="https://media.meteostat.net/favicon-32x32.png">
<meta rel="icon" href="https://meteostat.net/files/icon.svg">
<link rel="preload" href="/assets/css/0.styles.7b8a7a58.css" as="style"><link rel="preload" href="/assets/js/app.dd59b935.js" as="script"><link rel="preload" href="/assets/js/2.eb28a00d.js" as="script"><link rel="preload" href="/assets/js/27.b96c3f38.js" as="script"><link rel="prefetch" href="/assets/js/10.df580b38.js"><link rel="prefetch" href="/assets/js/11.9fd53def.js"><link rel="prefetch" href="/assets/js/12.988801f7.js"><link rel="prefetch" href="/assets/js/13.21c98796.js"><link rel="prefetch" href="/assets/js/14.bc6f0532.js"><link rel="prefetch" href="/assets/js/15.79761931.js"><link rel="prefetch" href="/assets/js/16.5b1a00da.js"><link rel="prefetch" href="/assets/js/17.6d87b1e3.js"><link rel="prefetch" href="/assets/js/18.8cafc2ec.js"><link rel="prefetch" href="/assets/js/19.d711ebe1.js"><link rel="prefetch" href="/assets/js/20.d67da873.js"><link rel="prefetch" href="/assets/js/21.b75e3ce0.js"><link rel="prefetch" href="/assets/js/22.7775e2a0.js"><link rel="prefetch" href="/assets/js/23.e77dc583.js"><link rel="prefetch" href="/assets/js/24.332e254f.js"><link rel="prefetch" href="/assets/js/25.7d4d8a82.js"><link rel="prefetch" href="/assets/js/26.cc477b87.js"><link rel="prefetch" href="/assets/js/28.2ec54724.js"><link rel="prefetch" href="/assets/js/29.fb61093b.js"><link rel="prefetch" href="/assets/js/3.6aaf3b6f.js"><link rel="prefetch" href="/assets/js/30.7c601ac5.js"><link rel="prefetch" href="/assets/js/31.1eb6f4bf.js"><link rel="prefetch" href="/assets/js/32.9d531bb6.js"><link rel="prefetch" href="/assets/js/33.ad37fd80.js"><link rel="prefetch" href="/assets/js/34.e7c7d9e5.js"><link rel="prefetch" href="/assets/js/35.25f7cf32.js"><link rel="prefetch" href="/assets/js/36.e4bbd771.js"><link rel="prefetch" href="/assets/js/37.85349450.js"><link rel="prefetch" href="/assets/js/38.34a54d9b.js"><link rel="prefetch" href="/assets/js/39.c8a709c3.js"><link rel="prefetch" href="/assets/js/4.fd182072.js"><link rel="prefetch" href="/assets/js/40.810821a8.js"><link rel="prefetch" href="/assets/js/41.4923b860.js"><link rel="prefetch" href="/assets/js/42.15c6c159.js"><link rel="prefetch" href="/assets/js/43.13064725.js"><link rel="prefetch" href="/assets/js/44.fce51c75.js"><link rel="prefetch" href="/assets/js/45.fa14265e.js"><link rel="prefetch" href="/assets/js/46.cef5ebc7.js"><link rel="prefetch" href="/assets/js/47.fc0d05ad.js"><link rel="prefetch" href="/assets/js/48.950b328c.js"><link rel="prefetch" href="/assets/js/49.7741582b.js"><link rel="prefetch" href="/assets/js/5.f1f4795d.js"><link rel="prefetch" href="/assets/js/50.5ede910d.js"><link rel="prefetch" href="/assets/js/51.45325993.js"><link rel="prefetch" href="/assets/js/52.5154640f.js"><link rel="prefetch" href="/assets/js/53.60c15847.js"><link rel="prefetch" href="/assets/js/54.5d008cb8.js"><link rel="prefetch" href="/assets/js/55.cfaf47f5.js"><link rel="prefetch" href="/assets/js/56.fd322eba.js"><link rel="prefetch" href="/assets/js/57.36d7340f.js"><link rel="prefetch" href="/assets/js/58.5d99052d.js"><link rel="prefetch" href="/assets/js/59.89ab2471.js"><link rel="prefetch" href="/assets/js/6.09933dd9.js"><link rel="prefetch" href="/assets/js/60.1951a0eb.js"><link rel="prefetch" href="/assets/js/61.37da9ef9.js"><link rel="prefetch" href="/assets/js/62.c1b95e02.js"><link rel="prefetch" href="/assets/js/63.423ebc57.js"><link rel="prefetch" href="/assets/js/64.558853a8.js"><link rel="prefetch" href="/assets/js/65.69f6a94f.js"><link rel="prefetch" href="/assets/js/66.4097fe9b.js"><link rel="prefetch" href="/assets/js/67.9a5ccfd2.js"><link rel="prefetch" href="/assets/js/68.18db120f.js"><link rel="prefetch" href="/assets/js/69.28e7b3ec.js"><link rel="prefetch" href="/assets/js/7.4633576d.js"><link rel="prefetch" href="/assets/js/70.7494f1aa.js"><link rel="prefetch" href="/assets/js/8.2ea3c8d7.js"><link rel="prefetch" href="/assets/js/9.b1298550.js">
<link rel="stylesheet" href="/assets/css/0.styles.7b8a7a58.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="https://media.meteostat.net/icon.svg" alt="Meteostat Developers" class="logo"> <span class="site-name can-hide">Meteostat Developers</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Guide" class="dropdown-title"><span class="title">Guide</span> <span class="arrow down"></span></button> <button type="button" aria-label="Guide" class="mobile-dropdown-title"><span class="title">Guide</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/guide.html" class="nav-link">
Overview
</a></li><li class="dropdown-item"><!----> <a href="/formats.html" class="nav-link">
Formats & Units
</a></li><li class="dropdown-item"><!----> <a href="/terms.html" class="nav-link">
Terms & License
</a></li><li class="dropdown-item"><!----> <a href="/quality.html" class="nav-link">
Data Quality
</a></li><li class="dropdown-item"><!----> <a href="/sources.html" class="nav-link">
Data Sources
</a></li><li class="dropdown-item"><!----> <a href="/contribute.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
Contribute
</a></li><li class="dropdown-item"><!----> <a href="/donate.html" class="nav-link">
Donate
</a></li><li class="dropdown-item"><!----> <a href="/faq.html" class="nav-link">
FAQ
</a></li></ul></div></div><div class="nav-item"><a href="/api/" class="nav-link">
JSON API
</a></div><div class="nav-item"><a href="/python/" class="nav-link">
Python
</a></div><div class="nav-item"><a href="/bulk/" class="nav-link">
Bulk Data
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Project" class="dropdown-title"><span class="title">Project</span> <span class="arrow down"></span></button> <button type="button" aria-label="Project" class="mobile-dropdown-title"><span class="title">Project</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
Meteostat
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://meteostat.net/en" target="_blank" rel="noopener noreferrer" class="nav-link external">
Webapp
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://twitter.com/meteost" target="_blank" rel="noopener noreferrer" class="nav-link external">
Twitter
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://medium.com/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
Blog
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://www.linkedin.com/company/meteostat/" target="_blank" rel="noopener noreferrer" class="nav-link external">
LinkedIn
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://www.paypal.me/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
Donation
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></li><li class="dropdown-item"><h4>
Legal
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/terms.html" class="nav-link">
Terms & License
</a></li><li class="dropdown-subitem"><a href="https://meteostat.net/en/legal" target="_blank" rel="noopener noreferrer" class="nav-link external">
Legal Disclosure
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://meteostat.net/en/privacy" target="_blank" rel="noopener noreferrer" class="nav-link external">
Privacy
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://github.com/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Guide" class="dropdown-title"><span class="title">Guide</span> <span class="arrow down"></span></button> <button type="button" aria-label="Guide" class="mobile-dropdown-title"><span class="title">Guide</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/guide.html" class="nav-link">
Overview
</a></li><li class="dropdown-item"><!----> <a href="/formats.html" class="nav-link">
Formats & Units
</a></li><li class="dropdown-item"><!----> <a href="/terms.html" class="nav-link">
Terms & License
</a></li><li class="dropdown-item"><!----> <a href="/quality.html" class="nav-link">
Data Quality
</a></li><li class="dropdown-item"><!----> <a href="/sources.html" class="nav-link">
Data Sources
</a></li><li class="dropdown-item"><!----> <a href="/contribute.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
Contribute
</a></li><li class="dropdown-item"><!----> <a href="/donate.html" class="nav-link">
Donate
</a></li><li class="dropdown-item"><!----> <a href="/faq.html" class="nav-link">
FAQ
</a></li></ul></div></div><div class="nav-item"><a href="/api/" class="nav-link">
JSON API
</a></div><div class="nav-item"><a href="/python/" class="nav-link">
Python
</a></div><div class="nav-item"><a href="/bulk/" class="nav-link">
Bulk Data
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Project" class="dropdown-title"><span class="title">Project</span> <span class="arrow down"></span></button> <button type="button" aria-label="Project" class="mobile-dropdown-title"><span class="title">Project</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
Meteostat
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://meteostat.net/en" target="_blank" rel="noopener noreferrer" class="nav-link external">
Webapp
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://twitter.com/meteost" target="_blank" rel="noopener noreferrer" class="nav-link external">
Twitter
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://medium.com/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
Blog
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://www.linkedin.com/company/meteostat/" target="_blank" rel="noopener noreferrer" class="nav-link external">
LinkedIn
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://www.paypal.me/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
Donation
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></li><li class="dropdown-item"><h4>
Legal
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/terms.html" class="nav-link">
Terms & License
</a></li><li class="dropdown-subitem"><a href="https://meteostat.net/en/legal" target="_blank" rel="noopener noreferrer" class="nav-link external">
Legal Disclosure
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li class="dropdown-subitem"><a href="https://meteostat.net/en/privacy" target="_blank" rel="noopener noreferrer" class="nav-link external">
Privacy
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://github.com/meteostat" target="_blank" rel="noopener noreferrer" class="nav-link external">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav> <div class="carbon-ads"></div> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Essentials</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide.html" class="sidebar-link">Introduction</a></li><li><a href="/formats.html" class="sidebar-link">Formats & Units</a></li><li><a href="/terms.html" class="sidebar-link">Terms & License</a></li><li><a href="/quality.html" class="sidebar-link">Data Quality</a></li><li><a href="/sources.html" class="sidebar-link">Data Sources</a></li><li><a href="/contribute.html" aria-current="page" class="active sidebar-link">Contribute</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/contribute.html#weather-stations" class="sidebar-link">Weather Stations</a></li><li class="sidebar-sub-header"><a href="/contribute.html#data-routines" class="sidebar-link">Data Routines</a></li><li class="sidebar-sub-header"><a href="/contribute.html#python-library" class="sidebar-link">Python Library</a></li><li class="sidebar-sub-header"><a href="/contribute.html#documentation" class="sidebar-link">Documentation</a></li></ul></li><li><a href="/donate.html" class="sidebar-link">Donate</a></li><li><a href="/faq.html" class="sidebar-link">FAQ</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>Interfaces</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/api/" class="sidebar-link">JSON API</a></li><li><a href="/python/" class="sidebar-link">Python Library</a></li><li><a href="/bulk/" class="sidebar-link">Bulk Data</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>Connect</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="https://twitter.com/meteost" target="_blank" rel="noopener noreferrer" class="sidebar-link">Twitter<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li><a href="https://www.linkedin.com/company/meteostat/" target="_blank" rel="noopener noreferrer" class="sidebar-link">LinkedIn<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li><li><a href="https://medium.com/meteostat" target="_blank" rel="noopener noreferrer" class="sidebar-link">Blog<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="contribute"><a href="#contribute" class="header-anchor">#</a> Contribute</h1> <p>Meteostat is an open initiative which does not operate on a primarily commercial basis. We believe that weather and climate data should be freely available to everyone. Therefore, Meteostat operates multiple interfaces which provide free access to meteorological data. Operating, maintaining and growing the project is only possible with the help of people like you.</p> <p>This section contains information about how to contribute to Meteostat. It also defines general principles and concepts which serve as a foundation for the project and its architecture.</p> <p>If you want to support Meteostat on its mission of making weather and climate data available to everyone, you have multiple options to choose from:</p> <ul><li>Contribute to our open source repositories on <a href="https://github.com/meteostat" target="_blank" rel="noopener noreferrer">GitHub<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></li> <li>Spread the news about Meteostat on social media or your website</li> <li>Make a <a href="/contributing.html#donations">donation</a></li></ul> <p>Meteostat's goal is to publish the majority of its coding under the MIT license on <a href="https://github.com/meteostat" target="_blank" rel="noopener noreferrer">GitHub<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. Feel free to open an issue if you run into a bug or create a pull request for new features and fixes.</p> <h2 id="weather-stations"><a href="#weather-stations" class="header-anchor">#</a> Weather Stations</h2> <p>Meteostat provides an open directory of weather stations everyone can edit, share and build upon. The list of weather stations is available on <a href="https://github.com/meteostat/weather-stations" target="_blank" rel="noopener noreferrer">GitHub<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <p>If you want to add a missing station, please create a new file in the <code>stations</code> folder according to the template described <a href="https://github.com/meteostat/weather-stations#properties" target="_blank" rel="noopener noreferrer">here<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. If possible, please to also add the weather station to the CSV files in <a href="https://github.com/meteostat/routines/tree/master/resources" target="_blank" rel="noopener noreferrer">this directory<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. Adding the corresponding identifier to the CSV files will make sure all available data is collected properly.</p> <h3 id="joining-stations"><a href="#joining-stations" class="header-anchor">#</a> Joining Stations</h3> <p>It can happen that the same weather station appears twice under different IDs. In this case, all duplicates should be unified in a single JSON file under a common identifier.</p> <ol><li>Pick one of the existing JSON files.</li> <li>Add all identifiers and details available for this weather station. In case of inconsistencies, do some research or open an issue.</li> <li>Delete all duplicates.</li> <li>Create a pull request.</li></ol> <p>The following steps require access to the Meteostat database and can only be executed by admins:</p> <details class="custom-block details"><summary>Show steps for admins</summary> <ol start="5"><li>Merge the PR into <code>master</code>.</li> <li>Run the station import on Banff.</li> <li>Delete corresponding entries in the <code>stations_inventory</code> table</li> <li>Clean the Bulk server by running the following Shell command inside the <code>bulk</code> directory:</li></ol> <div class="language-sh extra-class"><pre class="language-sh"><code><span class="token function">find</span> <span class="token builtin class-name">.</span> -name <span class="token string">'<span class="token variable">$duplicate</span>.csv.gz'</span> -delete
</code></pre></div><p>You'll have to replace <code>$duplicate</code> with the ID of a/the duplicate weather station. Repeat this for all duplicates.</p> <ol start="10"><li>Run the following SQL script for all duplicates:</li></ol> <p>Replace <code>$target</code> with the unique ID of the unified weather station and <code>$origin</code> with the ID of the duplicate. Please note that the table prefixes are required to avoid ambiguity in MariaDB. It might take a few minutes for the script to complete.</p> <p>This will be moved to our data management repository in the future.</p> <div class="language-sql extra-class"><pre class="language-sql"><code><span class="token comment">-- daily_ghcn</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">date</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">date</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span>tavg<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmin<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmax<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>snow<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>daily_ghcn<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- daily_national</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">date</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">date</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span>tavg<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmin<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmax<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>snow<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>daily_national<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- hourly_isd</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>hourly_isd<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- hourly_metar</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>coco<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>hourly_metar<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- hourly_model</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>coco<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>hourly_model<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- hourly_national</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>hourly_national<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- hourly_synop</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">time</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">temp</span><span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wspd<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wspd<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wpgt<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>wdir<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>wdir<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>rhum<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>rhum<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>snow<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>snow<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>coco<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>coco<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>hourly_synop<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- monthly_global</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">year</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">month</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">year</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">month</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span>tavg<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmin<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmax<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>monthly_global<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
<span class="token comment">-- normals_global</span>
<span class="token keyword">INSERT</span> <span class="token keyword">INTO</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span> <span class="token punctuation">(</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>station<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">start</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">end</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">month</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span>
<span class="token punctuation">)</span>
<span class="token keyword">SELECT</span>
<span class="token string">'$target'</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">start</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">end</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span><span class="token keyword">month</span><span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>d<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span>
<span class="token keyword">FROM</span>
<span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span> <span class="token keyword">AS</span> <span class="token punctuation">`</span>d<span class="token punctuation">`</span>
<span class="token keyword">WHERE</span>
<span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span>
<span class="token keyword">ON</span> <span class="token keyword">DUPLICATE</span> <span class="token keyword">KEY</span> <span class="token keyword">UPDATE</span>
<span class="token punctuation">`</span>tavg<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tavg<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmin<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmin<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tmax<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tmax<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>prcp<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>prcp<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>tsun<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>tsun<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
<span class="token punctuation">`</span>pres<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token keyword">COALESCE</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">,</span> <span class="token keyword">VALUES</span><span class="token punctuation">(</span><span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span><span class="token punctuation">.</span><span class="token punctuation">`</span>pres<span class="token punctuation">`</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">DELETE</span> <span class="token keyword">FROM</span> <span class="token punctuation">`</span>normals_global<span class="token punctuation">`</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span>station<span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'$origin'</span><span class="token punctuation">;</span>
</code></pre></div></details> <h2 id="data-routines"><a href="#data-routines" class="header-anchor">#</a> Data Routines</h2> <p>All automated routines, for both import & export of data, are available <a href="https://github.com/meteostat/routines" target="_blank" rel="noopener noreferrer">here<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>. By adding new data sources, you can help Meteostat improve its data coverage.</p> <h2 id="python-library"><a href="#python-library" class="header-anchor">#</a> Python Library</h2> <p>Please refer to <a href="/python/contributing">this page</a>.</p> <h2 id="documentation"><a href="#documentation" class="header-anchor">#</a> Documentation</h2> <p>Last but not least, this documentation is an <a href="https://github.com/meteostat/dev" target="_blank" rel="noopener noreferrer">open source project<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>, too. Keeping our docs up-to-date is crucial. If you are contributing to parts of our ecosystem, please make sure to add corresponding documentation. Also, if anything appears to be unclear or misleading in one of our articles, feel free to propose changes.</p> <p>The Meteostat team will review all pull requests. Once a PR has been approved and merged into the <code>master</code> branch, Meteostat will automatically deploy changes into the productive environment.</p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/meteostat/dev/edit/main/src/contribute.md" target="_blank" rel="noopener noreferrer">Edit this page</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">2/18/2022, 12:29:58 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
←
<a href="/sources.html" class="prev">
Data Sources
</a></span> <span class="next"><a href="/donate.html">
Donate
</a>
→
</span></p></div> </main></div><div class="global-ui"></div></div>
<script src="/assets/js/app.dd59b935.js" defer></script><script src="/assets/js/2.eb28a00d.js" defer></script><script src="/assets/js/27.b96c3f38.js" defer></script>
</body>
</html>