Skip to content

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

Closed
NickSzapiro-NOAA wants to merge 4 commits into
ufs-community:developfrom
NickSzapiro-NOAA:goto_ccpp_upp
Closed

Reduce goto in ufs-weather-model: ccpp/physics#3167
NickSzapiro-NOAA wants to merge 4 commits into
ufs-community:developfrom
NickSzapiro-NOAA:goto_ccpp_upp

Conversation

@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator

@NickSzapiro-NOAA NickSzapiro-NOAA commented Mar 30, 2026

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:

  • Normal

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
@NickSzapiro-NOAA NickSzapiro-NOAA changed the title Reduce goto in ufs-weather-model: ccpp/physics and upp Reduce goto in ufs-weather-model: ccpp/physics Apr 6, 2026
@NickSzapiro-NOAA
Copy link
Copy Markdown
Collaborator Author

Since not urgent, undoing the UPP changes until later (NOAA-EMC/UPP#1482)

@gspetro-NOAA gspetro-NOAA moved this from Waiting for Reviews (subcomponent) to Review in PRs to Process Apr 7, 2026
dpsarmie added a commit to dpsarmie/ufs-weather-model that referenced this pull request Apr 8, 2026
@gspetro-NOAA gspetro-NOAA moved this from Review to Schedule in PRs to Process Apr 9, 2026
gspetro-NOAA pushed a commit that referenced this pull request Apr 15, 2026
) // Reduce goto in ufs-weather-model: ccpp/physics (#3167) (#3169)

* UFSWM - Remove some goto statements in FV3 and relax warning for TAdyn
* UFSWM - Reduce goto in UFSATM
  * UFSATM - Update atmos-cubed hash
  * UFSATM - Reduce goto in UFSATM
    * atmos_cubed_sphere - Remove some goto statements in FV3 and relax warning for TAdyn
    * ccpp-physics - Reduce goto in ccpp/physics
@gspetro-NOAA
Copy link
Copy Markdown
Collaborator

Merged via #3169

@github-project-automation github-project-automation Bot moved this from Schedule to Done in PRs to Process Apr 15, 2026
DavidHuber-NOAA pushed a commit to NOAA-EMC/global-workflow that referenced this pull request Apr 30, 2026
This PR will update the UFS Weather Model hash to the latest GFS.v17
production hash
[52f9b46](https://github.com/ufs-community/ufs-weather-model/tree/52f9b463a44a8119f5123584cf36ef0d5a23fd29).
This hash includes updates to CCPP which include the following fixes
(develop related PRs linked):
- Removal of select goto statements
(ufs-community/ufs-weather-model#3167)
- Updating the rte-rrmtgp submodule to production/GFS.v17 and adding a
fix for a compiler warning
(ufs-community/ccpp-physics#322)
 
These fixes were added into production and tested against the production
v17 baselines using the UFSWM regression test workflow. These changes
did not cause changes to the baselines.
 
**_Since this update will change the CCPP hash, an update to UFS-Utils
will be needed before this PR can be merged._**
 
The UFS-Utils update will need to occur after
#4659 is merged since
the UFS-Utils changes associated with that PR are already merged into
the UFSU production branch.
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 Priority: High UFSATM There are changes to the UFSATM repository.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants