[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20031113: 20031112: problem with dclsfc with synoptic bulletin
- Subject: 20031113: 20031112: problem with dclsfc with synoptic bulletin
- Date: Thu, 13 Nov 2003 15:14:10 -0700
David,
You don't have the correct header:
You have:
001 \n \n \n 9 9 0 \n S M C N 3 5 C
W A O 1 3 1 2 0 0 R R G \n
You need ^A \r \r \n instead of ^A \n \n \n. That is,
The control-M characters are what you will see from the \r (or \015)
characters. The \n character is newline, or \012.
Sinilarly, for the trailer, you need \r \r \n ^C instead of
\n \n \n ^C.
Steve Chiswell
>From: "David Bernhardt" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200311131943.hADJhlOb029320
>This is a multi-part message in MIME format.
>--------------090004030609080306090703
>Content-Type: multipart/alternative;
> boundary="------------050009090507070400040807"
>
>
>--------------050009090507070400040807
>Content-Type: text/plain; charset=us-ascii; format=flowed
>Content-Transfer-Encoding: 7bit
>
>I have attached my csh which tries to write a gem file. I am using an -s
>option
>to link to a specific file that has the station numbers in it that I am
>interested in.
>The WAOSSMWAO1 is the file with the appropriate ^A^M codes.
>
>Dave
>
>Unidata Support wrote:
>
>>David,
>>
>>The default station table for dclsfc is: lsfstns.tbl which
>>I have linked to lsystns.upc.
>>
>>Are you using the -s option? I'd have to see your invocation again with
>>the data file. The one you sent yesterday was all "nil".
>>
>>Steve Chiswell
>>
>>
>>
>>
>>>From: "David Bernhardt" <address@hidden>
>>>Organization: UCAR/Unidata
>>>Keywords: 200311131711.hADHB2Ob005030
>>>
>>>
>>
>>
>>
>>>Thanks for the response, Steve. I did not get the same error when I
>>>placed your code at the
>>>head and tail of the file. However, I get another problem. The log file
>>>says:
>>>[DCLSFC 7] Bulletin: 999 SMCN35 CWAO 131200 RRH
>>>[SF -10] Station xxxxx is not in file.
>>>[DC 2] read 0/102193 byes strt 207 newstrt 207
>>>[DC -9] End of input data file
>>>[DC 5] Normal termination.
>>>
>>>I have tried this with a couple of different files that do have the
>>>offending station in the
>>>appropriate table file ($GEMTBL/tables/stsns/systns.tbl).
>>>
>>>More ideas would be appreciated.
>>>
>>>Dave
>>>
>>>Unidata Support wrote:
>>>
>>>
>>>
>>>>David,
>>>>
>>>>The metar decoder is built to allow both FOS style (^A^M^M\n.....^M^M\n^C)
>>>>bulletin separators, and AFOS style (ZCZC.....NNNN) separators
>>>>as found in the $GEMPAK/source/bridge/mt/mtdcod.f routine, where
>>>>the call to DC_GBUL will determine which of the styles the bulletin is,
>>>>and call either DC_GHDR for FOS or DC_GPIL for AFOS.
>>>>
>>>>The dclsfc decoder routine $GEMPAK/source/bridge/ls/lsdcod.f only has a cal
> l
>>>>
>>>>
>>>to
>>>
>>>
>>>>the FOS style header routine, so is not built to expect AFOS style ZCZC....
> NN
>>>>
>>>>
>>>NN
>>>
>>>
>>>>delimeters. You could add the check on iftype returned from DC_GHDR through
> .
>>>>
>>>>On a FOS style header, the AFOS style PIL identifier you have is not presen
> t.
>>>>Rather, you should have metar bulletins that look like either:
>>>>
>>>>^A^M^M
>>>>sequence number (eg 999, etc)
>>>>WMO header (eg SAUS80 KWBC 121800 etc)
>>>>....
>>>>
>>>>^M^M
>>>>^C
>>>>
>>>>For an AFOS Metar,
>>>>ZCZC NNNMTRCCC
>>>>SAUS80 KWBC 122100
>>>>.....
>>>>NNNN
>>>>
>>>>
>>>>Since dclsfc is expecting FOS bulletins only, your bulletin should look lik
> e:
>>>>^A^M^M
>>>>999
>>>>SMCN23 CWAO 120900
>>>>AAXX 12094
>>>>71300 NIL=
>>>>71301 NIL=
>>>>71303 NIL=
>>>>71304 NIL=
>>>>....
>>>>^M^M
>>>>^C
>>>>
>>>>
>>>>I created a header and trailer for your bulletin with:
>>>>echo 'AMML' | tr 'AMLC' '\001\015\012\003' >! header
>>>>echo 'MMLC' | tr 'AMLC' '\001\015\012\003' >! trailer
>>>>and then edited your WAO....file placing the header and seq. number at
>>>>the top and the trailer at the end and eliminated the AFOS 9 character pil.
>>>>At that point, it will decode.
>>>>
>>>>Steve Chiswell
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>****************************************************************************
>>Unidata User Support UCAR Unidata Program
>>(303)497-8643 P.O. Box 3000
>>address@hidden Boulder, CO 80307
>>----------------------------------------------------------------------------
>>Unidata WWW Service http://my.unidata.ucar.edu/content/support
>>****************************************************************************
>>
>>
>
>
>--------------050009090507070400040807
>Content-Type: text/html; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
><html>
><head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
> <title></title>
></head>
><body text="#000000" bgcolor="#ffffff">
>I have attached my csh which tries to write a gem file. I am using an
>-s option<br>
>to link to a specific file that has the station numbers in it that I am
>interested in.<br>
>The WAOSSMWAO1 is the file with the appropriate ^A^M codes.<br>
><br>
>Dave<br>
><br>
>Unidata Support wrote:<br>
><blockquote type="cite"
> cite="address@hidden">
> <pre wrap="">David,
>
>The default station table for dclsfc is: lsfstns.tbl which
>I have linked to lsystns.upc.
>
>Are you using the -s option? I'd have to see your invocation again with
>the data file. The one you sent yesterday was all "nil".
>
>Steve Chiswell
>
>
> </pre>
> <blockquote type="cite">
> <pre wrap="">From: "David Bernhardt" <a class="moz-txt-link-rfc2396E" href
> ="mailto:address@hidden"><address@hidden></a>
>Organization: UCAR/Unidata
>Keywords: 200311131711.hADHB2Ob005030
> </pre>
> </blockquote>
> <pre wrap=""><!---->
> </pre>
> <blockquote type="cite">
> <pre wrap="">Thanks for the response, Steve. I did not get the same error
> when I
>placed your code at the
>head and tail of the file. However, I get another problem. The log file
>says:
>[DCLSFC 7] Bulletin: 999 SMCN35 CWAO 131200 RRH
>[SF -10] Station xxxxx is not in file.
>[DC 2] read 0/102193 byes strt 207 newstrt 207
>[DC -9] End of input data file
>[DC 5] Normal termination.
>
>I have tried this with a couple of different files that do have the
>offending station in the
>appropriate table file ($GEMTBL/tables/stsns/systns.tbl).
>
>More ideas would be appreciated.
>
>Dave
>
>Unidata Support wrote:
>
> </pre>
> <blockquote type="cite">
> <pre wrap="">David,
>
>The metar decoder is built to allow both FOS style (^A^M^M\n.....^M^M\n^C)
>bulletin separators, and AFOS style (ZCZC.....NNNN) separators
>as found in the $GEMPAK/source/bridge/mt/mtdcod.f routine, where
>the call to DC_GBUL will determine which of the styles the bulletin is,
>and call either DC_GHDR for FOS or DC_GPIL for AFOS.
>
>The dclsfc decoder routine $GEMPAK/source/bridge/ls/lsdcod.f only has a call
> </pre>
> </blockquote>
> <pre wrap="">to
> </pre>
> <blockquote type="cite">
> <pre wrap="">the FOS style header routine, so is not built to expect AFO
> S style ZCZC....NN
> </pre>
> </blockquote>
> <pre wrap="">NN
> </pre>
> <blockquote type="cite">
> <pre wrap="">delimeters. You could add the check on iftype returned from
> DC_GHDR through.
>
>On a FOS style header, the AFOS style PIL identifier you have is not present.
>Rather, you should have metar bulletins that look like either:
>
>^A^M^M
>sequence number (eg 999, etc)
>WMO header (eg SAUS80 KWBC 121800 etc)
>....
>
>^M^M
>^C
>
>For an AFOS Metar,
>ZCZC NNNMTRCCC
>SAUS80 KWBC 122100
>.....
>NNNN
>
>
>Since dclsfc is expecting FOS bulletins only, your bulletin should look like:
>^A^M^M
>999
>SMCN23 CWAO 120900
>AAXX 12094
>71300 NIL=
>71301 NIL=
>71303 NIL=
>71304 NIL=
>....
>^M^M
>^C
>
>
>I created a header and trailer for your bulletin with:
>echo 'AMML' | tr 'AMLC' '\001\015\012\003' >! header
>echo 'MMLC' | tr 'AMLC' '\001\015\012\003' >! trailer
>and then edited your WAO....file placing the header and seq. number at
>the top and the trailer at the end and eliminated the AFOS 9 character pil.
>At that point, it will decode.
>
>Steve Chiswell
>
>
>
>
>
>
>
>
> </pre>
> </blockquote>
> <pre wrap="">
> </pre>
> </blockquote>
> <pre wrap=""><!---->
>**************************************************************************** &
> lt;
>Unidata User Support UCAR Unidata Program &
> lt;
>(303)497-8643 P.O. Box 3000 &
> lt;
><a class="moz-txt-link-abbreviated" href="mailto:address@hidden">sup
> address@hidden</a> Boulder, CO 80307
> <
>---------------------------------------------------------------------------- &
> lt;
>Unidata WWW Service <a class="moz-txt-link-freetext" href="http:/
> /my.unidata.ucar.edu/content/support">http://my.unidata.ucar.edu/content/supp
> ort</a> <
>**************************************************************************** &
> lt;
> </pre>
></blockquote>
><br>
></body>
></html>
>
>--------------050009090507070400040807--
>
>--------------090004030609080306090703
>Content-Type: text/plain;
> name="WAOSSMWAO1"
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline;
> filename="WAOSSMWAO1"
>
>
>
>
>990
>SMCN35 CWAO 131200 RRG
>AAXX 13124
>71593 46/// /2205 11026 21039 333 11035 21058=
>
>
>
>
>
>
>991
>SMCN35 CWAO 131200 RRH
>AAXX 13124
>71584 46/// /1002 10009 20002 333 10056 21004=
>
>
>
>
>
>
>992
>SMCN33 CWAO 131800 RRB
>AAXX 13184
>71387 46/// /0408 10004 20002 39469 49832 56036 333 10021 20001=
>
>
>
>
>
>--------------090004030609080306090703
>Content-Type: text/plain;
> name="stuff_RR1.csh"
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline;
> filename="stuff_RR1.csh"
>
>#!/bin/csh
>
># A program to stuff browning winds into a gempak file
>#
>#set date
>cd /usr1/lcl_progs/synop
>
>set gmtyr = `date -u +%y`
>set gmtmn = `date -u +%m`
>set gmtdy = `date -u +%d`
>set gmthr = `date -u +%H`
>set hrpost = "00"
>
>#set gmtdy = "08"
>setenv DATE $gmtyr$gmtmn$gmtdy
>setenv TIME $gmthr$hrpost
>
>
>/usr1/nawips/bin/linux/dclsfc -v 12 -c ${DATE}/${TIME} -b 12 -d x.log -p /usr1
> /nawips/gempak/tables/pack/sfsyn.pack \
>-s /usr1/nawips/gempak/tables/stns/systns.tbl ${DATE}_x.gem < WAOSSMWAO1
>
>
>more x.log
>
>--------------090004030609080306090703--
>