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

Reduce GOTO statements from HAFS Fortran source codes #235

Open
BinLiu-NOAA opened this issue Nov 30, 2023 · 1 comment
Open

Reduce GOTO statements from HAFS Fortran source codes #235

BinLiu-NOAA opened this issue Nov 30, 2023 · 1 comment
Labels
Bugzilla Operational HAFS bugzilla items enhancement New feature or request

Comments

@BinLiu-NOAA
Copy link
Collaborator

BinLiu-NOAA commented Nov 30, 2023

Description

Provide a clear and concise description of the requested feature/capability.
From NCO SPA:
Please consider to remove or reduce GOTO statements, replace them with more
structured constants (if blocks, do loops, case blocks) in next HAFS upgrade.

under /lfs/h1/ops/para/packages/hafs.v1.0.3/

>for file in `find sorc -name "*.[fF]*" -type f` ; do egrep -iH "go[ ]*to" $file | grep -iv :c | grep -iv :\! ; done | wc -l
2938

Here are detailed GOTO statements in HWRF/HMON and HAFS -
hafs.v1.0.0 - goto - total 2938
hafs_forecast.fd 1954
hafs_gsi.fd 73
hafs_hycom_utils.fd 419
hafs_post.fd 0
hafs_tools.fd 257
hafs_tracker.fd 43
hafs_utils.fd 192

Proposed solution

How should the new feature/capability be added? If you have thoughts on the implementation strategy, please share them here.

Status (optional)

Do you (or a colleague) plan to work on adding this feature?

Related to (optional)

Directly reference any related issues or PRs in this or other repositories, and describe how they are related. Examples:

  • fixed by hafs-community/hafs/pull/<pr_number>
  • dependent upon ufs-community/ufs-weather-model/pull/<pr_number>
  • associated with noaa-emc/upp/pull/<pr_number>
  • related to hafs-community/GSI/issues/<issue_number>
@BinLiu-NOAA BinLiu-NOAA added enhancement New feature or request Bugzilla Operational HAFS bugzilla items labels Nov 30, 2023
@BinLiu-NOAA
Copy link
Collaborator Author

Based on the counting @BijuThomas-NOAA did for the latest HAFSv2 package, here are the numbers of "goto"s from the production/hafs.v2 branch:

hafs.v2.0.0 - goto - total 2153
hafs_forecast.fd 1127
hafs_gsi.fd 72
hafs_hycom_utils.fd 440
hafs_post.fd 0
hafs_tools.fd 257
hafs_tracker.fd 43
hafs_utils.fd 214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugzilla Operational HAFS bugzilla items enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant