Skip to content

jbuitt/nwws-perl-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nwws-perl-client

A simple client for the NWWS-2 OI (NOAA Weather Wire Service version 2 Open Interface) written in Perl. The NOAA Weather Wire Service is a satellite data collection and dissemination system operated by the National Weather Service, which was established in October 2000. Its purpose is to provide state and federal government, commercial users, media and private citizens with timely delivery of meteorological, hydrological, climatological and geophysical information.

This client was largely based on the example script found in the Net::Jabber Perl module documentation directory /usr/share/doc/libnet-jabber-perl/examples/client.pl.

####How do I run it? This script was developed and tested on Ubuntu 16.04. After downloading the latest release, run the following command to install the dependencies:

$ sudo apt-get -y install libnet-jabber-perl libconfig-inifiles-perl libxml-simple-perl

Now create a config file: (e.g. config.ini)

[Main]
server=nwws-oi.weather.gov
port=5222
username=[username]
password=[paswword]
resource=[resource]
logfile=/path/to/log/file
archivedir=/path/to/archive/dir
debugfile=/path/to/debug/file
panrun=/path/to/executable_or_script

Where [username] and [password] are your NWWS-2 credentials obtained by signing up on the NOAA Weather Wire Service website. You may use whatever you would like for [resource]. If you supply a path to a file for debugfile, it will log all Net::Jabber debug messages to that file, however this is optional. The [panrun] variable is another optional option that indicates a Product Arrival Notification (PAN) script that you'd like to run on product arrival.

NOTE: Despite the NWWS-2 website's instructions to use port 5223, this client uses TLS on port 5222. Support for SSL on port 5223 was buggy within the client, so I removed it.

Now run the script:

$ ./nwws2.pl /path/to/config.ini

Provided that you're able to connect to the NWWS and your credentials are accepted, you will start to see products appear in the supplied archive directory in the following format:

[archive_dir]/
   [wfo]/
      [awips_id]-[product_id]-[product_datetime].txt

You can then type Ctrl+Z and then bg to send it to the background to continue downloading products. The script will automatically reconnect to NWWS if the connection is dropped.

####Author

License

See LICENSE file.

About

NOAA Weather Wire Service (NWWS) Perl Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published