Skip to content

Commit

Permalink
Per #1583, shifting gears back to the simpler solution of supporting …
Browse files Browse the repository at this point in the history
…HiRA as an interpolation method for Ensemble-Stat. Having the entire HiRA dictionary in Ensemble-Stat brings unecessary complications when the only part that we actually want/need is the size and shape. This simpler solution requires less documentation updates and should have not upstream impacts on METplus.
  • Loading branch information
JohnHalleyGotway committed Feb 17, 2022
1 parent e2fe9a2 commit c6c50b0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions met/data/config/ConfigConstants
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ AW_MEAN = 20;
GAUSSIAN = 21;
MAXGAUSS = 22;
GEOG_MATCH = 23;
HIRA = 24;

// Interpolation types
NONE = 1;
Expand Down
1 change: 1 addition & 0 deletions met/src/basic/vx_config/config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,7 @@ InterpMthd int_to_interpmthd(int i) {
else if(i == conf_const.lookup_int(interpmthd_gaussian_str)) m = InterpMthd_Gaussian;
else if(i == conf_const.lookup_int(interpmthd_maxgauss_str)) m = InterpMthd_MaxGauss;
else if(i == conf_const.lookup_int(interpmthd_geog_match_str)) m = InterpMthd_Geog_Match;
else if(i == conf_const.lookup_int(interpmthd_hira_str)) m = InterpMthd_HiRA;
else {
mlog << Error << "\nconf_int_to_interpmthd() -> "
<< "Unexpected value of " << i
Expand Down
2 changes: 2 additions & 0 deletions met/src/basic/vx_util/interp_mthd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ConcatString interpmthd_to_string(const InterpMthd m) {
case(InterpMthd_Gaussian): out = interpmthd_gaussian_str; break;
case(InterpMthd_MaxGauss): out = interpmthd_maxgauss_str; break;
case(InterpMthd_Geog_Match): out = interpmthd_geog_match_str; break;
case(InterpMthd_HiRA): out = interpmthd_hira_str; break;

case(InterpMthd_None):
default: out = interpmthd_none_str; break;
Expand Down Expand Up @@ -77,6 +78,7 @@ InterpMthd string_to_interpmthd(const char *mthd_str) {
else if(strcmp(mthd_str, interpmthd_gaussian_str ) == 0) m = InterpMthd_Gaussian;
else if(strcmp(mthd_str, interpmthd_maxgauss_str ) == 0) m = InterpMthd_MaxGauss;
else if(strcmp(mthd_str, interpmthd_geog_match_str) == 0) m = InterpMthd_Geog_Match;
else if(strcmp(mthd_str, interpmthd_hira_str) == 0) m = InterpMthd_HiRA;
else m = InterpMthd_None;

return(m);
Expand Down
4 changes: 3 additions & 1 deletion met/src/basic/vx_util/interp_mthd.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ enum InterpMthd {
InterpMthd_Lower_Left,
InterpMthd_Gaussian,
InterpMthd_MaxGauss,
InterpMthd_Geog_Match
InterpMthd_Geog_Match,
InterpMthd_HiRA
};

//
Expand All @@ -69,6 +70,7 @@ static const char interpmthd_lower_left_str[] = "LOWER_LEFT";
static const char interpmthd_gaussian_str[] = "GAUSSIAN";
static const char interpmthd_maxgauss_str[] = "MAXGAUSS";
static const char interpmthd_geog_match_str[] = "GEOG_MATCH";
static const char interpmthd_hira_str[] = "HIRA";

///////////////////////////////////////////////////////////////////////////////

Expand Down
1 change: 1 addition & 0 deletions met/src/basic/vx_util/interp_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ double compute_sfc_interp(const DataPlane &dp,
mlog << Error << "\ncompute_sfc_interp() -> "
<< "unsupported interpolation method encountered: "
<< interpmthd_to_string(mthd) << "(" << mthd << ")\n\n";
exit(1);
}

delete gt;
Expand Down

0 comments on commit c6c50b0

Please sign in to comment.