Author Topic: Leuven Template discontinues support for NOAA/NWS/USA scripts  (Read 2603 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
March 7 the NWS URL's used for getting a NWS forecast will change => http://www.wxforum.net/index.php?topic=30955.0

Could someone explain to me what is wrong with simply converting these URL to https?
http://forecast.weather.gov/MapClick.php?lat=41.3&lon=-72.78&FcstType=dwml
http://forecast.weather.gov/MapClick.php?lat=41.3&lon=-72.78&FcstType=json

Or why I can not use this URL after March 7:  https://graphical.weather.gov/xml/SOAP_server/ndfdSOAPByDay.htm

Even 5 days before the switch to new URL's  / API's there is no consistent documentation about the HOW and WHAT the new situation would be.
No other forecast supplier as i am aware of, makes these changes without ample time for the script writers to adapt the scripts and running extensive beta test programs.

With "pain in the heart" I have to stop accepting new USA users for 1. my Leuven-Template and 2.  for the stand-alone USA scripts (noaa).
Too often and too many  changes in the URL's / API's take up too much time.

Current USA users will, after March 7, probably loose the NOAA/NWS forecasts but can still use YRNO or METNO forecasts which will give them ample time to switch to another template.

As from today  March 2 2017 the Leuven-Template will be available for new European users only.

Wim
« Last Edit: March 02, 2017, 02:04:54 PM by wvdkuil »

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #1 on: March 02, 2017, 02:02:59 PM »
Hi Wim,
I understand this had to be a tough decision to make, but I completely understand you.

On one hand I have to say, that with the exception of the Swedish SMHI, NOAA and US NWS has the best data - in terms of what is available for free, its format etc.
On the other hand, even though the format is very easy to use and lot of things to work with, it changes very often and only in the last one and half yrs Meteotemplate has been available, I had to update almost all the U.S. blocks not just once...

Offline Aardvark

  • Forecaster
  • *****
  • Posts: 2305
  • Tonto to Lone Ranger : "never take off mask.
    • turned off
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #2 on: March 02, 2017, 04:33:10 PM »
So essentially do I need to find a different template ?   I did change my forecast from noaa to Weatherunderground.    but back  to the original, do I need to find a different template /

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #3 on: March 02, 2017, 05:57:31 PM »
No, I highly doubt Wim's template is dependent on those scripts.

Wim said he only plans to discontinue the US version for NEW users, existing users will be able to use the template, just that he probably does not plan on updating those scripts affected so they might not work (NWS forecasts etc.) But the rest of the template should be fine.

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #4 on: March 03, 2017, 12:53:04 PM »
I too understand (and support) Wim's stance about the NOAA/NWS and his template set.  The entire NOAA/NWS web presence is undergoing a multi-year revamp/update to
1) be fully https as mandated by the Office of the CIO
2) update the look/feel to be mobile-friendly for the main public-facing sites
3) create/use a public API to generate the public-facing site (forecast.weather.gov)
4) deprecate many of the older non-API-based scripts (like forecast.weather.gov/MapClick.php used with the current site)

I'll try to keep up with the many changes with the Saratoga scripts/templates, but it is a challenge. 
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #5 on: March 03, 2017, 12:56:34 PM »
Quote
I'll try to keep up with the many changes with the Saratoga scripts/templates, but it is a challenge.

Likewise

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #6 on: March 04, 2017, 05:57:24 AM »
I understand that NWS wants to implement improvements, but all at once?
One example only: Why change the naming of nearly all icons?
And if there is a list of the new/improved icons ands their meanings, I did not locate it.
Not very important to most stand-alone users, but in all of my scripts the website-owner can either use the different forecast icons (WU,NOAA, YRNO)
or standardise all forecasts to  ones own set of website wide icons.
To implement that I need a complete list of all possible icons to adapt the translate-table "noaa icons" => "default icons".

