-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ET values in wxformulas.py returns rate, rather than total #160
Comments
according to this, ET is a rate: http://edis.ifas.ufl.edu/ae459 which definition should we use? |
The formula in the Davis documentation on derived variables gives "the hourly potential ET in mm." Following that definition, their download protocol emits "ET accumulated over the last hour." In this sense, it's kind of an anti-rain. Treating it as an extensive quantity (like rain) also simplifies calculations: you just have to add them up. Finally, templates (and search list) assume it's an extensive quantity. So, I'd like our definition to be "the amount of ET that happened over the interval," just like rain. |
Question: the article on calculating ET by Zotarelli, et al, says the final results will be in mm/day. However, your docstring for Looking through the Zotarelli paper, mm/day seems correct, although there are some mysterious constants that get in the way (such as 0.408 in Eq. 32), which have unknown units. Am I missing something? |
the comment should say mm/period, where period can be day or hour |
the period is a function of the sr_avg and ws_mps. if those are daily, then result is mm/day. if those are hourly, then result is mm/hour. |
Oh, I get it. I read the solidus as meaning division, not 'or.' |
I'm finding the Zotarelli paper very frustrating. Why can't they just give a simple equation, defining the terms, without introducing constants with unknown units? In any case, the complex procedure they outline is to calculate their equation 3. This equation introduced units that make it applicable only for daily calculations. To get to hourly, you have to divide the constant "900" by 24, in addition to expressing the radiation flux in MJ m-2 h-1. In fairness, the Davis doc does the same thing. |
occurred during the archive interval. Fixes issue #160.
Fixed in commit 59de935 |
Mais problème en lien avec WEEWX qui ne renvoyait pas le total, mais une sorte de taux => weewx/weewx#160 A suivre...
Mais problème en lien avec WEEWX qui ne renvoyait pas le total, mais une sorte de taux => weewx/weewx#160 A suivre...
Hello, The site to consult the data (which is under construction) is available here: http://clans-v2.meteo06.fr Sorry for my bad English, i'm French, |
Definitely an issue. The calculation of ET was changed in the last release to use relative humidity if it is available, which, in your case, it is. Obviously, something is not quite right. Unfortunately, I am away from home right now, so I can't really investigate. I will take a look at this tomorrow. In the meantime, I'm opening this issue back up. |
Thank you, and no worries @tkeffer , this is not super urgent. ;) But it is certain that the values can not be used for the moment. I just re-control it in database, and I have many negative values recorded. |
Perhaps you could post some values from your database for the input variables. Something like
where Oh, and what is your latitude? |
Here are some lines with positive and negative values And my latitude : 43° 59.82' N |
One other thing, what unit system are you using in the database? It looks like it's metric, but I can't tell if it is METRIC or METRICWX. |
Yes it's METRIC, I forgot to specify it |
It should not be a problem: the calculation of ET takes the unit system into account. Thanks for the data. I'll take a look at them when I get home. |
If you need a larger sample of data, do not hesitate ! |
So far, I am unable to reproduce these results. For example, for the archive interval at time 1479127500, I am getting an ET rate of 6.45e-03 mm/day, or a total ET of 2.241e-05 over the 5 minute period, which sounds about right. Two questions:
|
Ah, surprising... !
|
This site is accessible at this address : http://clans-v2.meteo06.fr In my repository, this php scripts retrieves the value from the database and multiplies it by 10 to display it in millimeters and not in centimeters since the rain |
Hang on. I just realized that you have a VantagePro. By default, these stations generate ET in hardware. Did you change any settings in [StdWXCalculate]? |
Oh, I did not even know it !
|
However, before the update 3.6 the data of ET calculated by Weewx was strange, and since the update, apart from the negative values, the sum on the day seems coherent with the present conditions. |
I'm not sure where the ET values are coming from. According to your settings in Could you try running weewx from the command line and capture the REC values? You can use this command to do this: cd /home/weewx
./bin/weewxd weewx.conf weewx.conf | grep "^REC" | tee /var/tmp/output.txt Let it run for a couple hours, then post the file -tk |
A modest refinement to the command I gave you. Unfortunately, the pipe buffers the output, so when you terminate the process after a couple of hours, you'll loose whatever was in the pipe. Try this instead: cd /home/weewx
./bin/weewxd weewx.conf | grep --line-buffered "^REC" | tee /var/tmp/output.txt -tk |
Ok, no problem, I just made this second command, and the file looks to be written correctly. I'll let him spin all night and send it to you tomorrow morning. Thanks for your time ! |
Hello ! |
True, but my primary objective is to figure out where these numbers are coming from. They are not coming from the VP2 hardware because it omits values only once an hour, while you have ET values in every record. You say you have a VP2. Do you have the VP2 Plus, which includes a radiation sensor? Because you have been showing plots of solar radiation, I had assumed you do, but perhaps you do not. It would be helpful to see records for a couple hours during the day. |
Ok, that's what it seemed to me when reading the file output. Yes, it's a VP2 Plus cabled with radiation sensor Ok, I just restarted the writing of the file output.txt, since the current values are negative. |
Thanks. Perhaps you could send the log from when you restarted weewx. It will tell us which values weewx will calculate. |
When I restart Weewx :
If I understand correctly, we have the parameters in [StdWXCalculate] |
Ah ! The last record :
ET: -0.000404949779421 So it's the console that sends a negative value? |
Indeed it goes back quite a lot of negative values... |
It would appear so. But, let's do one final check. Please substitute your copy of wxservices.py with the attached. It is instrumented to print out intermediate values. Substitute, restart weewx, run for 20 minutes or so, then post the log. |
Okay, I'll do that when I come back tonight and keep you informed. |
Hello! I substituted the file wxservices.py ant this is the result : output&syslog.zip In passing, I also noticed that the skin Standard displayed this with a negative value, but rounded |
I think we have two issues:
I'll try and come up with some fixes later in the day. In the meantime, if you're facile with Python, you might try watching the driver, vantage.py, and see why it is not emitting ET. Otherwise, wait a bit and I'll send you an instrumented version. |
Okay, I read some papers yesterday, explaining how to calculate potential ET (ETP).
I do not know if I am clear in my explanations, my English being approximative (thanks google translate) I'm not familiar with the Python language, but I'll try to look at it. |
Raphael, Please substitute your version of Substitute, restart weewx, let it run for a couple hours, post the log. I'm still working on a better version for calculating ET in software. |
Hello Tom,
Is it necessary? Or a simple restart of Weewx is enough for you? Thanks ! |
A simple restart will do. -tk Fat-fingered from my Android On Nov 18, 2016 12:43 PM, "Raph" notifications@github.com wrote:
|
Hello Tom, I substituted the file vantage.py ant this is the result after many hours : syslog.zip Apparently no problem ! |
I didn't realize that you were using software record generation. That would explain problem 1. Any particular reason why? Why not use hardware record generation? As for problem 2, I'm still working on a better version for calculating ET. But, if you use hardware generation, you should not need it. |
I do not understand, the [StdWXCalculate] section indicate :
I would have to add :
|
Take a look at option
You are also using an unusual database binding. Any reason for that? |
Oh okay, this option had eluded me ! Yes I am using an external MySQL database on my server. |
So now I have that in the logs:
And actually I have a value of 0 recorded in database |
The standard Using MySQL is not a problem. It's just that you used an unusual name The vantage only emits an ET value on the hour. For all other records, it emits a zero. The record at 15:00:00 should have an ET value. |
Yes I had changed this for two other stations that are Oregon WMR200 (http://nice.meteo06.fr and http://gilette-v2.meteo06.fr). Without this setting, weewx could not produce reports. Yes I changed the name of the database since I have several stations. I now understand, and it makes the link on what I read about the calculation of Davis (hourly and not at each interval). Thank you Tom for clarification ! |
Former algorithm assumed daily values. This one assumes hourly values. Fixes issue #160.
This thing kicked my butt. There are very few good references on ET calculations: they all seem to hide the units used and make mysterious assumptions about cloud cover, etc. I was able to come up with something that reproduces the test values from Example 19 in the FAO crop reference. I also tested it against the Davis algorithm, and it gives reasonably close numbers in summer, slightly low for winter. The algorithm now calculates ET on an hourly basis. It does not allow negative ET values. Call it fixed in commit 21f55b4 |
ET is a kind of inverse rain. It is an extensive unit, measured in mm or inches. It is not a rate.
Looking through wxformulas.py, I believe it is returning a rate.
See this thread: https://groups.google.com/forum/#!topic/weewx-user/9N7ktsu5cbc
The text was updated successfully, but these errors were encountered: