Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: saratogaWX on April 04, 2020, 08:01:45 PM

Title: worldextremes.php V5.00 - 04-Apr-2020 now available
Post by: saratogaWX on April 04, 2020, 08:01:45 PM
I've done a rewrite of usaextremes.php (including the function of stateextremes.php) as a new worldextremes.php (V5.00 - 04-Apr-2020).

The expanded script now uses the CSV files from https://www.cpc.ncep.noaa.gov/products/cadb/ which includes worldwide data.
A small caveat however, the data is NOT WELL PROOFED so you can get some max/min temperatures for a station showing >25C differences.
The script already filters out >40C differences (configurable).

Now the following variables are returned:
Quote
$omittedCountry (text list of countries excluded from $world high/low/precip scans)
Note: the setting $ignoreCountrys is the array of country names to to exclude
$worldhigh
$worldlow
$worldprecip

$selectedCountry (setting: country name for selected country high/low/precip)
Note: run http://your.site.com/worldextremes.php?list to see the list of country names to use
$countryhigh
$countrylow
$countryprecip

$usahigh (Note: for lower-48 USA states)
$usalow (Note: for lower-48 USA states)
$usaprecip (Note: for lower-48 USA states)

$selectedState (setting: USA state 2-character name abbreviation in settings area)
$selectState (a copy of $selectedState for compatibility with old stateextremes.php)
$statehigh
$statelow
$stateprecip

$reportDate (nicely formatted date of the report)
$stateReportDate (a copy of $reportDate for compatibility with old stateextremes.php)

To replace the usaextremes.php (and stateextremes.php) just use include_once("worldextremes.php") and comment out/remove the include for stateextremes.php.

See the docs at https://saratoga-weather.org/scripts-NWSmisc.php#NWSEXTR which has the download link for the script.

Many thanks to Jim (SoMDWx) for his assistance with this script!   [cheers1]  ThU5:-)

Best regards,
Ken
Title: Re: worldextremes.php V5.00 - 04-Apr-2020 now available
Post by: Blicj11 on April 06, 2020, 10:08:22 AM
Thanks for your continuing support of WeatherCatters, Ken.