1 ! Copyright (C) 2013 John Benediktsson
2 ! See http://factorcode.org/license.txt for BSD license
4 USING: accessors arrays ascii assocs calendar calendar.format
5 combinators command-line continuations csv formatting fry
6 grouping http.client io io.encodings.ascii io.files io.styles
7 kernel math math.extras math.parser memoize namespaces regexp
8 sequences sorting.human splitting strings urls wrap.strings ;
12 TUPLE: station cccc name state country latitude longitude ;
18 ERROR: bad-location str ;
20 : parse-location ( str -- n )
21 "-" split dup length {
22 { 3 [ first3 [ string>number ] tri@ 60.0 / + 60.0 / + ] }
23 { 2 [ first2 [ string>number ] bi@ 60.0 / + ] }
24 { 1 [ first string>number ] }
28 : string>longitude ( str -- lon/f )
29 dup R/ \d+-\d+(-\d+(\.\d+)?)?[WE]/ matches? [
32 [ CHAR: W = [ neg ] when ] bi*
35 : string>latitude ( str -- lat/f )
36 dup R/ \d+-\d+(-\d+(\.\d+)?)?[NS]/ matches? [
39 [ CHAR: S = [ neg ] when ] bi*
42 : stations-data ( -- seq )
43 URL" http://tgftp.nws.noaa.gov/data/nsd_cccc.txt"
44 http-get nip CHAR: ; [ string>csv ] with-delimiter ;
48 MEMO: all-stations ( -- seq )
55 [ 7 swap nth string>latitude ]
56 [ 8 swap nth string>longitude ]
60 : find-by-cccc ( cccc -- station )
61 all-stations swap '[ cccc>> _ = ] find nip ;
63 : find-by-country ( country -- stations )
64 all-stations swap '[ country>> _ = ] filter ;
66 : find-by-state ( state -- stations )
67 all-stations swap '[ state>> _ = ] filter ;
71 TUPLE: metar-report type station timestamp modifier wind
72 visibility rvr weather sky-condition temperature dew-point
73 altimeter remarks raw ;
75 CONSTANT: pressure-tendency H{
76 { "0" "increasing then decreasing" }
77 { "1" "increasing more slowly" }
79 { "3" "increasing more quickly" }
81 { "5" "decreasing then increasing" }
82 { "6" "decreasing more slowly" }
84 { "8" "decreasing more quickly" }
87 CONSTANT: lightning H{
88 { "CA" "cloud-air lightning" }
89 { "CC" "cloud-cloud lightning" }
90 { "CG" "cloud-ground lightning" }
91 { "IC" "in-cloud lightning" }
98 { "DR" "low drifting" }
100 { "DU" "widespread dust" }
102 { "FC" "funnel clouds" }
107 { "GS" "small hail and/or snow pellets" }
109 { "IC" "ice crystals" }
111 { "PL" "ice pellets" }
112 { "PO" "well-developed dust/sand whirls" }
118 { "SG" "snow grains" }
123 { "TS" "thuderstorm" }
125 { "VA" "volcanic ash" }
128 MEMO: glossary ( -- assoc )
129 "vocab:metar/glossary.txt" ascii file-lines
130 [ "," split1 ] H{ } map>assoc ;
132 : parse-glossary ( str -- str' )
137 [ glossary ?at drop ] if
141 : parse-timestamp ( str -- str' )
142 [ now [ year>> ] [ month>> ] bi ] dip
143 2 cut 2 cut 2 cut drop [ string>number ] tri@
145 [ drop 0 ] dip 0 instant <timestamp> 1 days time+
147 0 instant <timestamp>
148 ] if timestamp>rfc822 ;
150 CONSTANT: compass-directions H{
170 : direction>compass ( direction -- compass )
171 22.5 round-to-step compass-directions at ;
173 : parse-compass ( str -- str' )
174 string>number [ direction>compass ] keep "%s (%s°)" sprintf ;
176 : parse-direction ( str -- str' )
177 dup "VRB" = [ drop "variable" ] [
178 parse-compass "from %s" sprintf
181 : kt>mph ( kt -- mph ) 1.15077945 * ;
183 : mph>kt ( mph -- kt ) 1.15077945 / ;
185 : parse-speed ( str -- str'/f )
187 dup kt>mph "%s knots (%.1f mph)" sprintf
190 : parse-wind ( str -- str' )
191 dup "00000KT" = [ drop "calm" ] [
192 3 cut "KT" ?tail drop "G" split1
193 [ parse-direction ] [ parse-speed ] [ parse-speed ] tri*
194 [ "%s at %s with gusts to %s " sprintf ]
195 [ "%s at %s" sprintf ] if*
198 : parse-wind-variable ( str -- str' )
199 "V" split1 [ parse-compass ] bi@
200 ", variable from %s to %s" sprintf ;
202 : parse-visibility ( str -- str' )
204 { CHAR: M [ rest "less than " ] }
205 { CHAR: P [ rest "more than " ] }
207 } case swap "SM" ?tail drop
208 CHAR: \s over index [ " " "+" replace ] when
209 string>number "%s%s statute miles" sprintf ;
211 : parse-rvr ( str -- str' )
212 "R" ?head drop "/" split1 "FT" ?tail drop
214 [ string>number ] bi@
215 "varying between %s and %s" sprintf
217 string>number "of %s" sprintf
218 ] if* "runway %s visibility %s ft" sprintf ;
220 : (parse-weather) ( str -- str' )
221 dup "+FC" = [ drop "tornadoes or waterspouts" ] [
223 { CHAR: + [ rest "heavy " ] }
224 { CHAR: - [ rest "light " ] }
227 2 group dup [ weather key? ] all?
228 [ [ weather at ] map " " join ]
229 [ concat parse-glossary ] if
233 : parse-weather ( str -- str' )
234 "VC" over subseq? [ "VC" "" replace t ] [ f ] if
236 [ [ " in the vicinity" append ] when ] bi* ;
238 : parse-altitude ( str -- str' )
239 string>number " at %s00 ft" sprintf ;
245 { "SCT" "scattered" }
246 { "SKC" "clear sky" }
247 { "CLR" "clear sky" }
248 { "NSC" "clear sky" }
250 { "ACC" "altocumulus castellanus" }
251 { "ACSL" "standing lenticular altocumulus" }
252 { "CCSL" "cirrocumulus standing lenticular cloud" }
254 { "SC" "stratocumulus" }
255 { "SCSL" "stratocumulus standing lenticular cloud" }
256 { "TCU" "towering cumulus" }
259 : parse-sky-condition ( str -- str' )
264 [ sky at [ " (%s)" sprintf ] [ f ] if* ]
268 : F>C ( F -- C ) 32 - 5/9 * ;
270 : C>F ( C -- F ) 9/5 * 32 + ;
272 : parse-temperature ( str -- temp dew-point )
275 "M" ?head [ string>number ] [ [ neg ] when ] bi*
276 dup C>F "%d °C (%.1f °F)" sprintf
280 : parse-altimeter ( str -- str' )
281 unclip [ string>number ] [ CHAR: A = ] bi*
282 [ 100 /f "%.2f Hg" sprintf ] [ "%s hPa" sprintf ] if ;
284 CONSTANT: re-timestamp R/ \d{6}Z/
285 CONSTANT: re-station R/ \w{4}/
286 CONSTANT: re-temperature R/ [M]?\d{2}\/([M]?\d{2})?/
287 CONSTANT: re-wind R/ (VRB|\d{3})\d{2,3}(G\d{2,3})?KT/
288 CONSTANT: re-wind-variable R/ \d{3}V\d{3}/
289 CONSTANT: re-visibility R/ (\d+ )?[MP]?\d+(\/\d+)?SM/
290 CONSTANT: re-rvr R/ R\d{2}[RLC]?\/\d{4}(V\d{4})?FT/
291 CONSTANT: re-weather R/ [+-]?(VC)?(\w{2}|\w{4})/
292 CONSTANT: re-sky-condition R/ (\w{2,3}\d{3}(\w+)?|\w{3}|CAVOK)/
293 CONSTANT: re-altimeter R/ [AQ]\d{4}/
295 : find-one ( seq quot: ( elt -- ? ) -- seq elt/f )
296 dupd find drop [ tail unclip ] [ f ] if* ; inline
298 : find-all ( seq quot: ( elt -- ? ) -- seq elts )
299 [ find-one swap ] keep '[
300 dup [ f ] [ first @ ] if-empty
301 ] [ unclip ] produce rot [ prefix ] when* ; inline
303 : fix-visibility ( seq -- seq' )
304 dup [ re-visibility matches? ] find drop [
305 dup 1 - pick ?nth [ R/ \d+/ matches? ] [ f ] if* [
306 cut [ unclip-last ] [ unclip swap ] bi*
307 [ " " glue 1array ] [ 3append ] bi*
311 : metar-body ( report seq -- report )
312 [ { "METAR" "SPECI" } member? ] find-one
313 [ pick type<< ] when*
315 [ re-station matches? ] find-one
316 [ pick station<< ] when*
318 [ re-timestamp matches? ] find-one
319 [ parse-timestamp pick timestamp<< ] when*
321 [ { "AUTO" "COR" } member? ] find-one
322 [ pick modifier<< ] when*
324 [ re-wind matches? ] find-one
325 [ parse-wind pick wind<< ] when*
327 [ re-wind-variable matches? ] find-one
328 [ parse-wind-variable pick wind>> prepend pick wind<< ] when*
331 [ re-visibility matches? ] find-one
332 [ parse-visibility pick visibility<< ] when*
334 [ re-rvr matches? ] find-all " " join
335 [ parse-rvr ] map ", " join pick rvr<<
337 [ re-weather matches? ] find-all
338 [ parse-weather ] map ", " join pick weather<<
340 [ re-sky-condition matches? ] find-all
341 [ parse-sky-condition ] map ", " join pick sky-condition<<
343 [ re-temperature matches? ] find-one
346 [ pick temperature<< ]
347 [ pick dew-point<< ] bi*
350 [ re-altimeter matches? ] find-one
351 [ parse-altimeter pick altimeter<< ] when*
355 : signed-number ( sign value -- n )
356 [ string>number ] bi@ swap zero? [ neg ] unless 10.0 / ;
358 : single-value ( str -- str' )
359 1 cut signed-number ;
361 : double-value ( str -- m n )
362 1 cut 3 cut [ signed-number ] dip 1 cut signed-number ;
364 : parse-1hr-temp ( str -- str' )
365 "T" ?head drop dup length 4 > [
367 [ dup C>F "%.1f °C (%.1f °F)" sprintf ] bi@
368 "hourly temperature %s and dew point %s" sprintf
371 "hourly temperature %.1f °C (%.1f °F)" sprintf
374 : parse-6hr-max-temp ( str -- str' )
375 "1" ?head drop single-value dup C>F
376 "6-hour maximum temperature %.1f °C (%.1f °F)" sprintf ;
378 : parse-6hr-min-temp ( str -- str' )
379 "2" ?head drop single-value dup C>F
380 "6-hour minimum temperature %.1f °C (%.1f °F)" sprintf ;
382 : parse-24hr-temp ( str -- str' )
383 "4" ?head drop double-value
384 [ dup C>F "%.1f °C (%.1f °F)" sprintf ] bi@
385 "24-hour maximum temperature %s minimum temperature %s"
388 : parse-1hr-pressure ( str -- str' )
389 "5" ?head drop 1 cut single-value [ pressure-tendency at ] dip
390 "hourly pressure %s %s hPa" sprintf ;
392 : parse-snow-depth ( str -- str' )
393 "4/" ?head drop string>number "snow depth %s inches" sprintf ;
395 CONSTANT: low-clouds H{
396 { 1 "cumulus (fair weather)" }
397 { 2 "cumulus (towering)" }
398 { 3 "cumulonimbus (no anvil)" }
399 { 4 "stratocumulus (from cumulus)" }
400 { 5 "stratocumuls (not cumulus)" }
401 { 6 "stratus or Fractostratus (fair)" }
402 { 7 "fractocumulus / fractostratus (bad weather)" }
403 { 8 "cumulus and stratocumulus" }
404 { 9 "cumulonimbus (thunderstorm)" }
408 CONSTANT: mid-clouds H{
409 { 1 "altostratus (thin)" }
410 { 2 "altostratus (thick)" }
411 { 3 "altocumulus (thin)" }
412 { 4 "altocumulus (patchy)" }
413 { 5 "altocumulus (thickening)" }
414 { 6 "altocumulus (from cumulus)" }
415 { 7 "altocumulus (with altocumulus, altostratus, nimbostratus)" }
416 { 8 "altocumulus (with turrets)" }
417 { 9 "altocumulus (chaotic)" }
418 { -1 "above overcast" }
421 CONSTANT: high-clouds H{
422 { 1 "cirrus (filaments)" }
423 { 2 "cirrus (dense)" }
424 { 3 "cirrus (often with cumulonimbus)" }
425 { 4 "cirrus (thickening)" }
426 { 5 "cirrus / cirrostratus (low in sky)" }
427 { 6 "cirrus / cirrostratus (hi in sky)" }
428 { 7 "cirrostratus (entire sky)" }
429 { 8 "cirrostratus (partial)" }
430 { 9 "cirrocumulus or cirrocumulus / cirrus / cirrostratus" }
431 { -1 "above overcast" }
434 : parse-cloud-cover ( str -- str' )
435 "8/" ?head drop first3 [ CHAR: 0 - ] tri@
436 [ [ f ] [ low-clouds at "low clouds are %s" sprintf ] if-zero ]
437 [ [ f ] [ mid-clouds at "middle clouds are %s" sprintf ] if-zero ]
438 [ [ f ] [ high-clouds at "high clouds are %s" sprintf ] if-zero ]
439 tri* 3array " " join ;
441 : parse-inches ( str -- str' )
442 dup [ CHAR: / = ] all? [ drop "unknown" ] [
444 [ "trace" ] [ 100 /f "%.2f inches" sprintf ] if-zero
447 : parse-1hr-precipitation ( str -- str' )
448 "P" ?head drop parse-inches
449 "%s precipitation in last hour" sprintf ;
451 : parse-6hr-precipitation ( str -- str' )
452 "6" ?head drop parse-inches
453 "%s precipitation in last 6 hours" sprintf ;
455 : parse-24hr-precipitation ( str -- str' )
456 "7" ?head drop parse-inches
457 "%s precipitation in last 24 hours" sprintf ;
459 ! XXX: "on the hour" instead of "00 minutes past the hour" ?
461 : parse-recent-time ( str -- str' )
464 [ " minutes past the hour" append ] if ;
466 : parse-peak-wind ( str -- str' )
467 "/" split1 [ parse-wind ] [ parse-recent-time ] bi*
468 "%s occuring at %s" sprintf ;
470 : parse-sea-level-pressure ( str -- str' )
471 "SLP" ?head drop string>number 10.0 /f 1000 +
472 "sea-level pressure is %s hPa" sprintf ;
474 : parse-lightning ( str -- str' )
475 "LTG" ?head drop 2 group [ lightning at ] map " " join ;
477 CONSTANT: re-recent-weather R/ ((\w{2})?[BE]\d{2,4}((\w{2})?[BE]\d{2,4})?)+/
479 : parse-began/ended ( str -- str' )
481 [ CHAR: B = "began" "ended" ? ]
482 [ parse-recent-time ] bi* "%s at %s" sprintf ;
484 : split-recent-weather ( str -- seq )
486 dup [ digit? ] find drop
487 over [ digit? not ] find-from drop
488 [ cut ] [ f ] if* swap
491 : (parse-recent-weather) ( str -- str' )
492 dup [ digit? ] find drop 2 > [
493 2 cut [ weather at " " append ] dip
494 ] [ f swap ] if parse-began/ended "" append-as ;
496 : parse-recent-weather ( str -- str' )
498 [ (parse-recent-weather) ] map " " join ;
500 : parse-varying ( str -- str' )
501 "V" split1 [ string>number ] bi@
502 "varying between %s00 and %s00 ft" sprintf ;
504 : parse-from-to ( str -- str' )
505 "-" split [ parse-glossary ] map " to " join ;
507 : parse-water-equivalent-snow ( str -- str' )
508 "933" ?head drop parse-inches
509 "%s water equivalent of snow on ground" sprintf ;
511 : parse-duration-of-sunshine ( str -- str' )
512 "98" ?head drop string>number
513 [ "no" ] [ "%s minutes of" sprintf ] if-zero
514 "%s sunshine" sprintf ;
516 : parse-6hr-snowfall ( str -- str' )
517 "931" ?head drop parse-inches
518 "%s snowfall in last 6 hours" sprintf ;
520 : parse-probability ( str -- str' )
521 "PROB" ?head drop string>number
522 "probability of %d%%" sprintf ;
524 : parse-remark ( str -- str' )
526 { [ dup glossary key? ] [ glossary at ] }
527 { [ dup R/ 1\d{4}/ matches? ] [ parse-6hr-max-temp ] }
528 { [ dup R/ 2\d{4}/ matches? ] [ parse-6hr-min-temp ] }
529 { [ dup R/ 4\d{8}/ matches? ] [ parse-24hr-temp ] }
530 { [ dup R/ 4\/\d{3}/ matches? ] [ parse-snow-depth ] }
531 { [ dup R/ 5\d{4}/ matches? ] [ parse-1hr-pressure ] }
532 { [ dup R/ 6[\d\/]{4}/ matches? ] [ parse-6hr-precipitation ] }
533 { [ dup R/ 7\d{4}/ matches? ] [ parse-24hr-precipitation ] }
534 { [ dup R/ 8\/\d{3}/ matches? ] [ parse-cloud-cover ] }
535 { [ dup R/ 931\d{3}/ matches? ] [ parse-6hr-snowfall ] }
536 { [ dup R/ 933\d{3}/ matches? ] [ parse-water-equivalent-snow ] }
537 { [ dup R/ 98\d{3}/ matches? ] [ parse-duration-of-sunshine ] }
538 { [ dup R/ T\d{4,8}/ matches? ] [ parse-1hr-temp ] }
539 { [ dup R/ \d{3}\d{2,3}\/\d{2,4}/ matches? ] [ parse-peak-wind ] }
540 { [ dup R/ P\d{4}/ matches? ] [ parse-1hr-precipitation ] }
541 { [ dup R/ SLP\d{3}/ matches? ] [ parse-sea-level-pressure ] }
542 { [ dup R/ LTG\w+/ matches? ] [ parse-lightning ] }
543 { [ dup R/ PROB\d+/ matches? ] [ parse-probability ] }
544 { [ dup R/ \d{3}V\d{3}/ matches? ] [ parse-varying ] }
545 { [ dup R/ [^-]+(-[^-]+)+/ matches? ] [ parse-from-to ] }
546 { [ dup R/ [^\/]+(\/[^\/]+)+/ matches? ] [ ] }
547 { [ dup R/ \d+.\d+/ matches? ] [ ] }
548 { [ dup re-recent-weather matches? ] [ parse-recent-weather ] }
549 { [ dup re-weather matches? ] [ parse-weather ] }
550 { [ dup re-sky-condition matches? ] [ parse-sky-condition ] }
554 : metar-remarks ( report seq -- report )
555 [ parse-remark ] map " " join >>remarks ;
557 : <metar-report> ( metar -- report )
558 [ metar-report new ] dip [ >>raw ] keep
559 [ blank? ] split-when { "RMK" } split1
560 [ metar-body ] [ metar-remarks ] bi* ;
562 : row. ( name quot -- )
564 [ _ write ] with-cell
565 [ @ [ 65 wrap-string write ] when* ] with-cell
568 : metar-report. ( report -- )
569 standard-table-style [
571 [ "Station" [ station>> ] row. ]
572 [ "Timestamp" [ timestamp>> ] row. ]
573 [ "Wind" [ wind>> ] row. ]
574 [ "Visibility" [ visibility>> ] row. ]
575 [ "RVR" [ rvr>> ] row. ]
576 [ "Weather" [ weather>> ] row. ]
577 [ "Sky condition" [ sky-condition>> ] row. ]
578 [ "Temperature" [ temperature>> ] row. ]
579 [ "Dew point" [ dew-point>> ] row. ]
580 [ "Altimeter" [ altimeter>> ] row. ]
581 [ "Remarks" [ remarks>> ] row. ]
582 [ "Raw Text" [ raw>> ] row. ]
584 ] tabular-output nl ;
588 GENERIC: metar ( station -- metar )
590 M: station metar cccc>> metar ;
593 "http://tgftp.nws.noaa.gov/data/observations/metar/stations/%s.TXT"
594 sprintf http-get nip ;
596 GENERIC: metar. ( station -- )
598 M: station metar. cccc>> metar. ;
601 [ metar <metar-report> metar-report. ]
602 [ drop "%s METAR not found\n" printf ] recover ;
606 : parse-wind-shear ( str -- str' )
607 "WS" ?head drop "/" split1
608 [ parse-altitude ] [ parse-wind ] bi* prepend
609 "wind shear " prepend ;
611 CONSTANT: re-from-timestamp R/ FM\d{6}/
613 : parse-from-timestamp ( str -- str' )
614 "FM" ?head drop parse-timestamp ;
616 CONSTANT: re-valid-timestamp R/ \d{4}\/\d{4}/
618 : parse-valid-timestamp ( str -- str' )
619 "/" split1 [ "00" append parse-timestamp ] bi@ " to " glue ;
621 TUPLE: taf-report station timestamp valid-timestamp wind
622 visibility rvr weather sky-condition partials raw ;
624 TUPLE: taf-partial from-timestamp wind visibility rvr weather
627 : taf-body ( report str -- report )
628 [ blank? ] split-when
630 [ "TAF" = ] find-one drop
632 [ { "AMD" "COR" "RTD" } member? ] find-one drop
634 [ re-station matches? ] find-one
635 [ pick station<< ] when*
637 [ re-timestamp matches? ] find-one
638 [ parse-timestamp pick timestamp<< ] when*
640 [ re-valid-timestamp matches? ] find-one
641 [ parse-valid-timestamp pick valid-timestamp<< ] when*
643 [ re-wind matches? ] find-one
644 [ parse-wind pick wind<< ] when*
646 [ re-wind-variable matches? ] find-one
647 [ parse-wind-variable pick wind>> prepend pick wind<< ] when*
649 [ re-visibility matches? ] find-one
650 [ parse-visibility pick visibility<< ] when*
652 [ re-rvr matches? ] find-all " " join
653 [ parse-rvr ] map ", " join pick rvr<<
655 [ re-weather matches? ] find-all
656 [ parse-weather ] map ", " join pick weather<<
658 [ re-sky-condition matches? ] find-all
659 [ parse-sky-condition ] map ", " join pick sky-condition<<
663 : <taf-partial> ( str -- partial )
664 [ taf-partial new ] dip [ blank? ] split-when
666 [ re-from-timestamp matches? ] find-one
667 [ parse-from-timestamp pick from-timestamp<< ] when*
669 [ re-wind matches? ] find-one
670 [ parse-wind pick wind<< ] when*
672 [ re-wind-variable matches? ] find-one
673 [ parse-wind-variable pick wind>> prepend pick wind<< ] when*
675 [ re-visibility matches? ] find-one
676 [ parse-visibility pick visibility<< ] when*
678 [ re-rvr matches? ] find-all " " join
679 [ parse-rvr ] map ", " join pick rvr<<
681 [ re-weather matches? ] find-all
682 [ parse-weather ] map ", " join pick weather<<
684 [ re-sky-condition matches? ] find-all
685 [ parse-sky-condition ] map ", " join pick sky-condition<<
689 : taf-partials ( report seq -- report )
690 [ <taf-partial> ] map >>partials ;
692 : <taf-report> ( taf -- report )
693 [ taf-report new ] dip [ >>raw ] keep
694 string-lines [ [ blank? ] trim ] map
695 rest dup first "TAF" = [ rest ] when
696 harvest unclip swapd taf-body swap taf-partials ;
698 : taf-report. ( report -- )
700 standard-table-style [
702 [ "Station" [ station>> ] row. ]
703 [ "Timestamp" [ timestamp>> ] row. ]
704 [ "Valid From" [ valid-timestamp>> ] row. ]
705 [ "Wind" [ wind>> ] row. ]
706 [ "Visibility" [ visibility>> ] row. ]
707 [ "RVR" [ rvr>> ] row. ]
708 [ "Weather" [ weather>> ] row. ]
709 [ "Sky condition" [ sky-condition>> ] row. ]
710 [ "Raw Text" [ raw>> ] row. ]
715 standard-table-style [
717 [ "From" [ from-timestamp>> ] row. ]
718 [ "Wind" [ wind>> ] row. ]
719 [ "Visibility" [ visibility>> ] row. ]
720 [ "RVR" [ rvr>> ] row. ]
721 [ "Weather" [ weather>> ] row. ]
722 [ "Sky condition" [ sky-condition>> ] row. ]
730 GENERIC: taf ( station -- taf )
732 M: station taf cccc>> taf ;
735 "http://tgftp.nws.noaa.gov/data/forecasts/taf/stations/%s.TXT"
736 sprintf http-get nip ;
738 GENERIC: taf. ( station -- )
740 M: station taf. cccc>> taf. ;
743 [ taf <taf-report> taf-report. ]
744 [ drop "%s TAF not found\n" printf ] recover ;
748 [ metar print ] [ taf print ] bi nl