WXSIM soil tension, need to find correct latest.csv to test new script

WXSIM soil forecast uses two different UOMs for soil moist values, centibars (kPa) or %
Field-names Soil Moisture Depth 1/5 use %
Field-names Soil Tension Depth 1/5 use centibars ( or kPa = same unit different name)

To test the new scripts, I need access to a correct latest.csv which has normal centibar values, say in the range 0 => 240,
as explained in Soil Water Basics
All users with Davis soil sensors work with centibar as Davis uses that UOM.

I am testing a new version of my WXSIM script, therefor I need one or more correct latest.csv files to test with.
I use the paid for professional WXSIM version, but sadly I do not have a Davis VP station anymore.
It seems that the soil sensor values are not correct in those cases, as witnessed by dozens other users latest.csv files.
All files I have access to have values of 300 or higher, some go to 400+.

A link to your latest.csv is OK for me to test with, you do not need to zip and post it.

I also attached a screenshot with “strange” soil-temperatures, they seem to be in F although the UOM shows C.

Wim


Hi Wim,

Attached mine, I use Davis and the Latest.csv has both. Hope it helps.

regards,


latest.zip (45.6 KB)

Thanks, new values, but your values are even higher they go up to over 2000.
Maybe I have to apply a factor or use an extra calculation.
I think i have to wait until Tom can explain it.

The documentation I found about soil tension indicates that 240 cb is "Dangerous dry for crop purposes but the highest value is 300. And 0 (zero) is saturated wet (flooded area?).

Wim


Hi Wim,
Yes I recall going through this years ago, I ended up tweeking an old 3in1 script and kept applying to new ones over time.
Not that I am sure it is 100% correct (a bit rough, but it seemed to be close over time).

';
$grsstable.='
'.date('H:i',$line[time]).'
'.round($line[temp]).'°
'.showprecipt($line[prectot],$uoms[1],$washowzeroprecip,get_lang("No precip")).'
'.round($line[grass]).'°
'.round($line[surface]).'°
'.round($line[soil1t]).'°
'.get_lang("Moisture").':'.round((((127 - $line[soil1m])/127) * 100),0).'%
'.round($line[soil2t]).'°
'.get_lang("Moisture").':'.round((((127 - $line[soil2m])/127) * 100),0).'%
Regards,

Hi Wim,
Sorry did not explain that well, because I could never get it to work with centibar , I applied " round((((127 - $line[soil2m])/127) * 100),0).'% " to the WxSim Moisture value in either Latest.csv or in my case Lastret.txt. which results in say a wxSim value of “10” being 92%.

On my soil page I use the same conversion applied to the Davis CB value.

and in the 3in1 I display WxSim as a % (like I said a bit rough, but easier to read as a %) :frowning:

regards,


Thanks for your information.
I prefer to use the cb values Soil Tension Depth 1/5 as they are comparable to the values most weather-programs use when there are Davis soil/moist sensors available.
You developed the linear mathematical formula to convert the WXSIM Soil Moist value to the 0-100% value, where 0 cb equals to 100%

I trust that Tom can help with a similar mathematical formula to convert the Soil Tension value.
It will be more complex as it is not a linear scale but we will see what he comes up with.
I tried with different ones such as
100/127 * SoilTension value and discard all values > 300 or 240 before or after the 127/100

But the results still not reflect the values as measured / reported by the weather-programs, not even close.

Wim

Wim,

You’re welcome to use my latest.csv.

Steve


latestcsv.zip (40.8 KB)

Thanks, now I am utterly confused.
Comparing the other latest.csv files with yours, your WXSIM shows a totally different range of values for moist tension (cb) but the same range of soil most (%) values.

I wait until Tom can give some guidance of how to interpret those values.

Attached two screenshots, both comparing two latest.csv files, one with to high values for “soil tension” (=> soil moist in cb), the other one with low values. First screenshot with tension values, the second one with % values.

Comparing the two forecasts, the percentage values are comparable, the cb values are totally different.
I understand the “garbage in => garbage out” principle. But the % UOM for moist are within normal range, how can the other UOM describing the same weather-value, be so different?

Wim


Those number conbinations look possible to me based on different soil types and the chart on this page.

I’ve seen this thread now, and will get back soon with answers. :slight_smile:

OK, I’ve just re-researched my own research! I’ve also attached a very realistic (though “fake”) forecast (as an Excel file as it wouldn’t let me upload a .csv). In this, I made all soil layers clay loam, with neutral on the rock/organic admixture scale, and 30% initial soil moisture (29 cb tension). I let it be sunny for two days, then 27 mm of rain over the course of about a day, then sunny again. The changes in moisture, both as % and as tension, look quite realistic, corresponding to the sun and the rain.

