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

Remove goto statements from source code #9

Open
SnowHydrology opened this issue May 3, 2023 · 1 comment
Open

Remove goto statements from source code #9

SnowHydrology opened this issue May 3, 2023 · 1 comment

Comments

@SnowHydrology
Copy link

Work on the current NWM identified Fortran goto statements as a potential issue. Modern Fortran has moved away from goto statements for myriad reasons, some of which are discussed here.

There are two modules from which the gotos should be removed (https://github.com/NOAA-OWP/sac-sma/search?q=goto):

Alternative solutions include do loops, if statements, cycle, exit, and case.

This issue also needs fixing in Noah-OWP-Modular and Snow-17.

@andywood
Copy link
Collaborator

These are original codes from NWS OHD and to preserve continuity they are retained in original form, as long as the fortran compilers still allow it. i.e., not pretty but it works. The backup version #duamel.f# has been removed from the repo. This is true of Snow-17 and Noah-OWP-Modular as well, although some statement functions on the latter were compiler-obsolete and had to be removed.

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

No branches or pull requests

2 participants