[Met_help] Re: MET FEEDBACK from Gerald van der Grijn

John Halley Gotway johnhg at rap.ucar.edu
Mon Feb 4 10:24:34 MST 2008


Gerald,

When compiling BUFRLIB, you have to use a C compiler and a Fortran-77 compiler.  So using "gcc" and "g77" is the correct thing to do.

Unfortunately, I'm out of ideas.  I have no idea why you're experiencing the problems you're having with BUFRLIB.  You should still be able to run the pieces of MET that don't use point observations: 
Grid-Stat and MODE.  If you by any chance have access to a different machine, you could try building and running MET there to see if you experience the same problems.

Also, what type of point observations are you trying to use?  Do you really want to use what's in the PREPBUFR files, or do you have observations in some other format?  You could always take your 
observations and reformat them into the intermediate NetCDF format (the output of PB2NC).

Here's a write-up that describes that NetCDF format: http://www.dtcenter.org/met/users/docs/overview.php (look for the write-up named "NetCDF Point Observation Format")

However, that format will be modified for the next release of MET (METv1.1) in the spring of 2008.  We're removing some unused fields to make it more simple.  Also in METv1.1, we'll be providing an 
additional tool which will allow you to reformat point observations from a simple ASCII format into that intermediate NetCDF format.

Here's a list of the planned modifications for METv1.1: http://www.dtcenter.org/met/users/support/future_releases/METv1.1/METv1.1_plans.php

Sorry I can't be of more help.

John Halley-Gotway

