Author Topic: wxnwswinter.php  (Read 1887 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1336
  • BismarckWeather.net
    • BismarckWeather.net
wxnwswinter.php
« on: February 03, 2023, 09:44:29 AM »
I noticed my wxnwswinter.php page isn't working.  From what I can tell, I think my local office changed the graphics name or location.  Can someone see what's going on?

https://www.bismarckweather.net/wxnwswinter.php
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 963
    • LexMAWeather
Re: wxnwswinter.php
« Reply #1 on: February 03, 2023, 05:41:38 PM »
If you do a view source, you can see the image it's trying to pull.

Code: [Select]
<table width="656px" align="center">
<tr><td align="center">

    <img src="https://www.weather.gov/images/bis/winter/StormTotalSnowWeb.jpg" width="656" alt="Snowfall Prediction Missing"/>
</td>
</tr></table>

which isn't there.

Going to the Bismarck winter weather page:

   https://www.weather.gov/bis/winter

the main graphic there uses the image https://www.weather.gov/images/bis/ProbMessaging/StormTotalSnow_BIS.png
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #2 on: February 04, 2023, 08:00:13 AM »
The Bismarck WFO have gone crazy with their winter weather graphics naming scheme!  I've fixed the 'Expect This Much', but not the others.  The Ice prediction has gone to a statewide ND prediction rather than a WFO-specific prediction, and because of the importance of this forecast I've included enough spaghetti code to point to the correct graphic.  The rest...pffft!  They're stale right now.  Anyone interested enough to pursue them can view the current graphics through the WFO link at the bottom of the page.

The only changes are in the 'inc-nwswinter.php' script, which is all you would need to replace at this time.  You can find the zip on my scripts page.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 963
    • LexMAWeather
Re: wxnwswinter.php
« Reply #3 on: February 04, 2023, 08:14:29 AM »
Boston keeps changing their minds about whether to include "_BOX" in the image file names. So I succumbed and now check for both and use whatever is newest.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #4 on: February 04, 2023, 08:45:27 AM »
Thanks, Jasiu!  I did look at Boston when I was updating the script, but I didn't do a comprehensive run-through of all of the WFO's like I did when I was creating the script.  The script pulls up current graphics today for Boston.  :shock:
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1336
  • BismarckWeather.net
    • BismarckWeather.net
Re: wxnwswinter.php
« Reply #5 on: February 04, 2023, 11:41:10 AM »
Thanks for the update!
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #6 on: February 07, 2023, 07:30:43 AM »
It looks like Bismarck has sorted through their naming problems with this page, and this morning all of the graphics are displaying and are up to date.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #7 on: October 22, 2023, 03:23:29 PM »
Thomas Abell called my attention to the fact that this script was missing the opportunity to display many more maps which display forecast amounts 'Greater Than' 2, 4, 6, 8, 12, and 18 inches.  He modified his version of the script and was kind enough to share it with me.  Accordingly a new 'nwswinter.zip' script that incorporates these additional maps is now available on my scripts page.  You can view the modifications' results here. Thanks, Tom!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline BKS97

  • Senior Contributor
  • ****
  • Posts: 184
    • Sartell East Weather
Re: wxnwswinter.php
« Reply #8 on: October 22, 2023, 04:29:02 PM »
Update made.  [tup]  Thank you Jerry and Tom! Just in time -- looks like some snow is in the forecast here for next weekend.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #9 on: October 22, 2023, 09:05:04 PM »
Unfortunately there was an aggravating bug in the script in that if you selected a map other than the default this map's text remained in the heading but the map was the default after you selected a different WFO.  I've repaired this in the latest version on my scripts page.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline mikeym2m

  • Senior Contributor
  • ****
  • Posts: 153
    • MikeyM's Thornhurst PA Weather
Re: wxnwswinter.php
« Reply #10 on: October 23, 2023, 09:23:24 AM »
 [tup] Thanks Jerry and Tom

MikeyM
www.mikeymsweather.com

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: wxnwswinter.php
« Reply #11 on: March 20, 2024, 09:49:11 PM »
Hello,

I have an issue with the NWS Winter (nwswinter.zip 2023/10/22) script. PS, love this script.

When first opened both my heavily customized page and wxnwswinter-SA.php both default to Select prediction: Most Likely Snowfall, Great!

However whenever the Forecast Office is changed, the Select prediction changes to Potential for This Much.

Until I discovered this, it really had me going, due to the drastic map changes between adjacent Field Offices.

Is there a way to have the Select prediction option stay as set until manually changed?

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #12 on: March 20, 2024, 11:17:36 PM »
Hello,

I have an issue with the NWS Winter (nwswinter.zip 2023/10/22) script. PS, love this script.

When first opened both my heavily customized page and wxnwswinter-SA.php both default to Select prediction: Most Likely Snowfall, Great!

However whenever the Forecast Office is changed, the Select prediction changes to Potential for This Much.

Until I discovered this, it really had me going, due to the drastic map changes between adjacent Field Offices.

Is there a way to have the Select prediction option stay as set until manually changed?

Dennis
In a word, no.  Sorry. Defaulting to 'Potential for This Much' is my preferred behavior for this script.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: wxnwswinter.php
« Reply #13 on: March 21, 2024, 08:21:41 AM »
IDefaulting to 'Potential for This Much' is my preferred behavior for this script.
Interesting, your page opens to "Most Likely Snowfall". But then switches to "Potential for This Much" when switching Forecast Office. The same behavior as I describe for my site.

The result is when comparing predictions from surrounding Forecast Offices its comparing apples to oranges.

Thanks for your script
Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #14 on: March 21, 2024, 09:06:50 AM »
IDefaulting to 'Potential for This Much' is my preferred behavior for this script.
Interesting, your page opens to "Most Likely Snowfall". But then switches to "Potential for This Much" when switching Forecast Office. The same behavior as I describe for my site.

The result is when comparing predictions from surrounding Forecast Offices its comparing apples to oranges.

Thanks for your script
Dennis
I understand what you're saying, but the 'Potential for This Much' option seemed best when the script was defaulting to one of the inches options without being directed back to a specific image. It's a matter of having some control over which image is displayed. I've selected 'Most Likely Snowfall' as my default image in the script on my website. You can select whatever image you want as your opening default in the script's settings so long as you're aware that I haven't tested all of the options.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1336
  • BismarckWeather.net
    • BismarckWeather.net
Re: wxnwswinter.php
« Reply #15 on: March 21, 2024, 09:39:48 AM »
I've noticed in the past 2 years, my WFO has slowly quit all the images.  Only one available this morning is the "Most Likely Snowfall" option.

Just a couple of weeks ago, a few of them were working, but I can't recall which ones.  All the "Chance" ones didn't work.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #16 on: March 21, 2024, 10:04:22 AM »
I've noticed in the past 2 years, my WFO has slowly quit all the images.  Only one available this morning is the "Most Likely Snowfall" option.

Just a couple of weeks ago, a few of them were working, but I can't recall which ones.  All the "Chance" ones didn't work.
There's apparently no NWS standard naming convention for these images, so your WFO has struck out on its own. (See the 'Probabilistic Snowfall Forecasts' tab.) Keeping up with such nonsense is difficult,  ](*,) but I'll see what I can do when I have time. :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: wxnwswinter.php
« Reply #17 on: March 21, 2024, 09:10:38 PM »
In inc-nwswinter.php 20231022 at about line 499 I changed...

Code: [Select]
<script type="text/javascript">
  $("#wfo").change(function () {
    var wfo = $(this).val();
var divWidth = "<?php echo $divWidth?>";
var prediction = "<?php echo &#39;SnowAmt90Prcntl&#39;?>";
var standAlone = "<?php echo $standAlone?>";
    showPredictionjs(wfo,divWidth,prediction,standAlone);
  });
</script>

To...

Code: [Select]
<script type="text/javascript">
  $("#wfo").change(function () {
    var wfo = $(this).val();
var divWidth = "<?php echo $divWidth?>";
var prediction = "<?php echo &#39;StormTotalSnowWeb&#39;?>"; //ddm 03/21/2024, this was 'SnowAmt90Prcntl' I changed it to 'StormTotalSnowWeb'
var standAlone = "<?php echo $standAlone?>";
    showPredictionjs(wfo,divWidth,prediction,standAlone);
  });
</script>

This appears to make "Most Likely Snowfall" the default Prediction, even when changing the Forecast Office.

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #18 on: March 21, 2024, 10:14:19 PM »
In inc-nwswinter.php 20231022 at about line 499 I changed...

Code: [Select]
<script type="text/javascript">
  $("#wfo").change(function () {
    var wfo = $(this).val();
var divWidth = "<?php echo $divWidth?>";
var prediction = "<?php echo &#39;SnowAmt90Prcntl&#39;?>";
var standAlone = "<?php echo $standAlone?>";
    showPredictionjs(wfo,divWidth,prediction,standAlone);
  });
</script>

To...

Code: [Select]
<script type="text/javascript">
  $("#wfo").change(function () {
    var wfo = $(this).val();
var divWidth = "<?php echo $divWidth?>";
var prediction = "<?php echo &#39;StormTotalSnowWeb&#39;?>"; //ddm 03/21/2024, this was 'SnowAmt90Prcntl' I changed it to 'StormTotalSnowWeb'
var standAlone = "<?php echo $standAlone?>";
    showPredictionjs(wfo,divWidth,prediction,standAlone);
  });
</script>

This appears to make "Most Likely Snowfall" the default Prediction, even when changing the Forecast Office.

Dennis
Nice work, Dennis. You have a good understanding of how the script works!  =D&gt; \:D/ =D&gt; [tup]
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2600
    • SouthEast Lincoln, NE Weather
Re: wxnwswinter.php
« Reply #19 on: March 21, 2024, 10:34:54 PM »
I have incorporated Dennis's modification into a new 'nwswinter.zip' that's available on my scripts page.

Thanks again, Dennis!  =D&gt;
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: wxnwswinter.php
« Reply #20 on: March 22, 2024, 01:02:27 PM »
Nice work, Dennis. You have a good understanding of how the script works!  =D&gt; \:D/ =D&gt; [tup]

Thank you, but I wouldn't go that far. Just a lucky guess.

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


Offline spweather

  • Contributor
  • ***
  • Posts: 130
    • Sand Point Weather
Re: wxnwswinter.php
« Reply #21 on: March 22, 2024, 01:03:32 PM »
I have incorporated Dennis's modification into a new 'nwswinter.zip' that's available on my scripts page.

Thanks again, Dennis!  =D&gt;

Thank You for this very useful script.

Dennis
Regards,
Dennis

- Davis Wireless Vantage Pro2 Plus w/24hr FARS
- Davis (Ultra)Sonic Anemometer
- Boltek/MicroLDN TOA Lightening Detection
- Porcupine Labs LR4/Fluke 414D Laser Rangefinder snow depth measuring sensor


 

anything