Handbook
Glossary
forecast-conditions ( report seq -- report )
Vocabulary
metar
.
private
Inputs
report
an
object
seq
an
object
Outputs
report
an
object
Definition
USING:
accessors
kernel
regexp
sequences
;
IN:
metar.private
:
forecast-conditions
( report seq -- report )
[
re-wind
matches?
]
find-one
[
parse-wind
pick
wind<<
]
when*
[
re-wind-variable
matches?
]
find-one
[
parse-wind-variable
pick
wind>>
swap
append
pick
wind<<
]
when*
fix-visibility
[
re-visibility
matches?
]
find-all
[
parse-visibility
]
map
", "
join
pick
visibility<<
[
"CAVOK"
=
]
find-one
[
drop
"10km or more"
pick
visibility<<
"no significant weather"
pick
weather<<
"no significant cloud"
pick
sky-condition<<
]
when*
[
re-rvr
matches?
]
find-all
[
parse-rvr
]
map
", "
join
pick
rvr<<
[
weather-group?
]
find-all
dup
empty?
[
drop
]
[
[
parse-weather
]
map
", "
join
pick
weather<<
]
if
[
re-sky-condition
matches?
]
find-all
dup
empty?
[
drop
]
[
[
parse-sky-condition
]
map
", "
join
pick
sky-condition<<
]
if
[
re-wind-shear
matches?
]
find-all
[
parse-wind-shear
]
map
", "
join
pick
wind-shear<<
[
re-forecast-temperature
matches?
]
find-all
[
parse-forecast-temperature
]
map
", "
join
pick
temperatures<<
[
R/ 6\d{5}/
matches?
]
find-all
[
parse-layer-forecast
]
map
", "
join
pick
icing<<
[
R/ 5[\dX]\d{4}/
matches?
]
find-all
[
parse-layer-forecast
]
map
", "
join
pick
turbulence<<
>>unparsed
;