My previous research (about 4 years ago?) had suggested that about the highest tension one would ever talk about is 1500, and over 1000 all plants wilt. I knew that 300 or 400 was quite high and dry. I now look at see that many tensiometers won’t even read over 100, and they are often not reliable over 200, and by then you’ve often got dying plants/crops anyway. It seems I’ve seen 400 reported in Davis WeatherLink files, but I’m not sure about that.

The relationship is extremely complex! It’s far from linear. I struggled to come up with an equation to relate soil moisture and tension, and was actually quite successful, with values mostly with 5% (I forget which direction that’s in … % to cb or cb to %) of the available data, which looks a lot like the link a couple of posts above. I’ll go ahead and “publicize” my algorithm here (below), but I don’t see that there’s any use for that in the scripts, because WXSIM is not outputting the 16 soil types and percent rock or organic admixture, which are needed for the variable “scod”.

A major issue could be import of the soil moisture data, as bad values could be in there from the start. The soil type choice is also important, and I am NOT an except at identifying soil types!. Well, here’s my code for the function and its inverse, for going back and forth between % and cb. By the way, maximum percetage soil moisture also varies with soil type. Often it’s about 50%. There’s no such thing as 100% by volume soil moisture, because that would be water! :slight_smile:

Function socod(snum, sadm)
scod = 105
If snum = 2 Then scod = 79
If snum = 3 Then scod = 153
If snum = 4 Then scod = 98
If snum = 5 Then scod = 90
If snum = 6 Then scod = 153
If snum = 7 Then scod = 136
If snum = 8 Then scod = 106
If snum = 9 Then scod = 135
If snum = 10 Then scod = 236
If snum = 11 Then scod = 223
If snum = 12 Then scod = 195
If snum = 13 Then scod = 159
If snum = 14 Then scod = 127
If snum = 15 Then scod = 57
If sadm > 0 Then scod = scod - sadm * 0.35
If sadm < 0 Then scod = scod - sadm * 0.7
socod = scod
End Function
Function temo(scod, tens)
If tens < 0 Then tens = 0
pctmo = 4157 / scod ^ 0.4 / (tens ^ 0.57 + 14.2) - (scod - 120) ^ 2 / 1350 + 2.5
If pctmo < 0 Then pctmo = 0
If pctmo > 80 Then pctmo = 80
temo = pctmo
End Function
Function mote(scod, pctmo)
pmote = (4157 / scod ^ 0.4 / (pctmo + (scod - 120) ^ 2 / 1350 - 2.5) - 14.2)
If pmote > 0 Then
tens = pmote ^ (1 / 0.57)
Else
tens = 0
If pctmo < temo(scod, 0) Then tens = 9999
End If
If tens > 9999 Then tens = 9999
mote = tens
End Function

That last post was supposed to have an attachment! It’s a 114 KB Excel file. I’ll try again in the next post.

Here, hopefully, is latest.xlsx


latest.xlsx (114 KB)

Your test latest.csv and the real one from @SteveFitz1 display “normal” (comparable to a Davis-sensor) cb values.

Other dozen or so files have

  • cb values of 400 up to 2000+ without any value in the “normal” (0-240 cb) range[/li][li]heavy fluctuating cb values + or minus 20cb or more in 1 hour[/li][li]sometimes also have soil temps in C of 80+

I assume, after reading your remarks:

[ol]
[li]the cb values can be correct and in the same range as the Davis measurements, so no conversion is needed by the PHP scripts[/li][li]values above 400 indicate " garbage in " probably by the weather-program, those values should be discarded[/li][li]
there is no conversion possible from 0-50% moist to 0-300 cb, therefor I can not use the moist% to check the cb values.

[/li][/ol]

I adapted the script to display only “in-range” values and replace all others with a dash. Until I can find more latest.csv files with “in-range” cb values I switched of the “human” readable explanations (ex. “Irrigation desired” cb between 26 and 60).

As the users I contacted did not use (understand?) the moist% but always use the Davis-cb value to make their planting decisions, the % value will be removed from the soil page.

Wim


wswxsimfinal2.jpg

Hi Wim,
Just some feedback as promised: (wsfct4) How the Test Version (using Latest.csv) Handled DST change.
We changed from AEST to ADST this morning and the script ran perfectly, reading the latest.csv (all times where adjusted correctly).
Brilliant.
Not sure though where it gets the CB of 1 / 2 etc.
Other image shows older 3in1 showing %Moisture (same as what’s in latest.csv but this one uses lastret.txt).
Kind regards,
Update: attached ‘latest.csv’


latest.zip (45.2 KB)