How To Get Daily Rain Fall


#1

1) Give a description of the problem
I am using the new $twcweather.forecast.qpf function and I cannot get the total rainfall for the day. I’ve read that depending on when you run the function, you will get different results, but how do you get the total for that day. $twcweather.forecast.qpf give me 15 days including the current day. To test, I make this run every hour so I can see and each time, today’s value changes so what do you use to get the total and or expect rainfall for the day?

2) What is the expected behaviour?
I was expecting $twcweather.forecast.qpf[0] to give me the expected total rainfall for the given day. Previously $weather.forecast.simpleforecast.forecastday.qpf_allday.in would run every hour and throughout the day, the number would be a running total. At the end of the day, I would save that to a variable.

3) What is happening/not happening?
I have to $twcweather.forecast.qpf[0] running every hour, but it is not a running total. Sometimes the number is high, and other times it is lower. I’ve noticed that if it does not rain at night, the number is 0 so it looks like it did not rain all day when it actually has, but I have no idea which number to capture this information.

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)


#2

I am also having trouble with this, always 0…
$twcweather.conditions.precip24Hour


#3

0 and 1 are today, 2 and 3 are tomorrow etc etc


#4

If “qpf” follows the same rules as the other data points, then:

$twcweather.forecast.qpf[0] = Today
$twcweather.forecast.qpf[1] = Tomorrow
$twcweather.forecast.qpf[2] = The next day
etc (15 days available, or 0-14)


On the other hand, the code:
$twcweather.forecast.daypart[0].qpf[0] = Today
$twcweather.forecast.daypart[0].qpf[1] = Tonight
$twcweather.forecast.daypart[0].qpf[2] = Tomorrow Day
$twcweather.forecast.daypart[0].qpf[3] = Tomorrow night
etc. (15 days available, or 0-29)


#5

Is QPF the total forecasted amount for the day? I’m counting a day from 12am - 11:59pm. Or is QPF only the total for a specific chunk of the day?

In the last few days, we have been getting about 1 inch per day. I run $twcweather.forecast.qpf[0] every hour. At 7am I save it to a variable to compare the rest of the day and I’v noticed that each hour, the qpf[0] is different. From appox. 3am - 3pm, the day shifts, but is there a time I should be running it.
Something is not adding up to get the forcasted total rainfall for a day.

…QPF ) is the expected amount of melted [precipitation]accumulated over a specified time period…


#6

I haven’t started my analysis of qpf yet, but if it’s like the other data points, it seems the daytime is about 7am-7pm, and the nighttime is 7pm until 7am… (the data for the current night vanishes around 3:15am)

Maybe this image will help to make sense of it all:


#7

Thanks for the chart, that helps a lot. Looking at the shift between 3am and 4am, I’m wordering why the numbers did not “shift forward”. For example, $twcweather.forecast.qpf[4] @ 4am is not what $twcweathre.forecast.qpf[5] @ 3am was. I’m guessing it’s because the 24hr blocks are just that. It’s 24hrs from when the function is ran, ie 3am Tuesday thru 3am Wednesday is not the same as 4am Tuesday thru 4am Wednesday.

If that’s the case, the next time it rains, I’ll see what $twcweather.forecast.qpf[0] is shortly after 12am so that my 24hr block is roughly just the current day and the following day I’ll look up the actual total rainfall to compare.


#8

With all the other data points that I have analyzed so far, the start and end times of each day are “set in stone”, and are not dependent on what time you make the query. I think the reason the numbers change slightly over time is because the clouds/fronts have shifted a bit, which means the forecast adjusts and the output of rain might be slightly different.


To see this in action, you can compare 6:03 to 7:03:
$twcweather.forecast.qpf[4]

temp

Since these numbers are days in the future, and the numbers literally drop to zero, the only logical conclusion is that the forecast has updated with new information.


#9

Thanks for your help. $weather was a lot easier :cry: but I’ll see how this new function turns out.


#10

I agree. I am very unhappy with the new $twcweather for many many reasons. I am seriously considering grabbing my weather data from another source entirely.


#11

I am also always getting 0 from $twcweather.conditions.precip24Hour. Did you ever get this resolved?


#12

Did you see my reply over here?