Status of Leuven NOAA scripts:
Plain page => working, but no "hazards" numerous 503 or 404 errors with https://api.weather.gov/alerts/active?point=30.0693,-93.6716
Extensive page: Working as long as there is no change in the forecast URL: https://graphical.weather.gov/xml/SOAP_server/ndfdSOAPByDay.htm

For those willing to beta-test,  the stand-alone version of the current beta-scripts can be downloaded from http://leuven-template.eu/noaafct3.zip.
The readme is not yet ready, but visit the previous version demo-page for explanations at http://www.weerstation-leuven.be/northam/noaafct/demo.php?plain&lang=en

Wim

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #7 on: March 04, 2017, 09:55:24 AM »
I understand that NWS wants to implement improvements, but all at once?
One example only: Why change the naming of nearly all icons?
And if there is a list of the new/improved icons ands their meanings, I did not locate it.
Not very important to most stand-alone users, but in all of my scripts the website-owner can either use the different forecast icons (WU,NOAA, YRNO)
or standardise all forecasts to  ones own set of website wide icons.
To implement that I need a complete list of all possible icons to adapt the translate-table "noaa icons" => "default icons".

I had the same feeling about the change to the icon names.  I did contact the NWS and got in touch with one of the developers who sent me a YAML file with the new name definitions and the current icon image filenames used.  I made that into an associative array lookup
Code: [Select]
  $NWSICONLIST = array(
  #  index is new icon name
  #  imagename is original image name (for which we have icons available)
  #  PoP flag controls if PoP is written on output or not.
  #  ScePosition controls if image is pulled from Left, Middle or Right of source image
  #  Text Name - optional, just a reminder of what it means
  #  imgname | PoP?=[YN] | ScePosition=[LMR] | Text Name (optional)
  'bkn' =>  'bkn|N|L|Broken Clouds',
'night/bkn' =>  'nbkn|N|L|Night Broken Clouds',
  'blizzard' =>  'blizzard|Y|L|Blizzard',
'night/blizzard' =>  'nblizzard|Y|L|Night Blizzard',
  'cold' =>  'cold|Y|L|Cold',
'night/cold' =>  'cold|Y|L|Cold',
  #  'cloudy' =>  'cloudy|Y|L|Overcast (old cloudy)',
  'dust' =>  'du|N|22|Dust',
'night/dust' =>  'ndu|N|22|Night Dust',
  #  'fc' =>  'fc|N|L|Funnel Cloud',
  #  'nsvrtsra' =>  'nsvrtsra|N|L|Funnel Cloud (old)',
  'few' =>  'few|Y|L|Few Clouds',
'night/few' =>  'nfew|Y|L|Night Few Clouds',
  #  'fg' =>  'fg|N|R|Fog',
  #  'br' =>  'br|Y|R|Fog / mist old',
  #  'fu' =>  'fu|N|L|Smoke',
  'fog' =>  'fg|N|R|Fog',
'night/fog' =>  'nfg|N|R|Night Fog',
  'fzra' =>  'fzra|Y|L|Freezing rain',
'night/fzra' =>  'nfzra|Y|L|Night Freezing Rain',
  #  'fzrara' =>  'fzrara|Y|L|Rain/Freezing Rain (old)',
  'snow_fzra' =>  'fzra_sn|Y|L|Freezing Rain/Snow',
'night/snow_fzra' =>  'nfzra_sn|Y|L|Night Freezing Rain/Snow',
  #  'mix' =>  'mix|Y|L|Freezing Rain/Snow',
  #  'hi_bkn' =>  'hi_bkn|Y|L|Broken Clouds (old)',
  #  'hi_few' =>  'hi_few|Y|L|Few Clouds (old)',
  #  'hi_sct' =>  'hi_sct|N|L|Scattered Clouds (old)',
  #  'hi_skc' =>  'hi_skc|N|L|Clear Sky (old)',
  #  'hi_nbkn' =>  'hi_nbkn|Y|L|Night Broken Clouds (old)',
  #  'hi_nfew' =>  'hi_nfew|Y|L|Night Few Clouds (old)',
  #  'hi_nsct' =>  'hi_nsct|N|L|Night Scattered Clouds (old)',
  #  'hi_nskc' =>  'hi_nskc|N|L|Night Clear Sky (old)',
  #  'hi_nshwrs' =>  'hi_nshwrs|Y|R|Night Showers',
  #  'hi_ntsra' =>  'hi_ntsra|Y|L|Night Thunderstorm',
  #  'hi_shwrs' =>  'hi_shwrs|Y|R|Showers',
  #  'hi_tsra' =>  'hi_tsra|Y|L|Thunderstorm',
  'hur_warn' =>  'hur_warn|N|L|Hurrican Warning',
'night/hur_warn' =>  'hur_warn|N|L|Hurrican Warning',
      "hurr_warn" => "hurr|N|L|Hurricane warning", // New NWS list
        "night/hurr_warn" => "hurr|N|L|Night Hurricane warning", // New NWS list
  'hur_watch' =>  'hur_watch|N|L|Hurricane Watch',
'night/hur_watch' =>  'hur_watch|N|L|Hurricane Watch',
      "hurr_watch" => "hurr-noh|N|L|Hurricane watch", // New NWS list
        "night/hurr_watch" => "hurr-noh|N|L|Night Hurricane watch", // New NWS list
  #  'hurr' =>  'hurr|N|L|Hurrican Warning old',
  #  'hurr-noh' =>  'hurr-noh|N|L|Hurricane Watch old',
  'hazy' =>  'hz|N|L|Haze',
'night/hazy' =>  'hz|N|L|Haze',
      "haze" => "hz|N|L|Haze", // New NWS list
        "night/haze" => "hz|N|L|Night Haze", // New NWS list
  #  'hazy' =>  'hazy|N|L|Haze old',
  'hot' =>  'hot|N|R|Hot',
'night/hot' =>  'hot|N|R|Hot',
  'sleet' =>  'ip|Y|L|Ice Pellets',
'night/sleet' =>  'nip|Y|L|Night Ice Pellets',
  #  'minus_ra' =>  'minus_ra|Y|L|Stopped Raining',
  #  'ra1' =>  'ra1|N|L|Stopped Raining (old)',
  #  'mist' =>  'mist|N|R|Mist (fog) (old)',
  #  'ncloudy' =>  'ncloudy|Y|L|Overcast night(old ncloudy)',
  #  'ndu' =>  'ndu|N|M|Night Dust',
  #  'nfc' =>  'nfc|N|L|Night Funnel Cloud',
  #  'nbr' =>  'nbr|Y|R|Night Fog/mist (old)',
  #  'nfu' =>  'nfu|N|L|Night Smoke',
  #  'nmix' =>  'nmix|Y|30|Night Freezing Rain/Snow (old)',
  #  'nrasn' =>  'nrasn|Y|M|Night Snow (old)',
  #  'pcloudyn' =>  'pcloudyn|Y|L|Night Partly Cloudy (old)',
  #  'nscttsra' =>  'nscttsra|Y|M|Night Scattered Thunderstorm',
  #  'nsn_ip' =>  'nsn_ip|Y|L|Night Snow/Ice Pellets (old)',
  #  'nwind' =>  'nwind|N|5|Night Windy/Clear (old)',
  'ovc' =>  'ovc|N|L|Overcast',
'night/ovc' =>  'novc|N|L|Night Overcast',
  'rain' =>  'ra|Y|30|Rain',
'night/rain' =>  'nra|Y|30|Night Rain',
  'rain_showers' =>  'shra|Y|12|Rain Showers',
'night/rain_showers' =>  'nshra|Y|12|Night Rain Showers',
      "rain_showers_hi" => "hi_shwrs|Y|45|Rain showers (low cloud cover)", // New NWS list
        "night/rain_showers_hi" => "hi_nshwrs|Y|45|Night Rain showers (low cloud cover)", // New NWS list
  'rain_sleet' =>  'raip|Y|M|Rain/Ice Pellets',
'night/rain_sleet' =>  'nraip|Y|M|Night Rain/Ice Pellets',
  'rain_fzra' =>  'ra_fzra|Y|30|Rain/Freezing Rain',
'night/rain_fzra' =>  'nra_fzra|Y|30|Night Freezing Rain',
  'rain_snow' =>  'ra_sn|Y|22|Rain/Snow',
'night/rain_snow' =>  'nra_sn|Y|22|Night Rain/Snow',
  #  'rasn' =>  'rasn|Y|M|Rain/Snow (old)',
  'sct' =>  'sct|N|L|name',
'night/sct' =>  'nsct|N|L|Night Scattered Clouds',
  #  'pcloudy' =>  'pcloudy|Y|L|Partly Cloudy (old)',
  #  'scttsra' =>  'scttsra|Y|M|name',
  #  'shra2' =>  'shra2|N|10|Rain Showers (old)',
  'skc' =>  'skc|N|L|Clear',
'night/skc' =>  'nskc|N|L|Night Clear',
  'snow' =>  'sn|Y|L|Snow',
'night/snow' =>  'nsn|Y|L|Night Snow',
  'snow_sleet' =>  'sn_ip|Y|L|Snow/Ice Pellets',
'night/snow_sleet' =>  'nsn_ip|Y|L|Night Snow/Ice Pellets',
  'smoke' =>  'fu|N|L|Smoke',
'night/smoke' =>  'nfu|N|L|Smoke', // NEW - Nov-2016
  #  'sn_ip' =>  'sn_ip|Y|L|Snow/Ice Pellets (old)',
  #  'tcu' =>  'tcu|N|L|Towering Cumulus (old)',
  'tornado' =>  'tor|N|L|Tornado',
'night/tornado' =>  'ntor|N|L|Night Tornado',
  'tsra' =>  'tsra|Y|10|Thunderstorm',
'night/tsra' =>  'ntsra|Y|10|Night Thunderstorm',
      "tsra_sct" => "scttsra|Y|20|Thunderstorm (medium cloud cover)", // New NWS list
        "night/tsra_sct" => "nscttsra|Y|20|Night Thunderstorm (medium cloud cover)", // New NWS list
      "tsra_hi" => "hi_tsra|Y|L|Thunderstorm (low cloud cover)", // New NWS list
        "night/tsra_hi" => "hi_ntsra|Y|L|Night Thunderstorm (low cloud cover)", // New NWS list
  #  'tstormn' =>  'tstormn|N|L|Thunderstorm night (old)',
  #  'ts_nowarn' =>  'ts_nowarn|N|L|Tropical Storm',
     "ts_hurr_warn" => "ts_hur_flags|N|L|Tropical storm with hurricane warning in effect", // New NWS list
       "night/ts_hurr_warn" => "ts_hur_flags|N|L|Night Tropical storm with hurricane warning in effect", // New NWS list
'ts_warn' =>  'tropstorm|Y|L|Tropical Storm Warning',
   'night/ts_warn' =>  'tropstorm|Y|L|Tropical Storm Warning',
  #  'tropstorm-noh' =>  'tropstorm-noh|N|L|Tropical Storm old',
  #  'tropstorm' =>  'tropstorm|N|L|Tropical Storm Warning old',
'ts_watch' =>  'tropstorm-noh|Y|L|Tropical Storm Watch',
   'night/ts_watch' =>  'tropstorm-noh|Y|L|Tropical Storm Watch',
  #  'ts_hur_flags' =>  'ts_hur_flags|Y|L|Hurrican Warning old',
  #  'ts_no_flag' =>  'ts_no_flag|Y|L|Tropical Storm old',
'wind_bkn' =>  'wind_bkn|N|7|Windy/Broken Clouds',
   'night/wind_bkn' =>  'nwind_bkn|N|7|Night Windy/Broken Clouds',
  'wind_few' =>  'wind_few|N|7|Windy/Few Clouds',
'night/wind_few' =>  'nwind_few|N|7|Night Windy/Few Clouds',
  'wind_ovc' =>  'wind_ovc|N|7|Windy/Overcast',
'night/wind_ovc' =>  'nwind_ovc|N|7|Night Windy/Overcast',
  'wind_sct' =>  'wind_sct|N|7|Windy/Scattered Clouds',
'night/wind_sct' =>  'nwind_sct|N|7|Night Windy/Scattered Clouds',
  'wind_skc' =>  'wind_skc|N|7|Windy/Clear',
'night/wind_skc' =>  'nwind_skc|N|7|Night Windy/Clear',
  #  'wind' =>  'wind|N|L|Windy/Clear (old)',
'na'       => 'na|N|L|Not Available',
  );
