[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #RZI-325369]: Re: New LDM server for EMWIN-only feed



> On Fri, 4 May 2007, Unidata LDM Support wrote:
> 
> > Gilbert,
> >
> > Your script which creates the FOS header for the bulletins retrieved by wget
> > needs to have a space " " character following the 3 digit sequence number, 
> > eg:
> >>
> >> #!/bin/csh
> >> printf "\001\r\r\n000\r\r\n"                      <<---change this line
> >> printf "SAUS80 KWBC `date --utc +%d%H%M`\r\r\n"
> >> printf "METAR\n"
> >
> >
> > printf "\001\r\r\n000 \r\r\n"                       <<-- corrected line
> >
> >
> > The pqsurf program expects the WMO header to begin at byte 12 in the 
> > bulletin.
> >
> > Most decoders aren't that rigid, they are usually looking for the start of 
> > the TTAAII at the beginning of
> > a line and not hardcoded to byte 12.
> >
> > Once you make that correction pqsurf will work.
> 
> Hmmm. I just did what you told me to...the METARs didn't make it into
> pqsurf. (puzzled.)
> 



Gilbert,

Your next problem is likely the maximum size for a bulletin allowed in 
surf_split.c which is 8192 bytes. Again, this also echoes the comment I
made previously about decoders expecting FOS products to be less
than a certain size. I ran your script and arrived at a product
of about 122Kb.

The surf_split.c code could be reasonably modified to dynamically allocate the 
product buffer, or the wget output could be split into a workable number of 
lines:

#!/bin/csh
wget -o /dev/null -O - 
'http://adds.aviationweather.gov/metars/index.php?station_ids=K&chk_metars=on'| 
\
    grep FONT | sed -e 's/<\/FONT>/=/' -e 's/<[^>]*.//g' -e 's/$/\x0D\x0D/' | \
    awk -f metar_split.awk | \
    pqing -vl - -5 -q test.pq -f "IDS|DDPLUS" -


I've attached the metar_split.awk script to this message.

Ive tested an it works here for creating bulletins of 80 obs each at 
around 4-6Kb.


Steve Chiswell
Unidata User Support



Ticket Details
===================
Ticket ID: RZI-325369
Department: Support LDM
Priority: Normal
Status: Closed

Attachment: metar_obs.awk
Description: Binary data