Skip to content

Removal of some goto statements#391

Merged
vithikashah001 merged 20 commits into
NOAA-GFDL:dev/emcfrom
dpsarmie:dev/emc
Apr 15, 2026
Merged

Removal of some goto statements#391
vithikashah001 merged 20 commits into
NOAA-GFDL:dev/emcfrom
dpsarmie:dev/emc

Conversation

@dpsarmie
Copy link
Copy Markdown

@dpsarmie dpsarmie commented Aug 26, 2025

Description
This PR will remove some goto and do continue statements and replace them with more modern code syntax. This is a request from NCO across all subroutines that are in UFS.

Fixes #390
See NOAA-EMC/GFS#19 for more details.

There will be a second PR made with more goto removals. Those changes will not be added since they are outside the scope of the regression tests and will require more scrutiny.

How Has This Been Tested?

Changes have been tested against the UFS regression test suite. There are no changes to the baselines and there should be no changes once the PR is ready to be merged.

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@dpsarmie dpsarmie marked this pull request as draft August 26, 2025 13:25
Comment thread model/nh_utils.F90 Outdated
@laurenchilutti
Copy link
Copy Markdown
Member

@dpsarmie Will this be the changes that need to go into production/GFS.v17?

@dpsarmie
Copy link
Copy Markdown
Author

dpsarmie commented Feb 6, 2026

@laurenchilutti Thank you for creating the production branch.

I need to clean this PR up but yes, this will go in both the dev/emc and the production/GFS.v17 branches (assuming they pass review). The dev/emc PR has been tested with the UFS WM regression tests and will go through the usual PR process. I'll make a production branch PR to get the changes into the production branch and I'll process that PR up to the WM gfsv17 branch.

For this PR, I'm going to split off the more complex changes and changes that are not covered by the current suite of UFSWM regression tests just out of an abundance of caution.

I'll get this PR cleaned up before lunch today since I finished my final testing. It'll be ready for review at that time. Thanks again!

@dpsarmie dpsarmie marked this pull request as ready for review February 10, 2026 19:42
@dpsarmie
Copy link
Copy Markdown
Author

@laurenchilutti I was doing more testing so there was a small delay. This should be fine for review. I'll place the other more involved changes in a separate PR.

@dpsarmie dpsarmie changed the title Removal of goto statements (WIP) Removal of some goto statements Feb 10, 2026
@laurenchilutti
Copy link
Copy Markdown
Member

Do you want to include the changes from the GFS production branch here in this PR? #405

@dpsarmie
Copy link
Copy Markdown
Author

Do you want to include the changes from the GFS production branch here in this PR? #405

Ok, I added the changes. I'll get the PRs in UFSATM and UFSWM opened so this can get a place in the queue.

@gspetro-NOAA
Copy link
Copy Markdown

Testing has completed successfully on ufs-community/ufs-weather-model#3169. This PR can be merged.

@vithikashah001 vithikashah001 merged commit 9599114 into NOAA-GFDL:dev/emc Apr 15, 2026
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.

5 participants