Skip to content

Commit

Permalink
Per #1020, modify calls for adding the name attribute to use getName(…
Browse files Browse the repository at this point in the history
…). The existing changes included *'s and don't actually match the name of the NetCDF variable. (#1389)
  • Loading branch information
JohnHalleyGotway authored Jun 25, 2020
1 parent 1b342df commit 0f36215
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions met/src/tools/core/grid_stat/grid_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,7 @@ void write_nc(const ConcatString &field_name, const DataPlane &dp,
ncFloat, lat_dim, lon_dim, deflate_level);

// Add variable attributes
add_var_att_local(&nc_var, "name", var_name);
add_var_att_local(&nc_var, "name", nc_var.getName());
add_var_att_local(&nc_var, "long_name", long_att);
add_var_att_local(&nc_var, "level", level_att);
add_var_att_local(&nc_var, "units", units_att);
Expand Down Expand Up @@ -2746,14 +2746,14 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp,
if(fcst_flag) {

// Define the forecast variable
fcst_var = add_var(nc_out, (string)fcst_var_name, ncFloat,
fcst_var = add_var(nc_out, (string) fcst_var_name, ncFloat,
lat_dim, lon_dim, deflate_level);

// Add to the list of previously defined variables
nc_var_sa.add(fcst_var_name);

// Add variable attributes for the forecast field
add_var_att_local(&fcst_var, "name", fcst_var_name);
add_var_att_local(&fcst_var, "name", fcst_var.getName());
att_str << cs_erase << conf_info.vx_opt[i_vx].fcst_info->name()
<< " at "
<< conf_info.vx_opt[i_vx].fcst_info->level_name();
Expand All @@ -2779,7 +2779,7 @@ void write_nbrhd_nc(const DataPlane &fcst_dp, const DataPlane &obs_dp,
nc_var_sa.add(obs_var_name);

// Add variable attributes for the observation field
add_var_att_local(&obs_var, "name", obs_var_name);
add_var_att_local(&obs_var, "name", obs_var.getName());
att_str << cs_erase
<< conf_info.vx_opt[i_vx].obs_info->name() << " at "
<< conf_info.vx_opt[i_vx].obs_info->level_name();
Expand Down

0 comments on commit 0f36215

Please sign in to comment.