BT's Global Sager Cloudcaster PHP Scripts For CumulusMX
by "Buford T. Justice" / "BTJustice"
Modifed by Bridgeman Carney to capture cloud type and elevation from METAR data. March 11 2023.
https://cumulus.hosiene.co.uk/viewtopic.php?p=81348#p81348
$ms
2020-12-12

You may redistribute and use these PHP Scripts any way you wish as long as they remain FREE and money is not charged for their use directly or indirectly.  If these PHP Scripts are used in your work or are modified in any way, please retain the full credit header.

The variables shown here come from bt-sager-cu.php and bt-sager-wc.php.  Combined, these determine the correct Sager Weathercaster forecast.

12-24 Hour Forecast:
document.write ('Cloud layer 1 = Overcast, low clouds @ 1,000-ft

');
Cloud layer 1 = Overcast, low clouds @ 1,000-ft

document.write ('Increasing cloudiness or overcast possibly followed by rain or showers; Moderate to Fresh Breeze (13-24 mph) Northeast or East winds.');Increasing cloudiness or overcast possibly followed by rain or showers; Moderate to Fresh Breeze (13-24 mph) Northeast or East winds. : G434

METAR station (ms) used to determine Present Weather (pw) based on the Cloud Code (m1).  If the METAR indicates Precipitation (m2) or Cumulus has reported Rain in the last 30 minutes (rm), (pw) becomes Precipitation regardless of (m1):
currcond = Increasing cloudiness or overcast possibly followed by rain or showers; Moderate to Fresh Breeze (13-24 mph) Northeast or East winds.
MS_airport_code = KOXR
cldkey00 = 6
metar = AUTO 08006KT 8SM OVC010 14/13 A2985
metar2 = AUTO 08006KT 8SM OVC010 14/13 A2985
cURL_error_message =
sd = G434
d1 = G
d2 = 4
d3 = 3
d4 = 4
cdata = Array
cresult = Array
m11 =
m111 =
m1111 =
mX = OVC
m1 = OVC
m2 = No Precipitation
m3 =
m4 = /
m5 = A
cloudgold = Array
cloudgold[0] = OVC
cloudgold[1] =
cloudgold[2] =
cloudgold[3] =
cloudgold[4] =
cloudgold2[0] = 10
cloudgold2[1] =
cloudgold2[2] =
cloudgold2[3] =
cloudgold2[4] =
mx1 = Overcast, low clouds
mx2 =
mx3 =
mx4 =
mx5 =
m1elevS =
m1elev = 1000
m2elev = 0
m3elev = 0
m4elev =
m5elev =
MX1final = Cloud layer 1 = Overcast, low clouds @ 1,000-ft
MX2final =
MX3final =
MX4final =
MX5final =
FC = Cloud layer 1 = Overcast, low clouds @ 1,000-ft


CCodes = Array