Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix 1879 develop ecmwf grib1 #1881

Merged
merged 1 commit into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions met/src/libcode/vx_data2d_grib/var_info_grib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,7 @@ void VarInfoGrib::add_grib_code (Dictionary &dict)
}
int field_center = dict.lookup_int (conf_key_GRIB1_center, false);
int field_subcenter = dict.lookup_int (conf_key_GRIB1_subcenter, false);
Grib1TableEntry tab;

// if not specified, fill others with default values
if(field_ptv == bad_data_int) field_ptv = default_grib1_ptv;
if(field_center == bad_data_int) field_center = default_grib1_center;
if(field_subcenter == bad_data_int) field_subcenter = default_grib1_subcenter;
Grib1TableEntry tab;

// if the name is specified, use it
if( !field_name.empty() ){
Expand All @@ -229,9 +224,13 @@ void VarInfoGrib::add_grib_code (Dictionary &dict)
if( !GribTable.lookup_grib1(field_name.c_str(), default_grib1_ptv, field_code, default_grib1_center, default_grib1_subcenter, tab, tab_match) )
{
mlog << Error << "\nVarInfoGrib::add_grib_code() -> "
<< "unrecognized GRIB1 field abbreviation '"
<< field_name << "' for table version " << field_ptv
<< "\n\n";
<< "unrecognized GRIB1 field abbreviation '" << field_name
<< "' for table version (" << field_ptv
<< "), center (" << field_center
<< "), and subcenter (" << field_subcenter
<< ") or default table version (" << default_grib1_ptv
<< "), center (" << default_grib1_center
<< "), and subcenter (" << default_grib1_subcenter << ").\n\n";
exit(1);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict,
vx_pd.obs_info->set_dict(odict);

// Set the GRIB code for point observations
if(!use_var_id) vx_pd.obs_info->add_grib_code(odict);
if(point_vx && !use_var_id) vx_pd.obs_info->add_grib_code(odict);

// Dump the contents of the current VarInfo
if(mlog.verbosity_level() >= 5) {
Expand Down