Skip to content

Bugfix #3381 main_v12.2 mpas latitude#3414

Merged
hsoh-u merged 2 commits into
main_v12.2from
bugfix_3381_mpas_latitude_main_v12.2
Jul 15, 2026
Merged

Bugfix #3381 main_v12.2 mpas latitude#3414
hsoh-u merged 2 commits into
main_v12.2from
bugfix_3381_mpas_latitude_main_v12.2

Conversation

@hsoh-u

@hsoh-u hsoh-u commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Expected Differences

Check and modify latitudes within -90.0 and 90.0 from radian units.

  • 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:
/d1/personal/hsoh/git/bugfixes/bugfix_3381_mpas_latitude_main_v12.2/MET/bin/point_stat /d1/personal/hsoh/data/falko_20260422/diag.2025-09-05_00.00.00.nc /d1/personal/hsoh/data/falko_20260422/prepbufr.gdas.2025090500.nc /d1/personal/hsoh/data/falko_20260422/PointStatConfig_mpas_main_v12.2 -v 10

DEBUG 6: UGridFile::read_netcdf_grid() -> convert  rad to degree for lat
DEBUG 4: UGridFile::radian_to_degree() -> adjusted 0 (2) latitudes

The meaning of the log message: adjusted 0 (2) latitudes.

  • Total 2 latitude values were adjusted to -90 or 90.

  • 0 latitudes were converted to -90 or 90 beyond the float prevision difference

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

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

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

    If yes, please describe:

  • Please complete this pull request review by [Fill in date].

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: METplus-X.Y Support project for bugfix releases or MET-X.Y Development project for the next coordinated release
  • 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.

@hsoh-u
hsoh-u requested a review from jprestop July 9, 2026 16:06
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@JohnHalleyGotway JohnHalleyGotway changed the title #3381 Added radian_to_degree Bugfix #3381 Added radian_to_degree Jul 14, 2026
@JohnHalleyGotway JohnHalleyGotway added this to the MET-12.2.2 (bugfix) milestone Jul 14, 2026
@JohnHalleyGotway JohnHalleyGotway linked an issue Jul 14, 2026 that may be closed by this pull request
23 tasks
@JohnHalleyGotway

Copy link
Copy Markdown
Collaborator

@hsoh-u I see that this PR is to fix behavior in the main_v12.2 branch. Should @jprestop expect another PR to also fix this issue in the develop branch? Or is no fix needed in develop?

@JohnHalleyGotway JohnHalleyGotway moved this from 🩺 Needs Triage to 🔎 In review in Coordinated METplus-6.2 Support Jul 14, 2026

@jprestop jprestop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this fix @hsoh-u. I reviewed the code changes, ensured no errors, and reviewed the new log output. I appreciate that the log message makes the important distinction between a genuine data problem and harmless rounding: adjusted 0 (2) latitudes clearly separates the total number of clamped values (2) from those adjusted beyond expected float-precision tolerance (0), so it's immediately clear these were benign float→double artifacts rather than bad input data. Approved.

@hsoh-u
hsoh-u merged commit 803e30b into main_v12.2 Jul 15, 2026
42 checks passed
@github-project-automation github-project-automation Bot moved this from 🔎 In review to 🏁 Done in Coordinated METplus-6.2 Support Jul 15, 2026
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix #3381 Added radian_to_degree Bugfix #3381 main_v12.2 Added radian_to_degree Jul 15, 2026
@JohnHalleyGotway JohnHalleyGotway changed the title Bugfix #3381 main_v12.2 Added radian_to_degree Bugfix #3381 main_v12.2 mpas latitude Jul 15, 2026
@hsoh-u
hsoh-u deleted the bugfix_3381_mpas_latitude_main_v12.2 branch July 17, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Bugfix: Invalid latitude values from a MPAS file

3 participants