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

Feature 2708 mvmode merge flag default #2713

Merged
merged 5 commits into from
Oct 25, 2023

Conversation

davidalbo
Copy link
Contributor

@davidalbo davidalbo commented Oct 13, 2023

Expected Differences

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

Pull Request Testing

  • Describe testing already performed for these changes:
    I did these tests:
  1. create a config with a field that does not specify merge_flag/merge_thresh and make sure it defaults to NONE.
  2. create a config with a field that has merge_flag but no merge_thresh and observe the error exit.
  3. create a config with a field that has merge_thresh but no merge_flag and observe the error exit.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
    Take a previous test case (if still around) and modify the config file in the above 3 ways to see what happens.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

  • Do these changes include sufficient testing updates? [Yes ]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [October 17 2023].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

@davidalbo davidalbo added type: enhancement Improve something that it is currently doing component: code cleanup Code cleanup and maintenance issue priority: high High Priority labels Oct 13, 2023
@davidalbo davidalbo added this to the MET 12.0.0 milestone Oct 13, 2023
@davidalbo davidalbo self-assigned this Oct 13, 2023
@davidalbo davidalbo linked an issue Oct 13, 2023 that may be closed by this pull request
22 tasks
@hertneky
Copy link
Contributor

hertneky commented Oct 13, 2023

@davidalbo Should I be testing this also? If so, where is it installed? Or am I just reviewing the code changes?

@davidalbo
Copy link
Contributor Author

@hertneky I put a fresh mode executable built from this branch to /scratch/dave
If you could do some tests by running that, that'd be what I'm hoping for. (recommended tests above).

That plus look at the documentation changes.

I'd leave it to @JohnHalleyGotway to look at code changes.

@JohnHalleyGotway JohnHalleyGotway removed type: enhancement Improve something that it is currently doing component: code cleanup Code cleanup and maintenance issue priority: high High Priority labels Oct 19, 2023
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of these changes... with a couple minor proposed fixes to spacing and capitalization.

I note that all the GHA tests all ran and flagged no diffs. I reviewed the code changes, was able to step through the logic described in the comments, and think it makes sense. I also see that MODE is now making use of the default MODEMultivarConfig_default file that already existed but wasn't ever being read. Thanks for updating the user's guide to reference that config file.

The User's Guide could be updated to specifically outline this logic for how the merge_flag and merge_thresh config options are parsed. But I suspect that's too much detail for the User's Guide. If @hertneky sees it differently and would like this logic described there, then I defer to her.

Thanks for getting this one across the finish line @davidalbo!

}
} else {
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else {
} else {

Minor point. Just aligning braces.

false);
} else {
// get the parent's merge_thresh, just to have something. Error out if the merge_flag is not none
// becAuse that is inconsistent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// becAuse that is inconsistent
// because that is inconsistent

@hertneky
Copy link
Contributor

Test cntrl run with merge flag=THRESH and thresholds specified for the various fields. -> Object for fcst/obs look okay, all objects are merged into 1 cluster for both fcst/obs.

Test not specifying merge_flag/merge_thresh and make sure it defaults to NONE. -> Defaults to None and uses >=3.5 for all vars. Not sure why it specifies a random value for thresh, when merge is set to None, but it doesn't matter I suppose, since it is not used. Objects look the same as cntrl and no merging/clustered objects as expected.

Test specifying merge_flag=THRESH but no merge_thresh and observe the error exit. -> Errors as expected - need to specify a threshold.

Test usage of merge_thresh but no merge_flag and observe the error exit. -> Errors as expected - need to specify merge_flag

@davidalbo davidalbo merged commit 23f707a into develop Oct 25, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Enhance Multivariate MODE to change the default merge_flag setting to NONE
3 participants