WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Topic started by: W3DRM on June 24, 2017, 10:09:50 AM

Title: PHP/AJAX Script or NWS Issue?
Post by: W3DRM on June 24, 2017, 10:09:50 AM
I doubt this is a PHP/AJAX script issue but it certainly doesn't look correct. Any thoughts?
Title: Re: PHP/AJAX Script or NWS Issue?
Post by: saratogaWX on June 24, 2017, 10:15:40 AM
Oooh... that is strange.

The JSON for the forecast via api.weather.gov shows
Code: [Select]
    "periods": [
        {
            "number": 1,
            "name": "Today",
            "startTime": "2017-06-24T07:00:00-07:00",
            "endTime": "2017-06-24T18:00:00-07:00",
            "isDaytime": true,
            "temperature": 98,
            "temperatureUnit": "F",
            "temperatureTrend": null,
            "windSpeed": "-146 mph",
            "windDirection": "N",
            "icon": "https://api.weather.gov/icons/land/day/few?size=medium",
            "shortForecast": "Sunny",
            "detailedForecast": "Sunny, with a high near 98. North wind around -146 mph, with gusts as high as 1.1472352069703E+37 mph. New snow accumulation of 2.990763E+37 to 2.990763E+37 inches possible."
        },
        {
            "number": 2,
            "name": "Tonight",
            "startTime": "2017-06-24T18:00:00-07:00",
            "endTime": "2017-06-25T06:00:00-07:00",
            "isDaytime": false,
            "temperature": 56,
            "temperatureUnit": "F",
            "temperatureTrend": null,
            "windSpeed": "-146 mph",
            "windDirection": "N",
            "icon": "https://api.weather.gov/icons/land/night/sct?size=medium",
            "shortForecast": "Partly Cloudy",
            "detailedForecast": "Partly cloudy, with a low around 56. North wind around -146 mph, with gusts as high as 1.1472352069703E+37 mph. New snow accumulation of 2.990763E+37 to 2.990763E+37 inches possible."
        },
so it's an api.weather.gov issue I think.. the script just displays (without alteration) the "detailedForecast" value in the JSON for the text of the forecast.
Looks like they have an issue with the GFS->text conversion routines. 

BTW, my point-forecast from the API appears ok, so it may be just an issue for some forecast points/areas.
Same issue shows on https://forecast-v3.weather.gov/point/38.9541,-119.7657

I clicked around on the foreacst-v3.weather.gov site in the Reno, NV WFO area, and all the ones tried had the same anomalies in the forecasts. 
Title: Re: PHP/AJAX Script or NWS Issue?
Post by: Jáchym on June 24, 2017, 11:39:06 AM
Hehe, maybe it means the wind will blow backwards, so just be prepared for a 146mph S wind :D
Title: Re: PHP/AJAX Script or NWS Issue?
Post by: W3DRM on June 24, 2017, 07:01:36 PM
Well, I've been sitting mostly in the sun all day today at a fund raiser for our local food closet. It was around 93°F and absolutely no breeze at all - a dead calm.

At least we had a 10x20' pop-up to partially shade us but the heat from a gravel parking lot was intense. Several of our volunteers had dizzy spells from the heat even though all of us were well hydrated (with water). The event netted us around $1500 so that will help towards our $1.4million goal for a new facility that we desperately need.

We could have used some of that snow forecasted for today  :lol:
Code: [Select]
This Afternoon
 
Mostly sunny, with a high near 98. North wind around -146 mph, with gusts as high as 1.1472352069703E+37 mph. New snow accumulation of 1.993842E+37 to 1.993842E+37 inches possible.
Title: Re: PHP/AJAX Script or NWS Issue?
Post by: chief-david on June 24, 2017, 07:04:14 PM
Is that in metric or Kelvin???????????
Title: Re: PHP/AJAX Script or NWS Issue?
Post by: W3DRM on June 24, 2017, 07:07:12 PM
Is that in metric or Kelvin???????????

Yes!  :roll: