Re: [conduit] GRIB2 to GRIB1 from pqact pipe?

Pete,

When you need to FILE the data to disk, and then decide when the output
is complete in order to start processing the output file, you can use
the .status file as a first order
test, but as you mention, can't count on the exact ordering with split
feeds.

However, you can use the existence of a .status file to:

1) tell you the expected size of the recieved data
2) use the arrival as a starting point to check for the complete file

You can decide to go ahead an process the file after the .status file is
received if:
a) The FILE'd output has reached the inserted data set size specified
in .status
b) The output FILE is available and has not been updated in a certain
time

I've attached an example script which can be called from a cron driver
that looks
for new .status files and then processes the number of bytes expected
and
then runs the script with 3 arguments: directory filename size_in_bytes
It will proceed when either (a) or (b, 300 seconds) are met.

Steve Chiswell
Unidata User Support



On Wed, 2007-10-03 at 14:03 -0500, Pete Pokrandt wrote:
All,

We have several users who still require grib1 format data, and I've got cnvgrib working just fine. However, the way that cnvgrib reads its input data, you can't redirect stdin to it. What I mean is something like

  cnvgrib -21 grib2file grib1file

works great, but something like

  cat grib2file | cnvgrib -21 - grib1file

does not.

Does anyone have a good way of piping grib2 data into a converter to write out grib1 data from within pqact.conf? I guess the other alternative would be to wait for the status messages to come in and use those to trigger a batch conversion, but with the split feeds, it's not certain that the status message means that the data is complete, since the other feeds may still be coming in.

Thanks for any ideas.

Pete

Attachment: donetest.csh
Description: C-Shell script

  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the conduit archives: