Skip to content

Commit

Permalink
Per #2924, update Ensemble-Stat to set the VxPairBase::fcst_info pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Jul 16, 2024
1 parent 51bf007 commit 27fe8f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/pair_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ VxPairBase & VxPairBase::operator=(const VxPairBase &vx_pb) {
void VxPairBase::init_from_scratch() {

fcst_info = (VarInfo *) nullptr;
obs_info = (VarInfo *) nullptr;
obs_info = (VarInfo *) nullptr;

fclm_info = (VarInfo *) nullptr;
oclm_info = (VarInfo *) nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_statistics/pair_data_ensemble.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ void VxPairDataEnsemble::set_ens_info(EnsVarInfo *info) {
ens_info = new EnsVarInfo(*info);

// Set the base pointer
if(!fcst_info) set_fcst_info(info->get_var_info());
if(!fcst_info) set_fcst_info(ens_info->get_var_info());

return;
}
Expand Down
5 changes: 4 additions & 1 deletion src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,9 @@ void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict,
input_info.file_list = ens_files;
vx_pd.ens_info->add_input(input_info);

// Set the fcst_info, if needed
if(!vx_pd.fcst_info) vx_pd.set_fcst_info(next_var);

// Add InputInfo to fcst info list for each ensemble file provided
// set var_info to nullptr to note first VarInfo should be used
int last_member_index = ens_files->n() - (use_ctrl ? 1 : 0);
Expand Down Expand Up @@ -695,7 +698,7 @@ void EnsembleStatVxOpt::process_config(GrdFileType ftype, Dictionary &fdict,
}

// Allocate new VarInfo object for obs
vx_pd.obs_info = info_factory.new_var_info(otype);
vx_pd.obs_info = info_factory.new_var_info(otype);

// Set the VarInfo objects
vx_pd.obs_info->set_dict(odict);
Expand Down

0 comments on commit 27fe8f5

Please sign in to comment.