def __parse_precipfc_data(data, timeframe):
result = {AVERAGE: None, TOTAL: None, TIMEFRAME: None}<EOL>log.debug("<STR_LIT>", data)<EOL>lines = data.splitlines()<EOL>index = <NUM_LIT:1><EOL>totalrain = <NUM_LIT:0><EOL>numberoflines = <NUM_LIT:0><EOL>nrlines = min(len(lines), round(float(timeframe) / <NUM_LIT:5>) + <NUM_LIT:1>)<EOL>while index < nrlines:<EOL><INDENT>line = lines[index]<EOL>log.debug("<STR_LIT>", line)<EOL>(val, key) = line.split("<STR_LIT:|>")<EOL>mmu = <NUM_LIT:10>**(float((int(val) - <NUM_LIT>)) / <NUM_LIT:32>)<EOL>totalrain = totalrain + float(mmu)<EOL>numberoflines = numberoflines + <NUM_LIT:1><EOL>index += <NUM_LIT:1><EOL><DEDENT>if numberoflines > <NUM_LIT:0>:<EOL><INDENT>result[AVERAGE] = round((totalrain / numberoflines), <NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>result[AVERAGE] = <NUM_LIT:0><EOL><DEDENT>result[TOTAL] = round(totalrain / <NUM_LIT:12>, <NUM_LIT:2>)<EOL>result[TIMEFRAME] = timeframe<EOL>return result<EOL>
Parse the forecasted precipitation data.