Handbook
Glossary
<taf-partial> ( str -- partial )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
partial
an
object
Definition
USING:
accessors
ascii
kernel
math.parser
regexp
sequences
splitting
;
IN:
metar.private
:
<taf-partial>
( str -- partial )
[
taf-partial
new
]
dip
[
>>raw
]
keep
[
blank?
]
split-when
harvest
[
re-from-timestamp
matches?
]
find-one
[
parse-from-timestamp
pick
from-timestamp<<
"FM"
pick
change<<
]
when*
[
R/ PROB(30|40)/
matches?
]
find-one
[
"PROB"
?head
drop
string>number
pick
probability<<
"PROB"
pick
change<<
]
when*
[
{
"TEMPO"
"BECMG"
"NOSIG"
}
member?
]
find-one
[
pick
change<<
]
when*
[
re-valid-timestamp
matches?
]
find-one
[
parse-valid-timestamp
pick
valid-timestamp<<
]
when*
[
R/ FM\d{4}/
matches?
]
find-one
[
parse-trend-time
pick
from-timestamp<<
]
when*
[
R/ TL\d{4}/
matches?
]
find-one
[
parse-trend-time
pick
until-timestamp<<
]
when*
[
R/ AT\d{4}/
matches?
]
find-one
[
parse-trend-time
pick
at-timestamp<<
]
when*
forecast-conditions
;