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

Re: 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
> 
> Steve Chiswell wrote:
> > CONDUIT data users,
> >
> > On Tuesday Sep 25, NCEP will begin producing 10 additional fields in the
> > GEFS ensemble data output in support of TIGGE. These fields are:
> >  
> > - Specific humidity at 1000, 925, 850, 700, 500, 300, 250, & 200 mb
> > - Potential vorticity at 320K theta
> > - Dewpoint temperature at 2 m AGL
> >
> > These parameters will be added to the files being inserted as:
> > data2/TIGGE/gepXX.tHHz.pgrb2cfFF
> >
> > The current size of these files is ~300KB, and will increase to ~800KB
> > per perturbation (20) and forecast time (65) for a total of 650MB per
> > run time (4x per day).
> >
> > After taking in to account feedback received from my message on Sep 13,
> > 2007 regarding replacement of existing GRIB1 data sets with GRIB2
> > versions, a two
> > week transition period between changes will be scheduled as follows:
> >
> > DATE
> >
> > 10/02/2007
> >
> >
> > Remove existing RUC GRIB1 data
> > (GRIB2 data already being sent)
> > Add NAM awipak and grbgrd GRIB2 data
> > files
> >
> >
> > 10/16/2007
> >
> >
> > Remove NAM awipak and grbgrd GRIB1
> > data files
> > Add NAM awip3d GRIB2 data files
> >
> >
> > 10/30/2007
> >
> >
> > Remove NAM awip3d GRIB1 data files
> >
> > I will be updating the CONDUIT data examples on the web page with
> > additional
> > patterns to reflect these changes.
> >
> > Steve Chiswell
> > Unidata User Support
> >
> >
> >
> >   
> 
> 
-- 
Steve Chiswell <address@hidden>
Unidata

Attachment: donetest.csh
Description: C-Shell script