[Met_help] MET 1.0 tests not working

Cory Davis cory.davis at metservice.com
Thu Jan 10 18:25:46 MST 2008


Hi there,

We are having trouble running the test cases that come with MET v1.0.
There were problems with test_grid_stat.sh and test_pb2nc.sh. We have
managed to resolve the grid_stat issue by modifying grid_stat.cc.

The problem was occuring in the functions write_fcst_netcdf and
write_obs_netcdf when creating the netcdf variable names fcst_var_name,
diff_var_name, and obs_var_name.  I am no c expert, but the sprintf
calls did not seem to like the get_grib_code_abbr call as an argument,
and the resulting segment of the *_var_name variable was a garbage
string.  I have solved this problem by creating a new string
code_abbr_str, which is assigned thus (only once):

strcpy(code_abbr_str,get_grib_code_abbr(gc_info[lev].code,
conf.ncep_defaults().ival(), status));

and then passed to sprintf:
sprintf(fcst_var_name, "FCST_%s_%s_%s_%s_%i",code_abbr_str,
gc_info[lev].lvl_str, mask_names[i], mthd_str[mthd], wdth*wdth);

I have attached my modified grid_stat.cc

---------------

The problem with test_pb2nc.sh is the following

[cory at hydra scripts]$ test_pb2nc.sh  *** 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

 **************BUFR ARCHIVE LIBRARY ABORT*****************
 BUFRLIB: OPENBF - FIRST 4 BYTES READ FROM RECORD IN INPUT FILE
CONNECTED TO UNIT  11 NOT 'BUFR', DOES NOT CONTAIN BUFR DATA
 **************BUFR ARCHIVE LIBRARY ABORT*****************


I have tried unblocking this with cwordsh to no avail.  It is possible
that we will want to avoid pb2nc for our application, because our
observations are already in netcdf - we may decide to just write a
program converting our netcdf obs files to the MET internal netcdf
format.

Cheers,
Cory







More information about the Met_help mailing list