Plottable cloud base heights calculated by a virtual sensor

Moderator: Mattk

Post Reply
User avatar
d_l
Expert Boarder
Expert Boarder
Posts: 140
Joined: Fri Mar 13, 2009 12:58 am
Location: Reno, Nevada USA
Contact:

Plottable cloud base heights calculated by a virtual sensor

Post by d_l »

While the minimum cloud base is calculated by the Meteohub and can be displayed as text by the [actual_th0_cloudheight_f] name-pair, this ouput is not readily plottable (AFAIK). If you wish to plot cloud base heights over a period of time, you will need to make a virtual sensor to produce that data and then plot those results.

This cloud base AWK script is fairly simple. However, the AWK/GAWK manuals do not address the immensely significant fact that the Meteohub's internal calculations are computed at full values and then divided by 100 before being displayed as a Meteohub sensor value. This virtual sensor is also programmed to round up values greater or equal than x.5 and round down those below to yield a "decimal integer".

First of all, this computation is still using Meteohub version 4.6t (I don't update often), but I think it should run correctly on later versions.

These are the "how-to" settings:

For your virtual sensor, define the following:
New ID - data#
Name - CB or what ever you wish
Trigger - th#
Conversion - awk ' { cb = (($3/10 - $5/10)/2.5)* 1000; cb = int (cb -- 0.5) * 100; printf ''%i", cb } '

Simply copy and paste the AWK script into the conversion box in order to avoid entry mistakes.

The cloud base formula for height in feet is CB = (T – Tdew) / 2.5 * 1000. Note that the temperature value as output by the Meteohub must be divided by 10 and the overall height multiplied by 100 to produce the correct cloud base height. If you wish the height to be in meters, substitute 4.4 for 2.5 in the script. The AWK script actually calculates the height above the station's temp/hum sensor which is often stated as above ground level (AGL). For the actual elevation of cloud bases, the temp/hum sensor's elevation has to be added to the AWK script. If you wish the script output to be the actual elevation of a cloud base, I suggest adding that elevation right after the 100 in the script. Remember that to add in the Meteohub AWK scripts, you need to use a double negative such as "-- elevation value".

For now, I've been plotting the cloud base height on a simple 24-hr graph - https://www.tceweather.com/cloudbase_graph.html. This page is still a work-in-progress as I'm unsure of the maximum height that the graph's Y-axis will need. The graph's Format Cmd string is "set term png transparent 9|set lmargin 10|set xzeroaxis lt 2 lw 2|set format y "%.0f"|set ylabel "Cloud Base (ft)"|set format y2 "%.0f"|set y2label "Cloud Base (ft)"|set timestamp top "%m/%d/%y %H:%M" offset 5, -2|set key box at graph 1.05,1.06 horizontal". I generally like to have transparent plots.

Edit: The changes in the cloud base height over time look almost identical to the Revised Chandler Burning Index when graphed (except when the cloud heights exceed about 10k ft, the CBI flatlines at the 100 cap). Both use T and RH (the RH for the cloud base is indirect through the dew point), so similar curves would be expected.

Challenger007
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Thu Feb 04, 2021 5:07 pm

Re: Plottable cloud base heights calculated by a virtual sensor

Post by Challenger007 »

Very detailed instructions. I was just very interested to understand why weather forecasts are not so accurate. As I understand it now, there is also a problem with rounding values. Or was I not thinking about that? I apologize for the stupid questions, I'm just trying to figure out what is happening and how.

User avatar
d_l
Expert Boarder
Expert Boarder
Posts: 140
Joined: Fri Mar 13, 2009 12:58 am
Location: Reno, Nevada USA
Contact:

Re: Plottable cloud base heights calculated by a virtual sensor

Post by d_l »

There is probably less error in the cloud's minimum base heights due to rounding than there is due to the relative humidity measurements. Note the variations/errors in relative humidity measurements may be due to the sensor's accuracy or due to air currents mixing in drier than is present locally. The net of all these factors is that sometimes actual cloud base heights are a few thousand or more feet higher than calculated.

Edit: Consider the computed cloud base height to be a minimum value. I live at the base of the Sierras and during wet weather, clouds routinely obscure the mountains and foothills at various heights. When these clouds occur, I can estimate their AGL heights and those estimates generally agree well with the computed cloud base values. See: https://www.tceweather.com/Mt._Rose_Liv ... Live5.html
Last edited by d_l on Tue Feb 09, 2021 11:54 pm, edited 1 time in total.

Challenger007
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Thu Feb 04, 2021 5:07 pm

Re: Plottable cloud base heights calculated by a virtual sensor

Post by Challenger007 »

Hmm, this is how it is. After all, the air is uneven, wet and dry streams are unevenly distributed. And this can really be a breeding ground for an incorrect weather forecast. In general, as I understand it, you need to take into account the error, or compare the data obtained in a certain period of time.

Post Reply