Gerald van der Grijn wrote:
> Hello John,
> 
> I used the original unblocked file and followed your instructions but I 
> had no luck.
> 
> Then I double checked the way I compiled. If I compile BUFRLIB with gcc 
> and g77 and build MET with g++ and g77 (default in make script) I get no 
> compilation errors. However, the PB2NC tool does not work.
> 
> I also tried to compile BUFRLIB with g++ and g77 (to have exactly the 
> same compilers that MET uses). As you can see from the output the 
> building then fails:
> 
> Thx for your time!
> Gerald
> 
>    /*** Making pb2nc application ***
> 
>    /usr/bin/g++ -c pb2nc_Conf.cc -g -Wall -Wshadow -static  \
>            -I../../lib
>    /usr/bin/g77 -c numpbmsg.f -g -Wall -Wshadow -static
>    /usr/bin/g77 -c openpb.f -g -Wall -Wshadow -static
>    /usr/bin/g77 -c readpb.f -g -Wall -Wshadow -static
>    /usr/bin/g77 -c dumppb.f -g -Wall -Wshadow -static
> 
> 
>    /usr/bin/g++ -o pb2nc pb2nc.cc pb2nc_Conf.o numpbmsg.o openpb.o
>    readpb.o dumppb.o  \
>            -g -Wall -Wshadow -static    
> -DMET_BASE=\"/home/grijn/MET/METv1.0\" \
>            -I/usr/include/gsl \
>            -I../../lib -I../../lib  -I/usr/include  \
>            -L../../lib -L../../lib  -L/usr/lib  \
>            -lbufr -lvx_grib_classes -lvx_wrfdata -lvx_econfig \
>            -lvx_data_grids -lvx_math -lvx_cal -lvx_util -lvx_met_util
>    -lm -lf2c \
>            -lnetcdf_c++ -lnetcdf
>    ../../lib/vx_wrfdata/shape.h:34: warning: 'class Shape' has virtual
>    functions but non-virtual destructor
>    ../../lib/vx_wrfdata/shape.h:50: warning: 'class
>    FreelyMoveableShape' has virtual functions but non-virtual destructor
>    ../../lib/vx_data_grids/grid_base.h:194: warning: 'class Integrand'
>    has virtual functions but non-virtual destructor
>    ../../lib/vx_data_grids/grid_base.h:206: warning: 'class
>    GridInterface' has virtual functions but non-virtual destructor
>    ../../lib/vx_wrfdata/vx_wrfdata.h:41: warning: 'wrfdata_magic'
>    defined but not used
>    ../../lib/vx_wrfdata/vx_wrfdata.h:64: warning: 'thresh_type_str'
>    defined but not used
>    ../../lib/vx_wrfdata/vx_wrfdata.h:85: warning: 'step_direction_str'
>    defined but not used
>    ../../lib/vx_met_util/constants.h:16: warning: 'proj_type' defined
>    but not used
>    ../../lib/vx_met_util/constants.h:23: warning: 'na_str' defined but
>    not used
>    ../../lib/vx_met_util/constants.h:26: warning: 'all_msg_typ_str'
>    defined but not used
>    ../../lib/vx_met_util/constants.h:38: warning: 'all_interp_mthd_str'
>    defined but not used
>    ../../lib/vx_met_util/constants.h:49: warning: 'mthd_str' defined
>    but not used
>    ../../lib/vx_met_util/met_stats.h:20: warning: 'hdr_fmt_str' defined
>    but not used
>    ../../lib/vx_grib_classes/grib_strings.h:20: warning: 'missing_str'
>    defined but not used
>    ../../lib/vx_grib_classes/grib_strings.h:62: warning:
>    'grib_code_list' defined but not used
>    ../../lib/vx_grib_classes/grib_strings.h:94: warning:
>    'grib_code_list_str' defined but not used
>    ../../lib/vx_grib_classes/grib_strings.h:358: warning:
>    'grib_level_list' defined but not used
>    ../../lib/vx_grib_classes/grib_strings.h:377: warning:
>    'grib_level_flag' defined but not used
>    ../../lib/vx_grib_classes/grib_strings.h:391: warning:
>    'grib_level_list_str' defined but not used
>    ../../lib/vx_met_util/read_grib.h:64: warning: 'two_to_one_grib'
>    defined but not used
>    /usr/lib/libbufr.a(bort2.o): In function `bort2_':
>    bort2.f:(.text+0xf9): undefined reference to `bort_exit_'
>    /usr/lib/libbufr.a(bort.o): In function `bort_':
>    bort.f:(.text+0xc6): undefined reference to `bort_exit_'
>    /usr/lib/libbufr.a(stndrd.o): In function `stndrd_':
>    stndrd.f:(.text+0x2ee): undefined reference to `restd_'
>    /usr/lib/libbufr.a(cmsgini.o): In function `cmsgini_':
>    cmsgini.f:(.text+0x63c): undefined reference to `restd_'
>    collect2: ld returned 1 exit status
>    make[3]: *** [pb2nc] Error 1
>    make[2]: *** [all] Error 2
>    make[1]: *** [targets] Error 2
>    make: *** [all] Error 2
>    /
> 
> 
> 
> I also tried
> 
> John Halley Gotway wrote:
>> Gerald,
>>
>> I'm stumped.
>>
>> I suppose that one thing we could try would be for you to start with 
>> the unblocked file, and then perform the blocking on your end.  Rather 
>> than unblocking and reblocking.
>>
>> If you'd like to try that, you can retrieve the unblocked file from:
>> ftp.rap.ucar.edu/incoming/irap/ndas.t00z.prepbufr.tm12.20070401.nr
>> Just to be safe, remove the files ndas.t00z.prepbufr.tm12.20070401.nr 
>> and ndas.t00z.prepbufr.tm12.20070401.nr.blk from your directory before 
>> downloading this new version.
>> Then try blocking it on your machine, and run the test script again.
>>
>> I'm not sure if that'll help or not.  I can't reliably reproduce the 
>> error here, so it's difficult to debug it.
>>
>> Also, did you compile BUFRLIB with the same "family" of compilers that 
>> you used to compile MET?  Meaning, did you use GNU for both or PGI for 
>> both?  If not, that may cause problems.
>>
>> Sorry it's taking a while, but hopefully we can figure it out.
>>
>> John
>>
>> Gerald van der Grijn wrote:
>>> Hi John,
>>>
>>> I unblocked and blocked the data files without any error:
>>>
>>>    /grijn at oblik:~/MET/METv1.0/data/sample_obs/prepbufr$ cwordsh unblk
>>>    ndas.t00z.prepbufr.tm12.20070401.nr.blk
>>>    ndas.t00z.prepbufr.tm12.20070401.nr/
>>>    / unblocking from:/
>>>    / ndas.t00z.prepbufr.tm12.20070401.nr.blk/
>>>    /              to:/
>>>    / ndas.t00z.prepbufr.tm12.20070401.nr/
>>>
>>>    /grijn at oblik:~/MET/METv1.0/data/sample_obs/prepbufr$ cwordsh block
>>>    ndas.t00z.prepbufr.tm12.20070401.nr
>>>    ndas.t00z.prepbufr.tm12.20070401.nr.blk/
>>>
>>>    / blocking from:/
>>>    / ndas.t00z.prepbufr.tm12.20070401.nr/
>>>    /            to:/
>>>    / ndas.t00z.prepbufr.tm12.20070401.nr.blk/
>>>
>>>
>>> However, the problem remains when I run the test script....
>>>
>>> Thanks for your help!
>>>
>>> Gerald
>>>
>>> John Halley Gotway wrote:
>>>> Gerald,
>>>>
>>>> OK, I think I've figured it out.  I was able to run the PB2NC tool 
>>>> in such a way as to reproduce that exact same error message you're 
>>>> seeing.
>>>>
>>>> The issue has to do with how the input PREPBUFR file is "fortran 
>>>> blocked".  Before the input PREPBUFR file can be read by BUFRLIB, it 
>>>> must be fortran blocked to perform an unformatted read of the data.  
>>>> I really don't understand this all that well, but I think we can fix 
>>>> the problem for you.  The sample data that's distributed with MET 
>>>> was fortran blocked on a machine here.  Since your machine isn't 
>>>> exactly the same as ours though, that fortran blocking done here 
>>>> won't necessarily work on yours.
>>>>
>>>> You'll need to redo the fortran blocking for the sample PREPBUFR 
>>>> files on your machine.  And you'll need to use the "cwordsh" tool 
>>>> distributed by NCEP to do so.  If you don't already have a copy of 
>>>> "cwordsh", please see the link for it on the MET website: 
>>>> http://www.dtcenter.org/met/users/downloads/index.php
>>>>
>>>> Once you have "cwordsh", here's how you'd go about redoing the 
>>>> fortran blocking:
>>>> cd /home/grijn/MET/METv1.0/data/sample_obs/prepbufr
>>>> chmod 777 .
>>>> cwordsh unblk ndas.t00z.prepbufr.tm12.20070401.nr.blk 
>>>> ndas.t00z.prepbufr.tm12.20070401.nr
>>>> cwordsh block ndas.t00z.prepbufr.tm12.20070401.nr     
>>>> ndas.t00z.prepbufr.tm12.20070401.nr.blk
>>>>
>>>> Then go back and rerun the test scripts.
>>>>
>>>> Please let me know whether or not this worked.  Your machine may or 
>>>> may not be able to perform the unblocking step on this file.  If 
>>>> not, I'll send you the unblocked files to begin with.
>>>>
>>>> Let me know, and thanks for your patience.
>>>>
>>>> Once we figure this out, I'll post the fix to the MET known issues 
>>>> page: 
>>>> http://www.dtcenter.org/met/users/support/known_issues/METv1.0/METv1.0_known_issues.php 
>>>>
>>>>
>>>> Thanks,
>>>> John
>>>>
>>>> Gerald van der Grijn wrote:
>>>>> Hi John,
>>>>>
>>>>> Thanks for your reply. I checked with the systems people and they 
>>>>> are pretty sure it is a 32-bit processor (albeit dual core).
>>>>>
>>>>> I have attached the make.log which contains lots of warnings. 
>>>>> However, I don't think these warnings cause any harm.
>>>>>
>>>>> Gerald
>>>>>
>>>>>
>>>>>
>>>>> John Halley Gotway wrote:
>>>>>> Gerald,
>>>>>>
>>>>>> My guess is that you've installed and are running MET on a 64-bit 
>>>>>> machine.  Unfortunately, the BUFR library which MET links to for 
>>>>>> the PB2NC tool does not work well on a 64-bit machine.
>>>>>>
>>>>>> I have told the folks at NCEP who developed BUFRLIB about the 
>>>>>> issue and they're working to address it.  For the time being 
>>>>>> though, you've have a couple of options:
>>>>>> (1) If you have access to a 32-bit machine, install and build MET 
>>>>>> there.  You may even be able to copy over the executables you 
>>>>>> generate to your 64-bit machine and run them there.
>>>>>> (2) Try to build MET (and the libraries on which it depends) on 
>>>>>> your 64-bit machine using the 32-bit compiler options.  I've 
>>>>>> attempted to do this on a 64-bit machine we have here at NCAR, but 
>>>>>> ran into several issues.  I had a difficult time trying to get 
>>>>>> NetCDF to compile as 32-bit.
>>>>>>
>>>>>> I'll write the NCEP people and ask for an update.  I believe that 
>>>>>> once we resolve this issue in BUFRLIB for 64-bit machines, MET 
>>>>>> should run fine on them.
>>>>>>
>>>>>> Let me know if there's anything else I can help you with.
>>>>>>
>>>>>> Thanks,
>>>>>> John Halley Gotway
>>>>>>
>>>>>> MET.FEEDBACK at rap.ucar.edu wrote:
>>>>>>> First Name = Gerald
>>>>>>> Last Name = van der Grijn
>>>>>>> Institution = ARGOSS
>>>>>>> Email = grijn at argoss.nl
>>>>>>> MET Feedback = Hello,
>>>>>>>
>>>>>>> I have successfully installed the tool kit. However, when I run 
>>>>>>> the test script PB2NC does not seem to work. It gives the 
>>>>>>> following message:
>>>>>>>
>>>>>>> *** Running PB2NC on a fortran-blocked PrepBufr file ***
>>>>>>> PrepBufr2NC config file: config/PB2NCConfig_G212
>>>>>>> Opening PrepBufr file: 
>>>>>>> ../data/sample_obs/prepbufr/ndas.t00z.prepbufr.tm12.20070401.nr.blk
>>>>>>>
>>>>>>>
>>>>>>> ERROR: main() -> No PrepBufr messages to process!
>>>>>>>
>>>>>>>
>>>>>>>  +++++++++++++++++++++++WARNING+++++++++++++++++++++++++
>>>>>>>  BUFRLIB: OPENBF - INPUT BUFR FILE IN UNIT  11 IS EMPTY
>>>>>>>  +++++++++++++++++++++++WARNING+++++++++++++++++++++++++
>>>>>>>
>>>>>>>
>>>>>>> Do you have any clue what the problem might be. It seems that my 
>>>>>>> BUFR library has not been correctly installed....
>>>>>>>
>>>>>>>
>>>>>>> Thx,
>>>>>>> Gerald
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
> 


More information about the Met_help mailing list