(ATCScript "Hourly Precip, Archive Format, TD-3240" (Comment "Author: AQUA TERRA, May 2000") (LineEnd LF) (Set MVal -9.99) (Set MAcc -9.98) (ColumnFormat Fixed 35-40:ValRead 18-21:Year 22-23:Month 26-27:Day 31-32:Hour 33-34:Minute 28-30:Repeats 1-3:RecType 4-11:Location 4-5:State 12-15:ElementType 16-17:Units 41:Flag1 42:Flag2 31-42:Repeating) (Attribute Scenario "OBSERVED") (Attribute Location Location) (Attribute Constituent ElementType) (Attribute Description "Hourly Precip in Inches") (Test (And (= RecType "HPD") (= ElementType "HPCP") (In Units "HI" "HT") (IsNumeric ValRead) (IsNumeric Year) (IsNumeric Month) (IsNumeric Day) (IsNumeric Hour) (IsNumeric Minute) (> Year 1700) (< Month 13) (> Day "0") (< Day 32) (< Hour 26) (< Minute 61)) ) (Attribute MVal MVal) (Attribute MAcc MAcc) (Set InMissing "0") (Set InAccum "0") (Set StartMissing "0") (While (Not EOF) (For Repeat = 1 to (- Repeats 1) (If (And (Not (In ValRead "999999" "99999")) (Not (In Flag1 "I")) ) (Date Year Month Day Hour Minute) (Value (/ ValRead 100)) (If (In Flag1 "M" "D") (Value MVal) (If (= 0 InMissing) (Set StartMissing 1)) (If (And (InMissing) (= 0 StartMissing)) (Set InMissing 0)) (Set StartMissing 0) ) (If (In Flag1 "[" "{") (Set InMissing 1)) (If InMissing (Value MVal)) (If (In Flag1 "]" "}") (Set InMissing 0)) (If (= Flag1 "a") (Set InAccum 1)) (If (And (= Flag1 "A") (In ValRead "000000" "099999")) (Set InAccum 1)) (If (And (= Flag1 "A") (Not (In ValRead "000000" "099999"))) (Set InAccum 0)) (If InAccum (Value MAcc)) ) ) (NextLine) ) (Fill H 1 0 MVal MAcc) )