The Navigatrix has been updated. The new website can be found at

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Weather fax with meaningful file names
Site Admin

Joined: 20 Mar 2012, 13:32
Posts: 116
Another one for lazy folks like me...

I use Airmail + Pactor/SSB to receive weather fax underway. Works nicely but I find it very cumbersome to navigate through the fax files once they're received. Airmail simply names them with a utc time stamp based on the start of the transmnission (because that's all the information it has) - not an intuitive format to go back to and retrieve a specific fax. Of course I could save each received file under a meaningful name but I'm lazy...

Attached is a little Perl script that will copy received fax files from Airmail's "Faxfiles" directory into a directory of my choice and rename them based on some simple rules that are defined at the beginning of the script. I simply take a time interval and say for example "if a fax was received (i.e. start of transmission as indicated by the file name) between 0159 and 0213 utc copy it as 'VMC_AUS_MSLP_36.tif' (36hr forecast for Australia from station VMC) into the directory that I specify as a command line argument to the script.
Attachment: [1.38 KiB]
Downloaded 514 times

The format of these rules (lines 20-61 in the attached file) is simply
 ["utc_start_time", "utc_end_time", "target_file_name_without_extension"]

["0159", "0213", "VMC_AUS_MSLP_36"]

for the example above. The rules currently listed in the script are for faxes I possibly might receive while underway from New Caledonia to Australia. You can easily substitute your own schedule and faxes.

To use the script, simply save the attached ZIP file and extract the shell script into ~/bin ('~' being your home directory - in my case /home/markus/). Then press [ctrl]+[alt]+[T] to open a terminal and make the script executable by typing
chmod +x bin/wfcp [enter]

Whenever you have one or a bunch of faxes received, simply open a terminal as above and type
wfcp <directory to which the faxes are to be copied> [enter]

without the '<>' around the directory argument. If the directory does not exist it will be created. If you call the script without any directory argument it will copy the files into the current directory.

A few comments:
  • I set the start time for the rules in the script to one minute before the published start time for the respective chart transmission. Just in case the system clock is off by a few seconds and Airmail puts on a time stamp of 1459 rather than 1500...
  • All the time intervals in the script are currently 14min (except for some US stations every met service seems to send on even quarter hour times). That way there will be no overlap with a subsequent transmission but if I'm late with starting the fax or I have to restart during the transmission it will still named correctly when copied.
  • Copied file names will be prefixed by the utc date of the original file and postfixed by the utc start time of the orginal transmission. The former allowsto store faxes across multiple days in the same directory. The latter keeps faxes apart that are transmitted more than once daily (say a 0000 and a 1200 surface analysis). So in the example above the file in my destination directory would actually be named "131106_VMC_AUS_MSLP_36_0200.tif" for a fax transmission that started at 0200 utc on 06NOV
This logic assumes that there is no time overlaps in the file naming rules. If you have two faxes sent at the time from two different stations and on some days you may receive one and on other days the other you're out of luck. You could of course change the script and include the transmission frequency in the rules (available in the header files that Airmail stores for each received fax)....

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Search for:

Credits © 2010 - 2024