the day icons and night icons are separate entries in the table.

It's used with
Code: [Select]
function convert_to_local_icon ($icon) {
// input: https://api-v1.weather.gov/icons/land/day/rain_showers,20/sct,20?size=medium
//        https://api-v1.weather.gov/icons/land/night/sct?size=medium
// output: {iconDir}{icon}.{$iconType} or
//         DualImage.php?i={lefticon}&j={righticon}&ip={leftpop}&jp={rightpop}
  global $Status,$NWSICONLIST,$iconDir,$iconType,$iconHeight,$iconWidth,$DualImageAvailable;

  $newicon = $icon; // for testing
  $uparts = parse_url($icon);
  $iparts = array_slice(explode('/',$uparts['path']),3); //get day|night/icon[/icon]
  //$Status .= "<!-- iparts \n".print_r($iparts,true)." -->\n";
  $daynight = ($iparts[0] == 'day')?'':'night/';
  list($icon1,$pop1) = explode(',',$iparts[1].',');
  $doDual = false;
  if(isset($iparts[2])) {
$doDual = true;
list($icon2,$pop2) = explode(',',$iparts[2].',');
  } else {
  $icon2 = '';
  $pop2  = '';
  }
  // convert new API icon names to old image names
  if(isset($NWSICONLIST["${daynight}${icon1}"])) {
  list($nicon1,$rest) = explode('|',$NWSICONLIST["${daynight}${icon1}"]);
  $icon1 = $nicon1;
  } else {
     $Status .= "<!-- icon1='$icon1' not found - na used instead -->\n";
$icon1 = 'na';
  }
  if($icon2 <> '') {
    if(isset($NWSICONLIST["${daynight}${icon2}"])) {
  list($nicon2,$rest) = explode('|',$NWSICONLIST["${daynight}${icon2}"]);
  $icon2 = $nicon2;
} else {
      $Status .= "<!-- icon2='$icon2' not found - na used instead -->\n";
  $icon2 = 'na';
}
  }
//  $Status .= "<!-- doDual='$doDual' DualImageAvailable='$DualImageAvailable' icon1=$icon1 icon2=$icon2 -->\n";
  if($doDual and $DualImageAvailable) { // generate the DualImage.php script calling sequence for image

  $newicon = "DualImage.php?";
  $newicon .= "i=$icon1";
 
  if($pop1 <> '') { $newicon .= "&ip=$pop1"; }
  $newicon .= "&j=$icon2";
  if($pop2 <> '') { $newicon .= "&jp=$pop2"; }
  $Status .= "<!-- dual image '$newicon' used-->\n";
 
  } elseif (file_exists("${iconDir}${icon1}${pop1}${iconType}")) { // use the image as-is

  $newicon = "${iconDir}${icon1}${pop1}${iconType}";

/*  } elseif ( $DualImageAvailable ) { // oops... pop icon doesn't exist but we can generate it

  $newicon = "DualImage.php?";
  $newicon .= "i=$icon1";
 
  if($pop1 <> '') { $newicon .= "&ip=$pop1"; }
  $Status .= "<!-- missing icon '${iconDir}${icon1}${pop1}${iconType}' .. using '$newicon' instead -->\n";
*/  
  }   elseif (file_exists("${iconDir}${icon1}${iconType}") ) { // oops... pop icon doesn't exist

  $newicon = "${iconDir}${icon1}${iconType}";
  $Status .= "<!-- missing icon '${iconDir}${icon1}${pop1}${iconType}' .. " .
     "using '${iconDir}${icon1}${iconType}' instead -->\n";
 
  } else {
  $newicon = "${iconDir}na${iconType}";
  $Status .= "<!-- missing icon '${iconDir}${icon1}${pop1}${iconType}' .. ".
     "using '${iconDir}na${iconType}' instead -->\n";
  }

  return($newicon);
} // end convert_to_local_icon
to convert the new format icon string to a local icon image file or to a DualImage.php call to generate a dual image.

