Bugfix #3020 develop grid_stat_seeps #3021
Open
+39
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expected Differences
These changes were a bit more involved than I expected. I found that the
GridStatNcOutInfo::do_seeps
was missing entirely. So I updatedgrid_stat_conf_info.h/.cc
to parse it from the Config file, store its value, and then include it with the other nc output flags being checked. The updated ingrid_stat.cc
is to check that flag to determine whether or not SEEPS data should be written to the NetCDF matched pairs file. Prior to this fix, if SEEPS was computed, then it would always be written to the NetCDF matched pairs file with no way to disable that.Do these changes introduce new tools, command line arguments, or configuration file options? [No]
If yes, please describe:
Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]
If yes, please describe:
Pull Request Testing
Manually tested on seneca in
/d1/projects/METplus/discussions/2794
This version, when listed in
GridStat_global_24h_precip_SEEPS_testing.conf
and run withrun_gs.sh
produces the segfault:This version runs without error:
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
Please review unrelated doc updates to confirm that the updated URL links work.
Consider testing the code compiled in
seneca:/d1/personal/johnhg/MET/MET_development/MET-bugfix_3020_develop_grid_stat_seeps
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]
No real updates needed. However, unrelated, I also fixed some broken links to the NetCDF-CF conventions website, as requested by @michelleharrold.
Do these changes include sufficient testing updates? [No]
I added no additional tests for this bugfix. The test would be running a SEEPS unit test with ONLY SEEPS NetCDF output requested. The overhead of running grid_stat one more time isn't worth, since once this is fixed, it's unlikely to be broken.
Will this PR result in changes to the MET test suite? [No]
If yes, describe the new output and/or changes to the existing output:
Will this PR result in changes to existing METplus Use Cases? [No]
If yes, create a new Update Truth METplus issue to describe them.
Do these changes introduce new SonarQube findings? [Yes]
If yes, please describe:
When compared to the
develop
branch, this PR does flag 4 new code smells and increases the overall number of code smells from 18,315 to 18,317. This is not ideal, but I did review the 4 flagged ones and note that they're not easily fixed since they are to reduce theCognitive Complexity
and not nest too many conditionals. Fixing these would require changing the logic and structure of the code and doing so would introduce significant risk, which is not appropriate for a bugfix.Please complete this pull request review by [Tues 11/19/21].
Pull Request Checklist
See the METplus Workflow for details.
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