-
Notifications
You must be signed in to change notification settings - Fork 24
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 #2395 TOTAL_DIR #2892
Feature #2395 TOTAL_DIR #2892
Conversation
… superceded by the new dcount and dacount VL1L2Info members to keep track of the number of valid wind direction vectors.
…types and update the header column tables.
…in the VL1L2, VAL1L2, and VCNT line types.
…d use the values to aggregate results when needed.
…' to satisfy the finding that 'Global variables should be const.' Should probably switch from 'char char *' to strings eventually. But for now, I'm just making up for some SonarQube technical debt.
…_header_columns_V12.0.txt file
… of VL1L2 lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look good to add an additional line to the vector line types. I see that the SonarQube scan failed but this was addressed in the PR notes.
I see that the test run fails during the difference step, but the errors seem to imply that the test function failed.
COMPARING ref_config_lead_00/point_stat/AFWAv3.4_Noahv3.3/point_stat_AFWAv3.4_Noahv3.3_F000_WINDS_000000L_20110902_000000V.stat
file1: /data/output/met_test_truth/ref_config_lead_00/point_stat/AFWAv3.4_Noahv3.3/point_stat_AFWAv3.4_Noahv3.3_F000_WINDS_000000L_20110902_000000V.stat
file2: /data/output/met_test_output/ref_config_lead_00/point_stat/AFWAv3.4_Noahv3.3/point_stat_AFWAv3.4_Noahv3.3_F000_WINDS_000000L_20110902_000000V.stat
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 1 did not have 100 elements
In addition: Warning message:
In system(paste(strCmd, "2>&1"), intern = T) :
running command '/usr/bin/diff /data/output/met_test_truth/ref_config_lead_00/point_stat/AFWAv3.4_Noahv3.3/point_stat_AFWAv3.4_Noahv3.3_F000_WINDS_000000L_20110902_000000V.stat /data/output/met_test_output/ref_config_lead_00/point_stat/AFWAv3.4_Noahv3.3/point_stat_AFWAv3.4_Noahv3.3_F000_WINDS_000000L_20110902_000000V.stat 2>&1' had status 1
ERROR: compareStat() failed
Does this message indicate that there were differences in the output? If so, it may be good to improve the messaging so it is more clear that there are differences found instead implying that something failed in the diff logic.
…king 'DIR_', check 'DIR_ME', 'DIR_MAE', and 'DIR_MSE' to avoid an false positive match for the 'DIR_ERR' column which is computed from the vector partial sums rather than the individual direction differences.
Thanks for taking a look @georgemccabe. I did just find/address a "false positive" match in the As for the diffs, yes, the rather brittle diff logic fails when the number of columns differ. Rather than enhancing the existing Rscript diff logic, I'd rather switch over to the Python-based one used by METplus soon. |
@bikegeek, FYI, I documented the METplus-Analysis impacts with dtcenter/METdataio#307 and dtcenter/METcalcpy#384. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good. I see differences in the test output that is expected. I expected some METplus use cases to produce differences after this is merged into develop. This will likely require an update to the truth data. An Update Truth METplus GitHub issue should be created to describe the expected differences.
Expected Differences
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)? [Yes]
If yes, please describe:
This PR adds the
TOTAL_DIR
column to the VL1L2, VAL1L2, and VCNT line types. It adds this column BEFORE all the stats previously added for #2395. Since these new stats have not been included in a public release, adding this in the current "middle" of the line type is fine. It also updates Stat-Analysis to use those counts when aggregating the stats from those line types that begin withDIR_
.Pull Request Testing
The code for this feature branch is compiled as the
met_test
user inseneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-feature_2395_TOTAL_DIR
.Input:
Output:
And these are the correct weighted averages.
And it's parse the correct values from the correct columns.
The code for this feature branch is compiled as the
met_test
user inseneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-feature_2395_TOTAL_DIR
.Please review code changes, doc updates, and test as you see fit.
Updated the tables to describe the output line types.
I added to new jobs to an existing Stat-Analysis config file to demonstrate the processing of VL1L2 lines.
This generates 2 new output files:
If yes, describe the new output and/or changes to the existing output:
Differences are flagged in all VCNT, VL1L2, and VAL1L2 output lines.
I downloaded and inspected the diff and log artifacts from the GHA run.
.stat
files and 34.txt
files.I ran the commands listed below to confirm that all these diffs are limited to the VCNT, VL1L2, and VAL1L2 line types:
Here's the result:
If yes, create a new Update Truth METplus issue to describe them.
Differences are flagged in all VCNT, VL1L2, and VAL1L2 output lines.
See this dtcenter/METplus#2592 issue to update the truth data.
If yes, please describe:
The SonarQube quality gate flag failed in this run with 0 new bugs but 7 new code smells.
I did modify the code to address 4 of the 7 ones flagged (
Global variables should be const.
andAdd the "static" storage specifier to this declaration
).But chose not to address the other 3 (
Extract the assignment from this expression.
andRefactor this function to reduce its Cognitive Complexity from XX to the 25 allowed.
)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