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

19990201: gempak / www LDM text products



>From: address@hidden (Kathy Fryberger)
>Organization: .
>Keywords: 199902012026.NAA10596

>I would like to write some scripts to capture the NWX text for NOWcasts for
>our area and then ftp them over to our Web server.  I looked up in my 
>gempak tutorial about writing scripts for gempak commands, but I don't see
>how the NWX selections fit in here.  I know where the NOWcasts data is stored
>in my gempak files, but the text is not nicely readable as when the gempak
>gui for NWX and forecasts is selected.  Is there any way to do this?  Or 
>maybe I could run the nwx binary with parameters?  What would they be?  
>thanks!   kathyf
>P.S. thanks to the mcidas folks for those terrific mcidas scripts that
>capture displays as gif files!  the scripts worked great!!
>**********************************************************
>address@hidden  kathy fryberger  605-394-2291
>South Dakota School of Mines & Technology
>Rapid City, South Dakota 
>**********************************************************
>


Kathy,

You can make the LDM send the nowcasts directly to a file or
script for your use. In general, nwx isn't designed to run
non-interactively for output somewhere other than the printer.

You say you don't know how to make the text as nice as
how NWX displays it, I'm not sure exactly what you mean.
Perhaps you are referring to stripping out the control characters
(^C, ^A, ^M in the text). In the LDM you can add the -strip
option to the FILE and/or PIPE action to make the output
for your WWW server look clean.

To file the NOWcats into individual station products, instead
of a single file, you can use a pqact.conf entry such as:
WMO     ^FPUS7[1-6] (KCYS|KDEN|KOAX) ([0-3][0-9])([0-2][0-9])
        FILE    -strip  data/www/nowcast/(\2:yy)(\2:mm)\2\3_\1.now

You can use PIPE        -strip and send the data to a shell script
that takes the data as standard input and writes (or ftps) the
result to your www server with filenames that use the issuing office.

You can also use the EXEC action from pqact to trigger a script that will
execute and move the latest products to an output file.

If you can give me a little more information on how you need the output
data formated for your www server, I'll try to make things clearer 
if I can.

Steve Chiswell