WXforum.net

Weather Related Organizations => NOAA National Weather Service => Topic started by: lobsterman on August 02, 2018, 03:21:11 PM

Title: NWS Marine Coastal forecasts in plain text
Post by: lobsterman on August 02, 2018, 03:21:11 PM
This URL https://forecast-v3.weather.gov/products/locations/GYX/CWF/1?format=text (https://forecast-v3.weather.gov/products/locations/GYX/CWF/1?format=text) gives a series of local zone forecasts along the Maine coast. I have been trying to figure out how to get only a single one of those local zone in that same text format.

For example, is there a format to get only the ANZ153 section or do I just need to write some kind of regex parser to accomplish that?
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: Otis on August 02, 2018, 03:57:57 PM
Is this similar to what you are looking for?
https://forecast.weather.gov/shmrn.php?mz=anz153 (https://forecast.weather.gov/shmrn.php?mz=anz153)

I have a series of marine weather pages on my site that use this source - with the relevant zones for Great Lakes that is  :grin:



Title: Re: NWS Marine Coastal forecasts in plain text
Post by: ocala on August 02, 2018, 05:13:47 PM
Don't know if this will help but the NWS also has point marine forecasts.
Very useful if you are going to be in a specific area.
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: lobsterman on August 11, 2018, 12:06:21 PM
Is this similar to what you are looking for?
https://forecast.weather.gov/shmrn.php?mz=anz153 (https://forecast.weather.gov/shmrn.php?mz=anz153)

I have a series of marine weather pages on my site that use this source - with the relevant zones for Great Lakes that is  :grin:

It is indeed, mostly, though that is still an HTML page. I was looking for a way to get plain text only, using curl or a similar tool.
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: Otis on August 11, 2018, 01:29:11 PM
Are you looking to have it on a web page within your site?  Similar to this?
https://lakehuronweather.org/wxMarineZoneLHZ347.php (https://lakehuronweather.org/wxMarineZoneLHZ347.php)

If so, I can share the code I use for this.

Edit:  There is also a text only within a web page.
 (https://marine.weather.gov/MapClick.php?zoneid=ANZ153&TextType=1[/url)
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: Otis on August 11, 2018, 01:32:50 PM
https://marine.weather.gov/MapClick.php?zoneid=ANZ153&TextType=1 (https://marine.weather.gov/MapClick.php?zoneid=ANZ153&TextType=1)

Here it is.
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: SoMDWx on August 11, 2018, 04:14:12 PM
Otis,
  I would be interested in your script!  :grin:

Jim
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: Otis on August 12, 2018, 11:10:22 AM
Sent you a PM.
Title: Re: NWS Marine Coastal forecasts in plain text
Post by: SoMDWx on August 12, 2018, 01:02:31 PM
Stupid me.. I deleted the wrong PM.... Please, if you wouldn't mind, send again?


Thanks!

Jim