GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  METAF2XML::SRC2RAW (3)

.ds Aq ’

NAME

metaf2xml::src2raw - convert data from different sources to standard format

CONTENTS

SYNOPSIS



 use metaf2xml::src2raw 1.058;

 metaf2xml::src2raw::start_file($format,$suppressNIL,$wmo_prefix);
 while (1) {
   my $line = <>;
   @msgs = metaf2xml::src2raw::next_line($line);
   # process contents of @msgs ...
   last unless defined $line;
 }



DESCRIPTION

This Perl module contains functions to convert METAR, TAF, SYNOP, BUOY or AMDAR information provided in files on various public Internet servers to messages delimited by a newline and in the format specified by the WMO Manual No. 306, without modifications due to distribution like providing the initial part of messages only once for several messages or appending an = (equal sign) to terminate a message. It prepends parts of the WMO header according to the argument wmo_prefix. The output can then be used by the module metaf2xml::parser.

ABBREVIATIONS

noaa National Oceanic and Atmospheric Administration
nws the National Weather Service department of the NOAA
iws the Internet Weather Source of the NWS
adds the Aviation Digital Data Service of the NWS
addsds the experimental data server of the Aviation Digital Data Service of the NWS
cod College of DuPage
fsu Florida State University
isu Iowa State University

SUBROUTINES/METHODS

start_file($format,$suppressNIL,$wmo_prefix)

This function must be called before processing a file. The following arguments are expected:
format origin of the input data: metar_cycle_iws, staf_cycle_iws, taf_cycle_iws, metaf_nws, metaf_cod, metaf_fsu, metaf_isu, synop_nws, synop_cod, synop_fsu, synop_isu, buoy_nws, buoy_isu, amdar_nws, amdar_fsu, amdar_isu
suppressNIL if true, messages that only contain NIL are not returned
wmo_prefix which parts of the WMO header (TTAA[II] CCCC DDHHMM [BBB]) to prepend to each message:
0 (no header) (default)
1 TT (report type:
SA METAR
SP SPECI
FT TAF with forecast period >= 12 hours
FC TAF with forecast period < 12 hours
SM SYNOP at main hours (00:00, 06:00, 12:00, 18:00 UTC)
SI SYNOP at intermediate (main + 3) hours
SN SYNOP at non-standard (other than main and intermediate) hours
SS BUOY
UD AMDAR

)

2 TTAA[II] (like 1 plus region for the stations and optional report number)
3 TTAA[II] CCCC (like 2 plus report dissemination location)
4 TTAA[II] CCCC DDHHMM (like 3 plus report dissemination time)
5 TTAA[II] CCCC DDHHMM [BBB] (like 4 plus optional indicator if the report is delayed/corrected/amended/segmented)
The function will return 0 on success, or a string describing the error which occurred.

next_line($line)

This function must be called for each line in a file and once with the argument undef at the end of file.

The following arguments are expected:
line string that contains a line from the file, or undef after the last line of the file
The return value is an array of 0, 1 or 2 strings, or an array with one element which is undef if start_file() was not called (never, or after next_line() was called with undef).

SEE ALSO

metaf2xml::parser(3pm), metafsrc2raw(1), metaf(1), <http://metaf2xml.sourceforge.net/>

COPYRIGHT and LICENSE

copyright (c) 2011-2015 metaf2xml @ <http://metaf2xml.sourceforge.net/>

This file is part of metaf2xml.

metaf2xml is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

metaf2xml is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with metaf2xml; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA, or see <http://www.gnu.org/licenses/>.

Search for    or go to Top of page |  Section 3 |  Main Index


metaf2xml 1.58 METAF2XML::SRC2RAW (3pm) 2015-12-23

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.