Skip to content

Reduce goto in ufs-weather-model: ccpp/physics and upp#3167

Open
NickSzapiro-NOAA wants to merge 3 commits intoufs-community:developfrom
NickSzapiro-NOAA:goto_ccpp_upp
Open

Reduce goto in ufs-weather-model: ccpp/physics and upp#3167
NickSzapiro-NOAA wants to merge 3 commits intoufs-community:developfrom
NickSzapiro-NOAA:goto_ccpp_upp

Conversation

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator

Commit Queue Requirements:

  • This PR addresses a relevant WM issue (if not, create an issue).
  • All subcomponent pull requests (if any) have been reviewed by their code managers.
  • Run the full Intel+GNU RT suite (compared to current baselines), preferably on Ursa (Derecho or Hercules are acceptable alternatives). Exceptions: documentation-only PRs, CI-only PRs, etc.
    • Commit log file w/full results from RT suite run (if applicable).
    • Verify that test_changes.list indicates which tests, if any, are changed by this PR. Commit test_changes.list, even if it is empty.
  • Fill out all sections of this template.

Description:

EE2 standards include "Good programming practices must be followed to improve readability. For example, structured control must be used instead of GO TO statements, and code must be well documented."

Here we replace several goto/go to usages and keep current answers (as tested on ursa and wcoss2)

Commit Message:

* UFSWM - Reduce goto in UFSATM
  * UFSATM - Reduce goto in UFSATM
    * ccpp-physics - Reduce goto in ccpp/physics

Priority:

  • High: Part of EE2 standards for GFS.v17

Git Tracking

UFSWM:

Sub component Pull Requests:

UFSWM Blocking Dependencies:

  • None

Documentation:

  • Documentation update required.
    • Relevant updates are included with this PR.
    • A WM issue has been opened to track the need for a documentation update; a person responsible for submitting the update has been assigned to the issue (link issue).
  • Documentation update NOT required.
    • Explanation:

Changes

Regression Test Changes (Please commit test_changes.list):

  • PR Adds New Tests/Baselines.
  • PR Updates/Changes Baselines.
  • No Baseline Changes.

Input data Changes:

  • None.

Library Changes/Upgrades:

  • No Updates

Testing Log:

  • RDHPCS
    • Orion
    • Hercules
    • GaeaC6
    • Derecho
    • Ursa
  • WCOSS2
    • Dogwood/Cactus
    • Acorn
  • CI
  • opnReqTest (complete task if unnecessary)

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator Author

Here is a 1-liner to get a quick summary of code goto (not in comments) in this branch:
find . -type f -name "*.[fF]*" -print0 | xargs -0 grep -inP '^(?![Cc*])[^!]*\bgo\s*to\b'
with subdirectory counts of

  • AQM: 957
  • UFSATM/FV3: 107
  • UFSATM/ccpp/physics: 61
  • UFSATM/mpas: 119
  • HYCOM: 157
  • CDEPS: 2
  • stochastic_physics: 53
  • WW3/regtests: 36
  • MOM6: 1

@NickSzapiro-NOAA NickSzapiro-NOAA self-assigned this Mar 30, 2026
@gspetro-NOAA gspetro-NOAA added No Baseline Change No Baseline Change UFSATM There are changes to the UFSATM repository. CCPP There are changes to a CCPP repository. labels Mar 30, 2026
@gspetro-NOAA gspetro-NOAA moved this from Evaluating to Waiting for Reviews (subcomponent) in PRs to Process Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCPP There are changes to a CCPP repository. No Baseline Change No Baseline Change UFSATM There are changes to the UFSATM repository.

Projects

Status: Waiting for Reviews (subcomponent)

Development

Successfully merging this pull request may close these issues.

2 participants