Cloud Height Graphic v2.1

Yes m8, set below to false

$getNOAAMetar = true; // get the METAR from NOAA for substituting cloud conditions at night (not required)

btw, me off bed now so i aint ignoring anyone… catcha tomoz…

As far as the cloud height difference I think WD adds your base height to the cloud height. So if your station is at 600 ft. the lowest cloud height would be 600 ft.
You can add your station elevation here:
$cldhgt = max(220,($curtemp-$dewp)/0.00802); In the original 220 is 0 and I believe the measurement is meters.

Im having some issues with this. I’ve uploaded all the graphic files to the right folders and tried the test links, but still a no go.

http://www.snoqualmieweather.com/scripts/cloud-base.php

As you can see, the graphic is in the right directory, but the script says it isnt.

Not sure what to post for some help. So if i need to post anything, Please let me know…Thanks.

nm

Ok tried this change below as my feet above sea level is 1,253 feet which in turn is 388 meters.
Putting 388 in place of the 220 did not change the feet.

Did it make a change to the cloud height?

No still stayed the same.

When I changed mine the cloud height went up.

Hi Rainer,
Thanks for the update, there is a minor issue with teh scale if AlwaysShowCloud is enabled … the scale is always showing 11,000 feet on a clear day when the calculated cloud is at say 1,500’ …

Cheers

I will try it again, In case the server is using a cache and will give it time to clear.

Ive been play with this and now have it matching very close to WD.

This is the formula:
$cldhgt = (203+($curtemp-$dewp)/0.00802);

203 is the height of my station. Just substitute yours.

now 203 for you is that feet or meters?
I tried meters 388, Feet would be 1253.

That is in meters.

Ok tried meters and feet in that area. No good then i started to just at random put numbers in there. 806 puts it 1 foot off from what Weather Display Live shows. that is as close as it will get. Will check it again tomorrow to see if they are still off by 1 or 2 feet or not.

All,

Not an expert but this works for me…

Without Sea Level
Graphic is stating 573ft for cloud height –
Code:
$cldhgt = max(0,($curtemp-$dewp)/0.00802);
12.7 degC - 11.3 degC / 0.00802 = 174.563 meters

Convert to feet
174.563 meters * 3.280 = 572.63 feet

To Add the Elevation from Sea Level
Graphic is stating 793ft for cloud height –
Code:
$cldhgt = max(0,($curtemp-$dewp)/0.00802 + 67.5);
12.7 degC - 11.3 degC / 0.00802 + 67.5 = 242.06 meters

Convert to feet
242.06 meters * 3.280 = 793.96 feet

Currently, this calcuation is very close to the WD calculation which is 811 ft. Brian must use a slightly different calculation. I’m curious to why the script doesn’t use the cloudheight from the clientraw file (clientraw #73) when not using the metar. Rainer probably has an answer for that since I’m not a PHP wiz.

Cheers,
Michael

Abaldish,

Look at the code, do you still have the $cldhgt = max(0,($curtemp-$dewp)/0.00802); ???
Weatherbee changed it to $cldhgt = (203+($curtemp-$dewp)/0.00802);
*Note that it is no longer a “max” instruction

Michael

read my above reply i have it set to $cldhgt = max(806,($curtemp-$dewp)/0.00802);

which is only about 1 foot off from WDL!

No need to shout…
Again, not a PHP wiz but your instruction

$cldhgt = max(806,($curtemp-$dewp)/0.00802);

this will compare 806 to the result of the calculation ($curtemp-$dewp)/0.00802) and return the higher of the two values
Source - PHP: max - Manual

If its 1 foot off your other source…then I guess I’m off base.

Michael

For the time being I made it exactly like WD by adding
$cldhgt = $data[73]/3.2808399;

Then I changed cloud height section to:

// determine cloud height
//$cldhgt = (203+($curtemp-$dewp)/0.00802);
if ($cldhgt<$reportMistAt)
$curcond = 'Misty, '.$curcond;

It then will match WD

Sorry if you think i was shouting, Just did the WDL as in Weather Display Live lol.

But me changing to what i said is off.

Thanks Bee…I just changed mine.