[Met_help] pb2nc: -pbfile option not working right

John Halley Gotway johnhg at rap.ucar.edu
Tue Feb 17 21:14:48 MST 2009


Jonathan,

Looks like I have too many versions of code running around!  I've posted
this fix but only for METv1.1.  So I applied it to the METv2.0beta6
version and have attached it to this message.  Also, it'll be included in
the next beta release.

Please use the attached version of pb2nc.cc to replace the file
METv2.0beta6/src/pb2nc/pb2nc.cc.

Hopefully that'll do the trick.

Thanks,
John

> Hi again John,
>
> Could you possibly direct me to the bug fix in pb2ncc.cc because I
> encountered the same error in the v2 Beta pb2nc when processing multiple
> pbfiles:
>
> ERROR: process_pbfile() -> the observation time should remain the same
> for all PrepBufr messages: -62169984000 != 1212300000
>
> If it's a relatively simply fix, I can make it myself.
> Thanks!
> Jon
>
>
>> -----Original Message-----
>> From: John Halley Gotway [mailto:johnhg at rap.ucar.edu]
>> Sent: Thursday, February 12, 2009 1:00 PM
>> To: Case, Jonathan (MSFC)[]; met_help at ucar.edu
>> Subject: Re: pb2nc: -pbfile option not working right
>>
>> Jonathan,
>>
>> Good news.  I found a bug in PB2NC which I think is causing this
>> problem.
>>
>> When PB2NC reads the first PrepBufr file, it figures out how many
>> messages that file contains.  Then it attempts to read that number of
>> messages from all subsequent PrepBufr files, rather than
>> figuring out how many messages are actually in those files.  I think
>> the error you're seeing is PB2NC attempting to read more messages than
>> are actually in the file!
>>
>> I'll work up a fix for this, post it to the MET website, and send it
> to
>> you.
>>
>> Thanks for finding this issue, and sorry for the inconvenience.  I'll
>> write you when I have the fix ready.
>>
>> Thanks,
>> John
>>
>> Case, Jonathan (MSFC)[] wrote:
>> > John,
>> >
>> >
>> >
>> > I'm having issues trying to process multiple PREPBUFR files into a
>> > single daily netcdf file using pb2nc.
>> >
>> >
>> >
>> > So far, I've only had one successfully attempt when I first
> processed
>> > the 12z gdas1 file, then the 00z, 06z, 18z, and next day's 00z, each
>> > using the -pbfile option.  [I had to specify the beg_ds and end_ds
> to
>> be
>> > +/- 12 hours (43200 seconds) in order for this to work.  Smaller
>> values
>> > assigned to beg_ds and end_ds resulted in a failure.]  Even so, it
>> does
>> > not seem as if the -valid_begin and -valid_end options have any
>> effect.
>> > In my data, I had a few OBS times from before the specified -
>> valid_begin
>> > time of 20080531_234500:
>> >
>> >
>> >
>> > lc2:/raid1/casejl/MET/PB2NC > pb2nc
>> gdas1.20080601.t12z.prepbufr.blk.nr
>> > test_daily.nc PB2NCConfig_SFONLY_WRF -valid_begin 20080531_234500
>> > -valid_end 20080601_234500 -pbfile
>> gdas1.20080601.t00z.prepbufr.blk.nr
>> > -pbfile gdas1.20080601.t06z.prepbufr.blk.nr -pbfile
>> > gdas1.20080601.t18z.prepbufr.blk.nr -pbfile
>> > gdas1.20080602.t00z.prepbufr.blk.nr
>> >
>> > Reading Config File:    PB2NCConfig_SFONLY_WRF
>> >
>> > Creating NetCDF File:   test_daily.nc
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t12z.prepbufr.blk.nr
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t00z.prepbufr.blk.nr
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t06z.prepbufr.blk.nr
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t18z.prepbufr.blk.nr
>> >
>> > Reading PrepBufr File:  gdas1.20080602.t00z.prepbufr.blk.nr
>> >
>> >
>> >
>> >
>> >
>> > Then I tried processing the files in temporal order as follows
>> (keeping
>> > everything else the same):
>> >
>> >
>> >
>> > lc2:/raid1/casejl/MET/PB2NC > pb2nc
>> gdas1.20080601.t00z.prepbufr.blk.nr
>> > test_daily.nc PB2NCConfig_SFONLY_WRF -valid_begin 20080531_234500
>> > -valid_end 20080601_234500 -pbfile
>> gdas1.20080601.t06z.prepbufr.blk.nr
>> > -pbfile gdas1.20080601.t12z.prepbufr.blk.nr -pbfile
>> > gdas1.20080601.t18z.prepbufr.blk.nr -pbfile
>> > gdas1.20080602.t00z.prepbufr.blk.nr
>> >
>> > Reading Config File:    PB2NCConfig_SFONLY_WRF
>> >
>> > Creating NetCDF File:   test_daily.nc
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t00z.prepbufr.blk.nr
>> >
>> > Reading PrepBufr File:  gdas1.20080601.t06z.prepbufr.blk.nr
>> >
>> >
>> >
>> >
>> >
>> > ERROR: process_pbfile() -> the observation time should remain the
>> same
>> > for all PrepBufr messages: -62169984000 != 1212300000
>> >
>> > Your advice is much appreciated,
>> >
>> > Jon
>> >
>> >
>> >
>> > ***********************************************************
>> > Jonathan Case, ENSCO, Inc.
>> > Aerospace Sciences & Engineering Division
>> > Short-term Prediction Research and Transition Center
>> > 320 Sparkman Drive, Room 3062
>> > Huntsville, AL 35805-1912
>> > Voice: (256) 961-7504   Fax: (256) 961-7788
>> > Emails: Jonathan.Case-1 at nasa.gov
>> >
>> >              case.jonathan at ensco.com
>> >
>> > ***********************************************************
>> >
>> >
>> >
>> >
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pb2nc_METv2.0beta6_FIX.cc
Type: text/x-c++src
Size: 54858 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/met_help/attachments/20090217/09690645/attachment-0001.bin 


More information about the Met_help mailing list