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 2015 pb2nc repeated debug messages #2026

Merged
merged 7 commits into from
Jan 27, 2022

Conversation

hsoh-u
Copy link
Collaborator

@hsoh-u hsoh-u commented Jan 25, 2022

-Removed the repeated log message from pb2nc

  • SonarQube:
    • met/src/basic/vx_util/ascii_table.cc: initializae left and right
    • met/src/libcode/vx_gis/dbf_file.cc: calls API instead of memory setting
    • met/src/libcode/vx_nc_obs/nc_obs_util.cc: do net write to netcdf if empty data
    • met/src/tools/other/madis2nc/madis2nc.cc: make sure the level from the variable is less than dimension maxLevels
    • met/src/tools/other/mode_graphics/cgraph_main.cc: removed not used/unreachable code

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)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

Set MET_BASE environment variable

export MET_BASE =/d1/personal/hsoh/git/features/feature_2015_pb2nc_debug_message/MET/met/share/met

export MASK_GRID=''
export MASK_POLY=''
export QUALITY_MARK_THRESH='2'
export STATION_ID=''
/d1/personal/hsoh/git/features/feature_2015_pb2nc_debug_message/MET/met/bin/pb2nc \
/d1/projects/MET/MET_test_data/unit_test/obs_data/prepbufr/nam.20210311.t00z.prepbufr.tm00 \
nam.20210311.t00z.prepbufr.tm00.pbl.nc \
/d1/personal/hsoh/git/features/feature_2015_pb2nc_debug_message/MET/test/config/PB2NCConfig_pbl \
-v 3 -log pb2nc_log_new.log

Check the following debug messages are not repeated

DEBUG 3:
DEBUG 3: process_pbfile() -> Skip the derived variables because of not requested (0).
DEBUG 3:

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

export MASK_GRID=''
export MASK_POLY=''
export QUALITY_MARK_THRESH='2'
export STATION_ID=''
/d1/personal/hsoh/git/pull_request/MET_feature_2015_pb2nc_debug_message/met/bin/pb2nc \
/d1/projects/MET/MET_test_data/unit_test/obs_data/prepbufr/nam.20210311.t00z.prepbufr.tm00 \
nam.20210311.t00z.prepbufr.tm00.pbl.nc \
/d1/personal/hsoh/git/pull_request/MET_feature_2015_pb2nc_debug_message/test/config/PB2NCConfig_pbl \
-v 3 -log pb2nc_log_new.log

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

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

Only the log messages are affected.

  • 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 [Fill in date].

Pull Request Checklist

See the METplus Workflow for details.

  • 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)
    Select: Organization level software support Project or Repository level development cycle Project
    Select: Milestone as the version that will include these changes
  • After submitting the PR, select Linked issues with the original issue number.
  • 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.

@hsoh-u hsoh-u added this to the MET 10.1.0 milestone Jan 25, 2022
@hsoh-u hsoh-u requested a review from georgemccabe January 25, 2022 22:41
@hsoh-u hsoh-u linked an issue Jan 25, 2022 that may be closed by this pull request
21 tasks
Copy link
Collaborator

@georgemccabe georgemccabe left a comment

Choose a reason for hiding this comment

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

I ran the example provided on kiowa (had to add pb2nc to end of first value to get it to run) and confirmed that the log message in question was only output once. I did get a warning that no messages were retained from the run.

DEBUG 2: Total observations retained or derived = 0
...
WARNING: process_pbfile() -> Saved the derived variables only. No PrepBufr messages retained from file: /d1/projects/MET/MET_test_data/unit_test/obs_data/prepbufr/nam.20210311.t00z.prepbufr.tm00

Should this test generate output observations?

@hsoh-u
Copy link
Collaborator Author

hsoh-u commented Jan 27, 2022

Corrected the count for "retained or derived":

DEBUG 2: Total observations retained or derived = 249

@hsoh-u hsoh-u requested a review from georgemccabe January 27, 2022 02:03
Copy link
Collaborator

@georgemccabe georgemccabe left a comment

Choose a reason for hiding this comment

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

I see that the observation count now includes the derived observations. The warning message is still shown, but the message is accurate because only derived variables were saved and no prepbufr messages were retained from the file. I approve.

@hsoh-u hsoh-u merged commit 80f79fd into develop Jan 27, 2022
@hsoh-u hsoh-u deleted the feature_2015_pb2nc_debug_message branch January 27, 2022 16:30
@JohnHalleyGotway JohnHalleyGotway changed the title fesature 2015 pb2nc repeated debug messages Feature 2015 pb2nc repeated debug messages Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix PB2NC to reduce redundant verbosity level 3 log messages.
2 participants