HAFS icon indicating copy to clipboard operation
HAFS copied to clipboard

Reduce GOTO statements from HAFS Fortran source codes

Open BinLiu-NOAA opened this issue 1 year ago • 1 comments

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 avatar Nov 30 '23 19:11 BinLiu-NOAA