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

Improve HAFS scripts to use prep_step to unset FORTxx #241

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

Improve HAFS scripts to use prep_step to unset FORTxx #241

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

Comments

@BinLiu-NOAA
Copy link
Collaborator

Description

Provide a clear and concise description of the requested feature/capability.
From NCO SPA: Improve the HAFS scripts to use prep_step to unset FORTxx at the next upgrade.

Refer to WCOSS implementation standards, page 7 -

  • prep_step unsets the FORT## variables used to pass unit assignments to Intel FORTRAN executables. Since there may be multiple FORTRAN programs running in a job, these variables must be reset before each program execution.

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>
@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

According to the Implementation Standard, there are mainly two methods for Fortran programs to use FORT unit files. One is through the export FORTn variable, the other approach is through the symbolic link method. The following two items are adapted from the Implementation Standard:

  • (An ifort extension) by omitting the FILE= option, in which case the file name must be set by exporting the value of the character FORTn variable, where n is the Fortran I/O unit number as set in the OPEN statement. For ifort, n is any positive integer fitting in a 4-byte variable. The production utility "prep_step" (clearing the values of all FORTn variables) must be called before each executable if this method is used.
  • By omitting the FILE=var option, and not setting the FORTn variable, in which case the default file name “fort.n” will be used by the executable. This method is allowed only if this file is a symbolic link, eg: ln -sf $DATA/pgrbf01 fort.11.

In terms of the HAFS application/workflow, I believe we always use the second approach through symbolic links. And we do not export any FORTn variables, for which, my understanding is that prep_step utility is not required in this case.

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

2 participants