I hope this helps.  I've attached my latest JSON-based advforecast2.php script for your reference -- feel free to reuse any elements you find useful.

The script also does retrieval for the metadata about a point, a zone and a weather forecast office (WFO) and save it in a JSON file for use on the page displays.  They don't include metadata in the point or zone forecast, so that unchanging data has to be acquired through separate HTTPS requests to the API.

Hope this helps..
Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #8 on: March 04, 2017, 10:10:13 AM »
Thanks Ken, I will look into your array to reuse it.  I need to have an array with the old icon names as they are still used in the detailed forecasts from https://graphical.weather.gov/xml/SOAP_server/ndfdSOAPByDay.htm

The adapted Leuven-Noaa scripts in Beta use also three https/api calls for point/meta/forecast + 1 for the optional alerts.
I moved the URL processing to a separate script to more make updates a little easier the next week

The remaining problems are
1. the numerous 500 and 503 errors, seems that is often resulting from detailed latitude longitude (now rounded to 3 decimals)
2. the icons, I will use your data to address that one
3. multiple nearly identical hazards, maybe use only the last one ?

But most important to me for now, will the other source of forecast data still exist after Monday?
https://graphical.weather.gov/xml/SOAP_server/ndfdSOAPByDay.htm

As always, thanks for your valuable input,

