Notice: Undefined offset: 1 in /home/portan24/public_html/weather28/metar/wsMetarTxt.php on line 81

Notice: Undefined offset: 1 in /home/portan24/public_html/weather28/metar/wsMetarTxt.php on line 87

Notice: Array to string conversion in /home/portan24/public_html/weather28/metar/wsMetarTxt.php on line 92

Northport NY Webcam more information Northport NY Webcam


Visit our other weather sites:

Template documentation
and downloads

And another site



Display key values and files

scriptsWD/testtags.txt - dated: Sep 7 2017 1:44 pm

    1 | <?php
    2 | #-----------------------------------------------------------------------
    3 | # display source of script if requested so
    4 | #-----------------------------------------------------------------------
    5 | if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
    6 |    $filenameReal = __FILE__;
    7 |    $download_size = filesize($filenameReal);
    8 |    header('Pragma: public');
    9 |    header('Cache-Control: private');
   10 |    header('Cache-Control: no-cache, must-revalidate');
   11 |    header("Content-type: text/plain");
   12 |    header("Accept-Ranges: bytes");
   13 |    header("Content-Length: $download_size");
   14 |    header('Connection: close');
   15 |    readfile($filenameReal);
   16 |    exit;
   17 | }
   18 | $pageName	= 'testtags.php';
   19 | if (!isset($SITE)){echo "<h3>invalid call to script $pageName</h3>";exit;}
   20 | $pageVersion	= '2.6 2014-10-10 11:55:45 ';
   21 | $SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
   22 | $pageFile = basename(__FILE__);			// check to see this is the real script
   23 | if ($pageFile <> $pageName) {$SITE['wsModules'][$pageFile]	= 'this file loaded instead of '.$pageName;}
   24 | echo '<!-- module '.$pageFile.' ==== '.$SITE['wsModules'][$pageFile]." -->".PHP_EOL;
   25 | #-----------------------------------------------------------------------
   26 | # 3.00 2014-09-22 release version 3.01 added ET conversion
   27 | # --------------------------------------- version ----------------------
   28 | $ws['tags.php']		= $pageName.'-'.$pageVersion;
   29 | # --------------------------------------- conditions--------------------
   30 | $weathercond 		= '%weathercond%';
   31 | $ws['wdCurCond'] 	= '%Currentsolardescription%';
   32 | $ws['wdCurIcon']	= '%iconnumber%';			// Current icon number
   33 | $ws['wdMetarCcn']	= '%weatherreport%';		// Current weather conditions from selected METAR
   34 | $ws['wdMetarCld']	= '%metarcloudreport%';		// Cloud METAR label from the metargif
   35 | # ------------------------------------------ units ---------------------
   36 | $wdDist 	= '%uomdistance%'; 	// = 'mi','km'  (for windrun variables)
   37 | # ------------------------------------------- date - time --------------
   38 | $wdDatefmt 	= '%datefmt%'; 		//  = 'd/m/y', 'm/d/y'
   39 | $wdSeconds	= '00';
   40 | $wdMinute 	= '%time-minute%';	// Current minute '20'
   41 | $wdHour 	= '%time-hour%';	// Current hour '17'
   42 | $wdDay 		= '%date-day%';		// Current day  '15'
   43 | $wdMonth 	= '%date-month%';	// Current month '06'
   44 | $wdYear 	= '%date-year%';	// Current year '2012'
   45 | $ymd		= (string) $wdYear.$wdMonth.$wdDay;   // 
   46 | $ws['actTime']	= (string) $ymd.$wdHour.$wdMinute.$wdSeconds; // '20120523113945';
   47 | # ------------------------------------------ temperature ---------------
   48 | $to 	= $SITE['uomTemp'];
   49 | $from	= '%uomtemp%'; 		//  = 'C', 'F',  (or  '°C', '°F', or '°C', '°F' )
   50 | 
   51 | $ws['tempMinTodayTime']	= wdDate('%mintempt%');
   52 | $ws['tempMinYdayTime']	= wdDate('%mintempyestt%');
   53 | $ws['tempMinMonthTime']	= wdYMD('%mrecordlowtempyear%','%mrecordlowtempmonth%','%mrecordlowtempday%');
   54 | $ws['tempMinYearTime']	= wdYMD('%yrecordlowtempyear%','%yrecordlowtempmonth%','%yrecordlowtempday%');
   55 | $ws['tempMaxTodayTime']	= wdDate('%maxtempt%'); 
   56 | $ws['tempMaxYdayTime']	= wdDate('%maxtempyestt%'); //yday
   57 | $ws['tempMaxMonthTime']	= wdYMD('%mrecordhightempyear%','%mrecordhightempmonth%','%mrecordhightempday%');
   58 | $ws['tempMaxYearTime']	= wdYMD('%yrecordhightempyear%','%yrecordhightempmonth%','%yrecordhightempday%');
   59 | $ws['dewpMinTodayTime']	= wdDate('%mindewt%');
   60 | $ws['dewpMinYdayTime']	= wdDate('%mindewyestt%'); //yday
   61 | $ws['dewpMaxTodayTime']	= wdDate('%maxdewt%');
   62 | $ws['dewpMaxYdayTime']	= wdDate('%maxdewyestt%');  // yday
   63 | $ws['heatMaxTodayTime']	= wdDate('%maxheatt%');
   64 | $ws['heatMaxYdayTime']	= wdDate('%maxheatyestt%');
   65 | $ws['heatMaxMonthTime']	= wdYMD('%mrecordhighheatindexyear%','%mrecordhighheatindexmonth%','%mrecordhighheatindexday%');
   66 | $ws['heatMaxYearTime']	= wdYMD('%yrecordhighheatindexyear%','%yrecordhighheatindexmonth%','%yrecordhighheatindexday%');
   67 | $ws['chilMinTodayTime']	= wdDate('%minwindcht%');
   68 | $ws['chilMinYdayTime']	= wdDate('%minchillyestt%'); // yday
   69 | $ws['chilMinMonthTime'] = wdYMD('%mrecordlowchillyear%','%mrecordlowchillmonth%','%mrecordlowchillday%','12','00');
   70 | $ws['chilMinYearTime']	= wdYMD('%yrecordlowchillyear%','%yrecordlowchillmonth%','%yrecordlowchillday%','12','00'); 
   71 | 
   72 | $ws['tempAct']		= wsConvertTemperature('%temp%', $from);  // convert and clean of units
   73 | $ws['tempActInside']	= wsConvertTemperature('%indoortemp%', $from);
   74 | $ws['tempActExtra1']	= wsConvertTemperature('%none%', $from);	
   75 | $ws['tempDelta']	= wsConvertTemperature('%tempchangelasthourmetric%', $from);	
   76 | $ws['tempToday']	= wsConvertTemperature('%avtempsincemidnight%', $from);
   77 | $ws['tempMinToday']	= wsConvertTemperature('%mintemp%', $from);
   78 | $ws['tempMinYday']	= wsConvertTemperature('%mintempyest%', $from);
   79 | $ws['tempMinMonth']	= wsConvertTemperature('%mrecordlowtemp%', $from);
   80 | $ws['tempMinYear']	= wsConvertTemperature('%yrecordlowtemp%', $from);
   81 | $ws['tempMaxToday']	= wsConvertTemperature('%maxtemp%', $from);
   82 | $ws['tempMaxYday']	= wsConvertTemperature('%maxtempyest%', $from);
   83 | $ws['tempMaxMonth']	= wsConvertTemperature('%mrecordhightemp%', $from);
   84 | $ws['tempMaxYear']	= wsConvertTemperature('%yrecordhightemp%', $from);
   85 | 
   86 | $ws['dewpAct']  	= wsConvertTemperature('%dew%', $from);
   87 | $ws['dewpDelta']	= wsConvertTemperature('%dewchangelasthour%', $from);
   88 | $ws['dewpMinToday']  	= wsConvertTemperature('%mindew%', $from);
   89 | $ws['dewpMinYday']  	= wsConvertTemperature('%mindewyest%', $from);
   90 | $ws['dewpMaxToday']  	= wsConvertTemperature('%maxdew%', $from);
   91 | $ws['dewpMaxYday']  	= wsConvertTemperature('%maxdewyest%', $from);
   92 | 
   93 | $ws['heatAct']  	= wsConvertTemperature('%heati%', $from);
   94 | $ws['heatDelta']	= 0;
   95 | $ws['heatMaxToday']	= wsConvertTemperature('%maxheat%', $from);
   96 | $ws['heatMaxYday']	= wsConvertTemperature('%maxheatyest%', $from);
   97 | $ws['heatMaxMonth']	= wsConvertTemperature('%mrecordhighheatindex%', $from);
   98 | $ws['heatMaxYear']	= wsConvertTemperature('%yrecordhighheatindex%', $from);
   99 | 	
  100 | $ws['chilAct']		= wsConvertTemperature('%windch%', $from);
  101 | $ws['chilDelta']	= 0;
  102 | $ws['chilMinToday']	= wsConvertTemperature('%minwindch%', $from);
  103 | $ws['chilMinYday']	= wsConvertTemperature('%minchillyest%', $from);
  104 | $ws['chilMinMonth']	= wsConvertTemperature('%mrecordlowchill%', $from);
  105 | $ws['chilMinYear']	= wsConvertTemperature('%yrecordlowchill%', $from);
  106 | 
  107 | $ws['hudxAct'] 		= wsConvertTemperature('%humidexcelsius%', 'C');
  108 | $ws['hudxDelta'] 	= 0;
  109 | $ws['hudxMaxToday'] 	= wsConvertTemperature('%todayhihumidex%',  'C');
  110 | 
  111 | # ------------------------------------------ extreme temp   ------------
  112 | $ws['daysXHigh']	= '%daysTmax>30C%';
  113 | $ws['daysHigh']		= '%daysTmax>25C%';
  114 | $ws['daysLow']		= '%daysTmin<0C%';
  115 | $ws['daysXLow']		= '%daysTmin<-15C%';
  116 | # ------------------------------------------ pressure / baro -----------
  117 | $to 	= $SITE['uomBaro'];
  118 | $from	= '%uombaro%'; 		//  = 'inHg', 'hPa', 'kPa', 'mb'
  119 | 
  120 | $ws['baroMinTodayTime']	= wdDate('%lowbarot%');
  121 | $ws['baroMinYdayTime']	= wdDate('%minbaroyestt%'); // ytd
  122 | $ws['baroMinMonthTime']	= wdYMD('%mrecordlowbaroyear%','%mrecordlowbaromonth%','%mrecordlowbaroday%');
  123 | $ws['baroMinYearTime']	= wdYMD('%yrecordlowbaroyear%','%yrecordlowbaromonth%','%yrecordlowbaroday%');
  124 | $ws['baroMaxTodayTime']	= wdDate('%highbarot%');
  125 | $ws['baroMaxYdayTime']	= wdDate('%maxbaroyestt%');  // ytd
  126 | $ws['baroMaxMonthTime']	= wdYMD('%mrecordhighbaroyear%','%mrecordhighbaromonth%','%mrecordhighbaroday%');
  127 | $ws['baroMaxYearTime']	= wdYMD('%yrecordhighbaroyear%','%yrecordhighbaromonth%','%yrecordhighbaroday%');
  128 | 
  129 | $ws['baroAct'] 		= wsConvertBaro('%baro%', $from);
  130 | $ws['baroDelta']	= wsConvertBaro('%trend%', $from);
  131 | $ws['baroMinToday']	= wsConvertBaro('%lowbaro%', $from);
  132 | $ws['baroMinYday']	= wsConvertBaro('%minbaroyest%', $from);
  133 | $ws['baroMinMonth']	= wsConvertBaro('%mrecordlowbaro%', $from);
  134 | $ws['baroMinYear'] 	= wsConvertBaro('%yrecordlowbaro%', $from);	
  135 | $ws['baroMaxToday']	= wsConvertBaro('%highbaro%', $from);
  136 | $ws['baroMaxYday']	= wsConvertBaro('%maxbaroyest%', $from);
  137 | $ws['baroMaxMonth']	= wsConvertBaro('%mrecordhighbaro%', $from);
  138 | $ws['baroMaxYear'] 	= wsConvertBaro('%yrecordhighbaro%', $from);
  139 | 
  140 | # ------------------------------------------ humidity  -----------------
  141 | $ws['humiMinTodayTime ']= wdDate('%lowhumt%');
  142 | $ws['humiMinYdayTime ']	= wdDate('%minhumyestt%');   // ytd
  143 | $ws['humiMaxTodayTime'] = wdDate('%highhumt%');
  144 | $ws['humiMaxYdayTime'] 	= wdDate('%maxhumyestt%');   // ytd
  145 | 
  146 | $ws['humiAct']		= '%hum%'*1.0;
  147 | $ws['humiExtra']	= '%none%'*1.0;
  148 | $ws['humiDelta']	= '%humchangelasthour%'*1.0;
  149 | $ws['humiMinToday'] 	= '%lowhum%'*1.0;
  150 | $ws['humiMinYday'] 	= '%minhumyest%'*1.0;
  151 | $ws['humiMaxToday']	= '%highhum%'*1.0;
  152 | $ws['humiMaxYday']	= '%maxhumyest%'*1.0;
  153 | 
  154 | # ------------------------------------------ rain  ---------------------
  155 | $to 	= $SITE['uomRain'];
  156 | $from	= '%uomrain%'; 		//  = 'mm', 'in'
  157 | 
  158 | $ws['rainDayMnth'] 	= '%dayswithrain%';  	// %dayswithrain% 		Days with rain for the month
  159 | $ws['rainDayYear'] 	= '%dayswithrainyear%';	// %dayswithrainyear%	Days with rain for the year
  160 | 
  161 | $ws['rainRateAct'] 	= wsConvertRainfall('%currentrainrate%', $from);
  162 | $ws['rainRateToday'] 	= wsConvertRainfall('%maxrainrate%', $from);		
  163 | $ws['rainHour']		= wsConvertRainfall('%hourrn%', $from);
  164 | $ws['rainToday']	= wsConvertRainfall('%dayrn%', $from);
  165 | $ws['rainYday']		= wsConvertRainfall('%ystdyrain%', $from);
  166 | $ws['rainMonth']	= wsConvertRainfall('%monthrn%', $from);
  167 | $ws['rainYear']		= wsConvertRainfall('%yearrn%', $from);
  168 | $ws['rainDaysWithNo']	= '%dayswithnorain%';
  169 | $ws['rainWeek']		= wsConvertRainfall('%raincurrentweek%', $from);
  170 | # ------------------------------------------ EVAPOTRANSPIRATION --------
  171 | $ws['etToday'] 		= wsConvertRainfall('%VPet%', $from);
  172 | $ws['etYday'] 		= wsConvertRainfall('%yesterdaydaviset%', $from);
  173 | $ws['etMonth'] 		= wsConvertRainfall('%VPetmonth%', $from);
  174 | 
  175 | # ------------------------------------------ wind  ---------------------
  176 | $to 	= $SITE['uomWind'];
  177 | $from	= '%uomwind%'; 		//  = 'kts','mph','kmh','km/h','m/s','Bft'
  178 | 
  179 | $ws['windActDsc']	= '%dirlabel%';
  180 | $ws['windBeafort']	= '%beaufortnum%';
  181 | $ws['gustMaxTodayTime']	= wdDate('%maxgstt%');
  182 | $ws['gustMaxYdayTime']	= wdDate('%maxgustyestt%');
  183 | $ws['gustMaxMonthTime']	= wdYMD('%mrecordhighgustyear%','%mrecordhighgustmonth%','%mrecordhighgustday%');
  184 | $ws['gustMaxYearTime']	= wdYMD('%yrecordhighgustyear%','%yrecordhighgustmonth%','%yrecordhighgustday%');
  185 | 
  186 | $ws['windAct']		= wsConvertWindspeed('%avgspd%', $from);
  187 | $ws['gustAct']		= wsConvertWindspeed('%gstspd%', $from);
  188 | $ws['gustMaxHour']	= wsConvertWindspeed('%maxgsthr%', $from);	
  189 | $ws['gustMaxToday']	= wsConvertWindspeed('%maxgst%', $from);
  190 | $ws['gustMaxYday']	= wsConvertWindspeed('%maxgustyestnodir%', $from); 
  191 | $ws['gustMaxMonth']	= wsConvertWindspeed('%mrecordwindgust%', $from);
  192 | $ws['gustMaxYear']	= wsConvertWindspeed('%yrecordwindgust%', $from);	
  193 | 
  194 | if ($ws['gustAct'] <= $ws['windAct'])	{$ws['gustAct'] = $ws['windAct'];}
  195 | # ------------------------------------------  UV   ---------------------
  196 | $ws['uvMaxTodayTime'] 	= wdDate('%highuvtime%');
  197 | $ws['uvMaxYdayTime'] 	= wdDate('%highuvyesttime%');
  198 | $ws['uvMaxMonthTime'] 	= wdYMD('%mrecordhighuvyear%','%mrecordhighuvmonth%','%mrecordhighuvday%');
  199 | $ws['uvMaxYearTime'] 	= wdYMD('%yrecordhighuvyear%','%yrecordhighuvmonth%','%yrecordhighuvday%');
  200 | 
  201 | $ws['uvAct']		= '%VPuv%';
  202 | $ws['uvMaxToday']	= '%highuv%';
  203 | $ws['uvMaxYday']	= '%highuvyest%';
  204 | $ws['uvMaxMonth']	= '%mrecordhighuv%';
  205 | $ws['uvMaxYear']	= '%yrecordhighuv%';
  206 | # ------------------------------------------ Solar  --------------------
  207 | $ws['solarMaxTodayTime']= wdDate('%highsolartime%');
  208 | $ws['solarMaxYdayTime'] = wdDate('%highsolaryesttime%');
  209 | $ws['solarMaxMonthTime']= wdYMD('%mrecordhighsolaryear%','%mrecordhighsolarmonth%','%mrecordhighsolarday%');
  210 | $ws['solarMaxYearTime'] = wdYMD('%yrecordhighsolaryear%','%yrecordhighsolarmonth%','%yrecordhighsolarday%');
  211 | 
  212 | $ws['solarAct']		= '%VPsolar%'*1.0;
  213 | $ws['solActPerc']	= '%currentsolarpctplain%';
  214 | $ws['solarMaxToday']	= '%highsolar%';
  215 | $ws['solarMaxYday']	= '%highsolaryest%';
  216 | $ws['solarMaxMonth']	= '%mrecordhighsolar%';
  217 | $ws['solarMaxYear']	= '%yrecordhighsolar%';
  218 | # ------------------------------------------ cloud height --------------
  219 | $to	= $SITE['uomHeight'];
  220 | $from	= 'ft';
  221 | 
  222 | $ws['cloudHeight']	= wsConvertDistance('%cloudheightfeet%',$from);
  223 | # ------------------------------------------ forecasts -----------------
  224 | $ws['fcstWD'] 	  	= '%iconnumber%';
  225 | $ws['fcstTxt'] 	        = str_replace('_',' ','%vpforecasttext%');
  226 | 
  227 | # ------------------------------------------ sun and moon --------------
  228 | $ws['sunrise']		= date($SITE['timeOnlyFormat'],strtotime('%sunrise%'));
  229 | $ws['sunset']		= date($SITE['timeOnlyFormat'],strtotime('%sunset%'));
  230 | $ws['moonrise']		= date($SITE['timeOnlyFormat'],strtotime('%moonrise%'));
  231 | $ws['moonset']		= date($SITE['timeOnlyFormat'],strtotime('%moonset%'));
  232 | $ws['lunarPhasePerc']	= '%moonphase%'*1.0;
  233 | $ws['lunarAge']		= substr('%moonage%', 9, 3); // %moonphasename% %moonlunation% 
  234 | # ------------------------------------------ some more -----------------
  235 | $ws['wsVersion']	= 'version %wdversion% b %wdbuild%';
  236 | $ws['wsHardware'] 	= '';   // unknown
  237 | $ws['wsUptime']		= '%windowsuptime%';
  238 | 
  239 | if (!isset ($wsTrends)){$wsTrends = array() ;}
  240 | $i=0;
  241 | $wsTrends[$i] ['min']	= 0;
  242 | $wsTrends[$i] ['temp']	= '%temp0minuteago%';
  243 | $wsTrends[$i] ['wind']	= '%wind0minuteago%';
  244 | $wsTrends[$i] ['gust']	= '%gust0minuteago%';
  245 | $wsTrends[$i] ['dir']	= langtransstr('%dir0minuteago%');
  246 | $wsTrends[$i] ['hum']	= '%hum0minuteago%';
  247 | $wsTrends[$i] ['dew']	= '%dew0minuteago%';
  248 | $wsTrends[$i] ['baro']	= '%baro0minuteago%';
  249 | $wsTrends[$i] ['rain']	= '%rain0minuteago%';
  250 | $wsTrends[$i] ['sol']	= '%VPsolar0minuteago%';
  251 | $wsTrends[$i] ['uv']	= '%VPuv0minuteago%';
  252 | $i=1;
  253 | $wsTrends[$i] ['min']	= 5;
  254 | $wsTrends[$i] ['temp']	= '%temp5minuteago%';
  255 | $wsTrends[$i] ['wind']	= '%wind5minuteago%';
  256 | $wsTrends[$i] ['gust']	= '%gust5minuteago%';
  257 | $wsTrends[$i] ['dir']	= langtransstr('%dir5minuteago%');
  258 | $wsTrends[$i] ['hum']	= '%hum5minuteago%';
  259 | $wsTrends[$i] ['dew']	= '%dew5minuteago%';
  260 | $wsTrends[$i] ['baro']	= '%baro5minuteago%';
  261 | $wsTrends[$i] ['rain']	= '%rain5minuteago%';
  262 | $wsTrends[$i] ['sol']	= '%VPsolar5minuteago%';
  263 | $wsTrends[$i] ['uv']	= '%VPuv5minuteago%';
  264 | $i=2;
  265 | $wsTrends[$i] ['min']	= 10;
  266 | $wsTrends[$i] ['temp']	= '%temp10minuteago%';
  267 | $wsTrends[$i] ['wind']	= '%wind10minuteago%';
  268 | $wsTrends[$i] ['gust']	= '%gust10minuteago%';
  269 | $wsTrends[$i] ['dir']	= langtransstr('%dir10minuteago%');
  270 | $wsTrends[$i] ['hum']	= '%hum10minuteago%';
  271 | $wsTrends[$i] ['dew']	= '%dew10minuteago%';
  272 | $wsTrends[$i] ['baro']	= '%baro10minuteago%';
  273 | $wsTrends[$i] ['rain']	= '%rain10minuteago%';
  274 | $wsTrends[$i] ['sol']	= '%VPsolar10minuteago%';
  275 | $wsTrends[$i] ['uv']	= '%VPuv10minuteago%';
  276 | $i=3;
  277 | $wsTrends[$i] ['min']	= 15;
  278 | $wsTrends[$i] ['temp']	= '%temp15minuteago%';
  279 | $wsTrends[$i] ['wind']	= '%wind15minuteago%';
  280 | $wsTrends[$i] ['gust']	= '%gust15minuteago%';
  281 | $wsTrends[$i] ['dir']	= langtransstr('%dir15minuteago%');
  282 | $wsTrends[$i] ['hum']	= '%hum15minuteago%';
  283 | $wsTrends[$i] ['dew']	= '%dew15minuteago%';
  284 | $wsTrends[$i] ['baro']	= '%baro15minuteago%';
  285 | $wsTrends[$i] ['rain']	= '%rain15minuteago%';
  286 | $wsTrends[$i] ['sol']	= '%VPsolar15minuteago%';
  287 | $wsTrends[$i] ['uv']	= '%VPuv15minuteago%';
  288 | $i=4;
  289 | $wsTrends[$i] ['min']	= 20;
  290 | $wsTrends[$i] ['temp']	= '%temp20minuteago%';
  291 | $wsTrends[$i] ['wind']	= '%wind20minuteago%';
  292 | $wsTrends[$i] ['gust']	= '%gust20minuteago%';
  293 | $wsTrends[$i] ['dir']	= langtransstr('%dir20minuteago%');
  294 | $wsTrends[$i] ['hum']	= '%hum20minuteago%';
  295 | $wsTrends[$i] ['dew']	= '%dew20minuteago%';
  296 | $wsTrends[$i] ['baro']	= '%baro20minuteago%';
  297 | $wsTrends[$i] ['rain']	= '%rain20minuteago%';
  298 | $wsTrends[$i] ['sol']	= '%VPsolar20minuteago%';
  299 | $wsTrends[$i] ['uv']	= '%VPuv20minuteago%';
  300 | $i=5;
  301 | $wsTrends[$i] ['min']	= 30;
  302 | $wsTrends[$i] ['temp']	= '%temp30minuteago%';
  303 | $wsTrends[$i] ['wind']	= '%wind30minuteago%';
  304 | $wsTrends[$i] ['gust']	= '%gust30minuteago%';
  305 | $wsTrends[$i] ['dir']	= langtransstr('%dir30minuteago%');
  306 | $wsTrends[$i] ['hum']	= '%hum30minuteago%';
  307 | $wsTrends[$i] ['dew']	= '%dew30minuteago%';
  308 | $wsTrends[$i] ['baro']	= '%baro30minuteago%';
  309 | $wsTrends[$i] ['rain']	= '%rain30minuteago%';
  310 | $wsTrends[$i] ['sol']	= '%VPsolar30minuteago%';
  311 | $wsTrends[$i] ['uv']	= '%VPuv30minuteago%';
  312 | $i=6;
  313 | $wsTrends[$i] ['min']	= 45;
  314 | $wsTrends[$i] ['temp']	= '%temp45minuteago%';
  315 | $wsTrends[$i] ['wind']	= '%wind45minuteago%';
  316 | $wsTrends[$i] ['gust']	= '%gust45minuteago%';
  317 | $wsTrends[$i] ['dir']	= langtransstr('%dir45minuteago%');
  318 | $wsTrends[$i] ['hum']	= '%hum45minuteago%';
  319 | $wsTrends[$i] ['dew']	= '%dew45minuteago%';
  320 | $wsTrends[$i] ['baro']	= '%baro45minuteago%';
  321 | $wsTrends[$i] ['rain']	= '%rain45minuteago%';
  322 | $wsTrends[$i] ['sol']	= '%VPsolar45minuteago%';
  323 | $wsTrends[$i] ['uv']	= '%VPuv45minuteago%';
  324 | $i=7;
  325 | $wsTrends[$i] ['min']	= 60;
  326 | $wsTrends[$i] ['temp']	= '%temp60minuteago%';
  327 | $wsTrends[$i] ['wind']	= '%wind60minuteago%';
  328 | $wsTrends[$i] ['gust']	= '%gust60minuteago%';
  329 | $wsTrends[$i] ['dir']	= langtransstr('%dir60minuteago%');
  330 | $wsTrends[$i] ['hum']	= '%hum60minuteago%';
  331 | $wsTrends[$i] ['dew']	= '%dew60minuteago%';
  332 | $wsTrends[$i] ['baro']	= '%baro60minuteago%';
  333 | $wsTrends[$i] ['rain']	= '%rain60minuteago%';
  334 | $wsTrends[$i] ['sol']	= '%VPsolar60minuteago%';
  335 | $wsTrends[$i] ['uv']	= '%VPuv60minuteago%';
  336 | $i=8;
  337 | $wsTrends[$i] ['min']	= 75;
  338 | $wsTrends[$i] ['temp']	= '%temp75minuteago%';
  339 | $wsTrends[$i] ['wind']	= '%wind75minuteago%';
  340 | $wsTrends[$i] ['gust']	= '%gust75minuteago%';
  341 | $wsTrends[$i] ['dir']	= langtransstr('%dir75minuteago%');
  342 | $wsTrends[$i] ['hum']	= '%hum75minuteago%';
  343 | $wsTrends[$i] ['dew']	= '%dew75minuteago%';
  344 | $wsTrends[$i] ['baro']	= '%baro75minuteago%';
  345 | $wsTrends[$i] ['rain']	= '%rain75minuteago%';
  346 | $wsTrends[$i] ['sol']	= '%VPsolar75minuteago%';
  347 | $wsTrends[$i] ['uv']	= '%VPuv75minuteago%';
  348 | $i=9;
  349 | $wsTrends[$i] ['min']	= 90;
  350 | $wsTrends[$i] ['temp']	= '%temp90minuteago%';
  351 | $wsTrends[$i] ['wind']	= '%wind90minuteago%';
  352 | $wsTrends[$i] ['gust']	= '%gust90minuteago%';
  353 | $wsTrends[$i] ['dir']	= langtransstr('%dir90minuteago%');
  354 | $wsTrends[$i] ['hum']	= '%hum90minuteago%';
  355 | $wsTrends[$i] ['dew']	= '%dew90minuteago%';
  356 | $wsTrends[$i] ['baro']	= '%baro90minuteago%';
  357 | $wsTrends[$i] ['rain']	= '%rain90minuteago%';
  358 | $wsTrends[$i] ['sol']	= '%VPsolar90minuteago%';
  359 | $wsTrends[$i] ['uv']	= '%VPuv90minuteago%';
  360 | $i=10;
  361 | $wsTrends[$i] ['min']	= 105;
  362 | $wsTrends[$i] ['temp']	= '%temp105minuteago%';
  363 | $wsTrends[$i] ['wind']	= '%wind105minuteago%';
  364 | $wsTrends[$i] ['gust']	= '%gust105minuteago%';
  365 | $wsTrends[$i] ['dir']	= langtransstr('%dir105minuteago%');
  366 | $wsTrends[$i] ['hum']	= '%hum105minuteago%';
  367 | $wsTrends[$i] ['dew']	= '%dew105minuteago%';
  368 | $wsTrends[$i] ['baro']	= '%baro105minuteago%';
  369 | $wsTrends[$i] ['rain']	= '%rain105minuteago%';
  370 | $wsTrends[$i] ['sol']	= '%VPsolar105minuteago%';
  371 | $wsTrends[$i] ['uv']	= '%VPuv105minuteago%';
  372 | $i=11;
  373 | $wsTrends[$i] ['min']	= 120;
  374 | $wsTrends[$i] ['temp']	= '%temp120minuteago%';
  375 | $wsTrends[$i] ['wind']	= '%wind120minuteago%';
  376 | $wsTrends[$i] ['gust']	= '%gust120minuteago%';
  377 | $wsTrends[$i] ['dir']	= langtransstr('%dir120minuteago%');
  378 | $wsTrends[$i] ['hum']	= '%hum120minuteago%';
  379 | $wsTrends[$i] ['dew']	= '%dew120minuteago%';
  380 | $wsTrends[$i] ['baro']	= '%baro120minuteago%';
  381 | $wsTrends[$i] ['rain']	= '%rain120minuteago%';
  382 | $wsTrends[$i] ['sol']	= '%VPsolar120minuteago%';
  383 | $wsTrends[$i] ['uv']	= '%VPuv120minuteago%';
  384 | 
  385 | #--------------------- soil leaf measurement ---------------------------
  386 | $to 	= $SITE['uomTemp'];
  387 | $from	= '%uomtemp%'; 		//  = 'C', 'F',  (or  '°C', '°F', or '°C', '°F' )
  388 | 
  389 | # Temp sensor 1 actual value
  390 | $ws['soilTempAct'][1]		= wsConvertTemperature('%soiltemp%', $from);  // convert and clean of units
  391 | # Temp sensor 1 maximum value for today month and year
  392 | $ws['soilTempMaxToday'][1]	= wsConvertTemperature('%maxsoiltemp%', $from);
  393 | $ws['soilTempMaxMonth'][1]	= wsConvertTemperature('%mrecordhighsoil%', $from);
  394 | $ws['soilTempMaxMonthTime'][1]	= wdYMD('%mrecordhighsoilyear%','%mrecordhighsoilmonth%','%mrecordhighsoilday%');
  395 | $ws['soilTempMaxYear'][1]	= wsConvertTemperature('%yrecordhighsoil%', $from);
  396 | $ws['soilTempMaxYearTime'][1]	= wdYMD('%yrecordhighsoilyear%','%yrecordhighsoilmonth%','%yrecordhighsoilday%');
  397 | $ws['soilTempMaxAlltime'][1]	= wsConvertTemperature('%recordhighsoil%', $from);
  398 | $ws['soilTempMaxAlltimeTime'][1]= wdYMD('%recordhighsoilyear%','%recordhighsoilmonth%','%recordhighsoilday%');
  399 | # Temp sensor 1 minimum value for today month and year
  400 | $ws['soilTempMinToday'][1]	= wsConvertTemperature('%minsoiltemp%', $from);
  401 | $ws['soilTempMinMonth'][1]	= wsConvertTemperature('%mrecordlowsoil%', $from);
  402 | $ws['soilTempMinMonthTime'][1]	= wdYMD('%mrecordlowsoilyear%','%mrecordlowsoilmonth%','%mrecordlowsoilday%');
  403 | $ws['soilTempMinYear'][1]	= wsConvertTemperature('%yrecordlowsoil%', $from);
  404 | $ws['soilTempMinYearTime'][1]	= wdYMD('%yrecordlowsoilyear%','%yrecordlowsoilmonth%','%yrecordlowsoilday%');
  405 | $ws['soilTempMinAlltime'][1]	= wsConvertTemperature('%recordlowsoil%', $from);
  406 | $ws['soilTempMinAlltimeTime'][1]= wdYMD('%recordlowsoilyear%','%recordlowsoilmonth%','%recordlowsoilday%');
  407 | # Temp sensor 2 actual value & Values and time for  min and max  for today - month and year 
  408 | $ws['soilTempAct'][2]		= wsConvertTemperature('%VPsoiltemp2%', $from);  // convert and clean of units
  409 | $ws['soilTempMaxToday'][2]	= wsConvertTemperature('%hiVPsoiltemp2%', $from);
  410 | $ws['soilTempMaxMonth'][2]	= wsConvertTemperature('%mrecordhighsoil2%', $from);
  411 | $ws['soilTempMaxMonthTime'][2]	= wdYMD('%mrecordhighsoilyear2%','%mrecordhighsoilmonth2%','%mrecordhighsoilday2%');
  412 | $ws['soilTempMaxYear'][2]	= wsConvertTemperature('%yrecordhighsoil2%', $from);
  413 | $ws['soilTempMaxYearTime'][2]	= wdYMD('%yrecordhighsoilyear2%','%yrecordhighsoilmonth2%','%yrecordhighsoilday2%');
  414 | $ws['soilTempMaxAlltime'][2]	= wsConvertTemperature('%recordhighsoil2%', $from);
  415 | $ws['soilTempMaxAlltimeTime'][2]= wdYMD('%recordhighsoilyear2%','%recordhighsoilmonth2%','%recordhighsoilday2%');
  416 | $ws['soilTempMinToday'][2]	= wsConvertTemperature('%loVPsoiltemp2%', $from);
  417 | $ws['soilTempMinMonth'][2]	= wsConvertTemperature('%mrecordlowsoil2%', $from);
  418 | $ws['soilTempMinMonthTime'][2]	= wdYMD('%mrecordlowsoilyear2%','%mrecordlowsoilmonth2%','%mrecordlowsoilday2%');
  419 | $ws['soilTempMinYear'][2]	= wsConvertTemperature('%yrecordlowsoil2%', $from);
  420 | $ws['soilTempMinYearTime'][2]	= wdYMD('%yrecordlowsoilyear2%','%yrecordlowsoilmonth2%','%yrecordlowsoilday2%');
  421 | $ws['soilTempMinAlltime'][2]	= wsConvertTemperature('%recordlowsoil2%', $from);
  422 | $ws['soilTempMinAlltimeTime'][2]= wdYMD('%recordlowsoilyear2%','%recordlowsoilmonth2%','%recordlowsoilday2%');
  423 | # Temp sensor 3 actual value & Values and time for  min and max  for today - month and year 
  424 | $ws['soilTempAct'][3]		= wsConvertTemperature('%VPsoiltemp3%', $from);  // convert and clean of units
  425 | $ws['soilTempMaxToday'][3]	= wsConvertTemperature('%hiVPsoiltemp3%', $from);
  426 | $ws['soilTempMaxMonth'][3]	= wsConvertTemperature('%mrecordhighsoil3%', $from);
  427 | $ws['soilTempMaxMonthTime'][3]	= wdYMD('%mrecordhighsoilyear3%','%mrecordhighsoilmonth3%','%mrecordhighsoilday3%');
  428 | $ws['soilTempMaxYear'][3]	= wsConvertTemperature('%yrecordhighsoil3%', $from);
  429 | $ws['soilTempMaxYearTime'][3]	= wdYMD('%yrecordhighsoilyear3%','%yrecordhighsoilmonth3%','%yrecordhighsoilday3%');
  430 | $ws['soilTempMaxAlltime'][3]	= wsConvertTemperature('%recordhighsoil3%', $from);
  431 | $ws['soilTempMaxAlltimeTime'][3]= wdYMD('%recordhighsoilyear3%','%recordhighsoilmonth3%','%recordhighsoilday3%');
  432 | $ws['soilTempMinToday'][3]	= wsConvertTemperature('%loVPsoiltemp3%', $from);
  433 | $ws['soilTempMinMonth'][3]	= wsConvertTemperature('%mrecordlowsoil3%', $from);
  434 | $ws['soilTempMinMonthTime'][3]	= wdYMD('%mrecordlowsoilyear3%','%mrecordlowsoilmonth3%','%mrecordlowsoilday3%');
  435 | $ws['soilTempMinYear'][3]	= wsConvertTemperature('%yrecordlowsoil3%', $from);
  436 | $ws['soilTempMinYearTime'][3]	= wdYMD('%yrecordlowsoilyear3%','%yrecordlowsoilmonth3%','%yrecordlowsoilday3%');
  437 | $ws['soilTempMinAlltime'][3]	= wsConvertTemperature('%recordlowsoil3%', $from);
  438 | $ws['soilTempMinAlltimeTime'][3]= wdYMD('%recordlowsoilyear3%','%recordlowsoilmonth3%','%recordlowsoilday3%');
  439 | # Temp sensor 4 actual value & Values and time for  min and max  for today - month and year 
  440 | $ws['soilTempAct'][4]		= wsConvertTemperature('%VPsoiltemp3%', $from);  // convert and clean of units
  441 | $ws['soilTempMaxToday'][4]	= wsConvertTemperature('%hiVPsoiltemp3%', $from);
  442 | $ws['soilTempMaxMonth'][4]	= wsConvertTemperature('%mrecordhighsoil3%', $from);
  443 | $ws['soilTempMaxMonthTime'][4]	= wdYMD('%mrecordhighsoilyear3%','%mrecordhighsoilmonth3%','%mrecordhighsoilday3%');
  444 | $ws['soilTempMaxYear'][4]	= wsConvertTemperature('%yrecordhighsoil3%', $from);
  445 | $ws['soilTempMaxYearTime'][4]	= wdYMD('%yrecordhighsoilyear3%','%yrecordhighsoilmonth3%','%yrecordhighsoilday3%');
  446 | $ws['soilTempMaxAlltime'][4]	= wsConvertTemperature('%recordhighsoil3%', $from);
  447 | $ws['soilTempMaxAlltimeTime'][4]= wdYMD('%recordhighsoilyear3%','%recordhighsoilmonth3%','%recordhighsoilday3%');
  448 | $ws['soilTempMinToday'][4]	= wsConvertTemperature('%loVPsoiltemp3%', $from);
  449 | $ws['soilTempMinMonth'][4]	= wsConvertTemperature('%mrecordlowsoil3%', $from);
  450 | $ws['soilTempMinMonthTime'][4]	= wdYMD('%mrecordlowsoilyear3%','%mrecordlowsoilmonth3%','%mrecordlowsoilday3%');
  451 | $ws['soilTempMinYear'][4]	= wsConvertTemperature('%yrecordlowsoil3%', $from);
  452 | $ws['soilTempMinYearTime'][4]	= wdYMD('%yrecordlowsoilyear3%','%yrecordlowsoilmonth3%','%yrecordlowsoilday3%');
  453 | $ws['soilTempMinAlltime'][4]	= wsConvertTemperature('%recordlowsoil3%', $from);
  454 | $ws['soilTempMinAlltimeTime'][4]= wdYMD('%recordlowsoilyear3%','%recordlowsoilmonth3%','%recordlowsoilday3%');
  455 | #
  456 | # Moisture sensor 1 actual value
  457 | $ws['moistAct'][1]		= '%VPsoilmoisture%';
  458 | # Moisture sensor 1 maximum value for today month and year
  459 | $ws['moistMaxToday'][1]		= '%hiVPsoilmoisture%';
  460 | $ws['moistMaxMonth'][1]		= '%mrecordhighsoilmoist%';
  461 | $ws['moistMaxMonthTime'][1]	= wdYMD('%mrecordhighsoilmoistyear%','%mrecordhighsoilmoistmonth%','%mrecordhighsoilmoistday%');
  462 | $ws['moistMaxYear'][1]		= '%yrecordhighsoilmoist%';
  463 | $ws['moistMaxYearTime'][1]	= wdYMD('%yrecordhighsoilmoistyear%','%yrecordhighsoilmoistmonth%','%yrecordhighsoilmoistday%');
  464 | $ws['moistMaxAlltime'][1]	= '%recordhighsoilmoist%';
  465 | $ws['moistMaxAlltimeTime'][1]	= wdYMD('%recordhighsoilmoistyear%','%recordhighsoilmoistmonth%','%recordhighsoilmoistday%');
  466 | 
  467 | # Moisture sensor 1 mimimum value for today  
  468 | $ws['moistMinToday'][1]		= '%loVPsoilmoisture%';
  469 | # Moisture sensor 1 date/time maximum occured
  470 | # Moisture sensor 2 actual value & Values and time for  min and max  for today - month and year 
  471 | $ws['moistAct'][2]		= '%VPsoilmoisture2%';
  472 | $ws['moistMaxToday'][2]		= '%hiVPsoilmoisture2%';
  473 | $ws['moistMinToday'][2]		= '%loVPsoilmoisture2%';
  474 | # Moisture sensor 3 actual value & Values and time for  min and max  for today - month and year 
  475 | $ws['moistAct'][3]		= '%VPsoilmoisture3%';
  476 | $ws['moistMaxToday'][3]		= '%hiVPsoilmoisture3%';
  477 | $ws['moistMinToday'][3]		= '%loVPsoilmoisture3%';
  478 | # Moisture sensor 4 actual value & Values and time for  min and max  for today - month and year 
  479 | $ws['moistAct'][4]		= '%VPsoilmoisture4%';
  480 | $ws['moistMaxToday'][4]		= '%hiVPsoilmoisture4%';
  481 | $ws['moistMinToday'][4]		= '%loVPsoilmoisture4%';
  482 | #
  483 | $ws['moistAvMonth'][1]	        = '%avtempjansoil%';	// Average soil temperature for january from your data
  484 | $ws['moistAvMonth'][2]	        = '%avtempfebsoil%';
  485 | $ws['moistAvMonth'][3]	        = '%avtempmarsoil%';
  486 | $ws['moistAvMonth'][4]	        = '%avtempaprsoil%';
  487 | $ws['moistAvMonth'][5]	        = '%avtempmaysoil%';
  488 | $ws['moistAvMonth'][6]	        = '%avtempjunsoil%';
  489 | $ws['moistAvMonth'][7]	        = '%avtempjulsoil%';
  490 | $ws['moistAvMonth'][8]	        = '%avtempaugsoil%';
  491 | $ws['moistAvMonth'][9]	        = '%avtempsepsoil%';
  492 | $ws['moistAvMonth'][10]	        = '%avtempoctsoil%';
  493 | $ws['moistAvMonth'][11]	        = '%avtempnovsoil%';
  494 | $ws['moistAvMonth'][12] 	= '%avtempdecsoil%';
  495 | 
  496 | $ws['moistAvMonthThisyear'][1]	= '%avtempjannowsoil%'; // Average soil temperature for january from your data, this year
  497 | $ws['moistAvMonthThisyear'][2]	= '%avtempfebnowsoil%';
  498 | $ws['moistAvMonthThisyear'][3]	= '%avtempmarnowsoil%';
  499 | $ws['moistAvMonthThisyear'][4]	= '%avtempaprnowsoil%';
  500 | $ws['moistAvMonthThisyear'][5]	= '%avtempmaynowsoil%';
  501 | $ws['moistAvMonthThisyear'][6]	= '%avtempjunnowsoil%';
  502 | $ws['moistAvMonthThisyear'][7]	= '%avtempjulnowsoil%';
  503 | $ws['moistAvMonthThisyear'][8]	= '%avtempaugnowsoil%';
  504 | $ws['moistAvMonthThisyear'][9]	= '%avtempsepnowsoil%';
  505 | $ws['moistAvMonthThisyear'][10]	= '%avtempoctnowsoil%';
  506 | $ws['moistAvMonthThisyear'][11]	= '%avtempnovnowsoil%';
  507 | $ws['moistAvMonthThisyear'][12]	= '%avtempdecnowsoil%';
  508 | 
  509 | #----------------------------------------------------------------------
  510 | # leaf sensor 1 - 4
  511 | $ws['leafAct'][1]		= '%VPleaf%';
  512 | $ws['leafWetLast10'][1] 	= '%leafminlast10min%';	// Minutes last 10 minutes leaf wetness was above zero
  513 | $ws['leafWetLast60'][1] 	= '%leafminlast60min%';	// Minutes last 10 minutes leaf wetness was above zero
  514 | $ws['leafMaxToday'][1]		= '%hiVPleaf%';
  515 | $ws['leafMinToday'][1]		= '%loVPleaf%';
  516 | $ws['leafMaxMonth'][1]		= '%mrecordhighleaf%';
  517 | $ws['leafMaxYear'][1]		= '%yrecordhighleaf%';
  518 | $ws['leafMaxMonthTime'][1]	= wdYMD('%mrecordhighleafyear%','%mrecordhighleafmonth%','%mrecordhighleafday%');
  519 | $ws['leafMaxYearTime'][1]	= wdYMD('%yrecordhighleafyear%','%yrecordhighleafmonth%','%yrecordhighleafday%');
  520 | $ws['leafAct'][2]		= '%VPleaf2%';
  521 | $ws['leafHighToday'][2]		= '%hiVPleaf2%';
  522 | $ws['leafLowToday'][2]		= '%loVPleaf2%';
  523 | $ws['leafWetLast10'][2] 	= '%leafminlast10min2%';	// Minutes last 10 minutes leaf wetness was above zero
  524 | $ws['leafWetLast60'][2] 	= '%leafminlast60min2%';	// Minutes last 10 minutes leaf wetness was above zero
  525 | $ws['leafAct'][3]	        = '%VPleaf3%';
  526 | $ws['leafAct'][4]	        = '%VPleaf4%';
  527 | #-----------------------------------------------------------------------------------------
  528 | $ws['check_ok']         = '3.00';
  529 | // end of testtags.txt/testtags.php
  530 | ?>

You find our weather info also at:

Weather Underground

AWEKAS

Citizen Weather Observer Program (CWOP)

Equipment we use:

Weather-station
Davis VP2

Davis VP2