Navy swell images not updating?

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

No, it's not fixed. The Navy WAM stuff is still from early last week. I'm
waiting to see whether there's a constant URL I can use. If there is, it's
an easy fix. If not, I have to take some time to write some code to puzzle
out what the latest images are. That will take some time, and will be fragile.

I e-mailed their webmaster on Thursday. I don't expect to hear back before
Monday at the earliest. If I haven't heard back by Thursday evening, I'll
assume they don't have resource to support us civilians (hey, their job is
keeping the haze grey underway), I'll start coding. I have some other
HTML changes to make because the number and sizes of the images have
changed, and I'll get started on those maybe tonight.

When the new format goes up, it will very likely look very different.
 
Doing a quick look and it appears they run the simulation two a day (at 00Z and 12Z). If you are willing to not always have the latest and greatest it'd be pretty simple to do with some server side or client side scripting.

Since I'm a server side programmer I'm gonna do it in PHP :D
Code:
<?php

$date = date('Ymd');

$imgurl = 'https://www.fnmoc.navy.mil/wxmap_cgi/dynamic/27KM_COAMPS_E_PAC/' . $date . '00/27km_coamps_e_pac10.swlwvht.%03d.e_pac.gif';

for($hour=0; $hour <= 48; $hour += 6)
	echo '<img src="', sprintf($imgurl, $hour), '" />';

Shows the results from the 00Z run for the given date.

I don't know how long it takes them to generate the images so I don't know how close one could cut it if you wanted to get the newest ones without querying their site.
 
Thanks for the try, Mike, but I must be doing something wrong, they don't display for me.


All the best, James
 
Thanks for the try, Mike, but I must be doing something wrong, they don't display for me.


All the best, James

Did you try one of the other DTGs on the bottom of the page? Oh and the same security warning thing that Chuck mentions on his page still applies.

If that still doesn't work you can try http://www.mikemill.org/forecast2.php where I'm testing out running a cron to grab what should be the latest images and having the page just refer to its local copy. Should solve the issue with the Navy's moving target and the security warning due to the root cert.
 
Last edited:
Obviously I did something wrong...it works great now.


Thanks, Mike! I'll be adding that to my list of bookmarked pages. Totally cool!



All the best, James
 
https://www.shearwater.com/products/swift/

Back
Top Bottom