Wim

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #9 on: March 04, 2017, 10:18:54 AM »
The major problem here is that Ken obviously has good contacts, but you should not need to send numerous emails to NWS directly to get info, not to mention I would not be surprised if they were ignored if it was me who sent them (as it happened in the past).

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #10 on: March 04, 2017, 10:21:33 AM »
You're very welcome, Wim.

I've not seen any notices about changes to the SOAP interface/service -- only about forecast.weather.gov and a bit about alerts.weather.gov services.

The 503 returns for a point API forecast request seem to mean "it's not available right now" (maybe due to database load of the forecast data?), so my script (and the forecast-v3.weather.gov site) fall back to displaying the Zone forecast (with no icons) during that time.
The 500 errors are just server overload IMHO, but I'll failover to the Zone forecast anyway with the new script.

The whole api.weather.gov hazards content v.s. alerts.weather.gov is still unsettled.  The api.weather.gov is missing "Outlook" type hazard alerts which the alerts.weather.gov ATOM/CAP feeds still possess .. I've brought that to the developers attention several times.  Don't know if it will be fixed before their cutover.  Also noted that the expires time in the JSON alerts from api.weather.gov are funky and don't often match when the hazard is alleged to be over.. I'll contact the developers next week and see if I can extract some status on those issues (and whether the cutover is still 'on' for March 7th).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #11 on: March 04, 2017, 10:23:27 AM »
The major problem here is that Ken obviously has good contacts, but you should not need to send numerous emails to NWS directly to get info, not to mention I would not be surprised if they were ignored if it was me who sent them (as it happened in the past).

