Author Topic: worldextremes.php V5.00 - 04-Apr-2020 now available  (Read 878 times)

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 144
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
worldextremes.php V5.00 - 04-Apr-2020 now available
« 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
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Blicj11

  • Storm
  • *****
  • Posts: 3443
    • EW3808
    • KUTHEBER6
    • Timber Lakes Utah
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Mojave | Sharx SCNC2900 Webcam | Supportive Wife
Re: worldextremes.php V5.00 - 04-Apr-2020 now available
« Reply #1 on: April 06, 2020, 10:08:22 am »
Thanks for your continuing support of WeatherCatters, Ken.
Blick