It took a month and multiple emails to finally get a couple of contacts active (one NOAA and one NOAA contractor).  The Federal wheels grind exceeding slowly.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #12 on: March 04, 2017, 10:33:26 AM »
Yes and still, I dont think this is how it should be. If they offer an API it should have a detailed documentation. Just imagine if all developers contacted them separately by email...

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #13 on: March 04, 2017, 11:16:50 AM »
Wim,
One other thing I've noticed is that the api.weather.gov wants to see no more than 4 decimal places in the lat/long request, and no trailing zeroes .. I had to put in some code to make sure those constraints were honored on the API request otherwise a point forecast request would always yield a 500 error. Grrr.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #14 on: March 04, 2017, 12:27:07 PM »
Here's an interesting comparison of the loading for the current v.s. planned forecast.weather.gov

forecast.weather.gov
  57 requests, 1015KB in 2.01 seconds
forecast-v3.weather.gov
  87 requests, 1715KB in 11.74 seconds

Whew.. all that API canonical requests are costly to make the site 'more mobile friendly' but a lot 'fatter' in bandwidth and number of HTTPS requests to finish rendering.  Sigh...  The new advforecast2.php JSON page has

10 requests, 15KB, 1.4 seconds (with a PHP GET for up-to 4 API requests for a point forecast - 1-point JSON - 3 for point/zone/WFO metadata if not already cached).
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #15 on: March 04, 2017, 12:29:21 PM »
That reminded me of this :D


Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9278
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #16 on: March 04, 2017, 12:44:27 PM »
Yes..

I'm rather old-school on websites.  I want them to fully render using HTML+CSS without requiring JavaScript.  If JavaScript is enabled in the browser, then add a bit of extra data refresh using AJAX.  I don't require (or like for) JavaScript to be enabled to render the site or navigation.

Unfortunately, the wide deployment of JQuery, Bootstrap, or other libraries have made a JavaScript-enabled browser a necessity to render some sites (which I find very obnoxious).  Also a pet peeve is multiple includes for external JS, CSS, media from domains other than the original domain (excepting for Google Maps, of course).  So many accesses to 'cloud' content holders.  Makes pages big, slow and unresponsive on lightly-powered systems.  </rant>
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template discontinues support for NOAA/NWS/USA scripts
« Reply #17 on: March 05, 2017, 04:08:21 AM »
Wim,
One other thing I've noticed is that the api.weather.gov wants to see no more than 4 decimal places in the lat/long request, and no trailing zeroes .. I had to put in some code to make sure those constraints were honored on the API request otherwise a point forecast request would always yield a 500 error. Grrr.
If the lat / lon ends on a zero, the url is redirected (301) to the same URL without the zero
https://api.weather.gov/points/41.30,-72.79 =>
https://api.weather.gov/points/41.3,-72.79
Same for to many decimal places
https://api.weather.gov/points/41.311222222,-72.7911  => 301
https://api.weather.gov/points/41.3112,-72.7911

I checked your code but you commented allow redirect.
I tried to use the allow redirect in the CURL in my code but that does not help.
Will have to add the code for avoiding this redirect problem.

Wim
« Last Edit: March 05, 2017, 05:32:53 AM by wvdkuil »

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
New versions available for stand-alone and Saratoga users.

Go to http://www.weerstation-leuven.be/northam/noaafct/demo.php?full&lang=en
All demo's are adapted to latest version and download is available at tab => "Install"   link  =>"Here"

Leuven-template users will have to wait until icon conversions are adapted also.

Wim

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Re: Leuven Template support for NOAA/NWS/USA scripts ** solved ***
« Reply #19 on: April 20, 2017, 05:21:58 AM »
Still waiting for the NOAA final changes of the new point-click forecast.  Cut-over date now April 24, 2017.

All forecast scripts are ready to test and can be downloaded at the Leuven-Template support site: http://support.leuven-template.eu/

Stand-alone / Saratoga-template versions  available at: http://www.weerstation-leuven.be/northam/noaafct/demo.php?plain&lang=en

FIRST  backup / copy or zip  your current noaafct/ folder before you start testing the new version.

Wim