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

Pull out machine-specific information to a separate config file. #618

Closed
christinaholtNOAA opened this issue Oct 15, 2021 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@christinaholtNOAA
Copy link
Contributor

Description

I'd like to contribute a modification that pulls out as many MACHINE case statements as possible to use machine-specific configuration files that can be used during configuration and run-time so that users running on unsupported platforms do not have to modify scripts at all.

Solution

Remove as many MACHINE case statements as possible, and introduce a set of bash config files -- one for each supported machine. These will keep track of variables for machine architecture, run commands, and expected file paths.

Related to

Issue #610 -- While changes to address this issue will take into account the ability to run with a linux platform, it will still require quite a bit of script editing. For running automated testing, it will be quite difficult to specify necessary configurations to the existing tests to run on separate platforms.

@christinaholtNOAA christinaholtNOAA added the enhancement New feature or request label Oct 15, 2021
mkavulich pushed a commit that referenced this issue Jan 13, 2022
## DESCRIPTION OF CHANGES: 
This PR is one of two in a series that addresses refactoring platform-dependence. The topic of this PR is to refactor the logic for supporting platforms with specific real-time data feeds. Here is a list of features and modifications that were made:

- Apply appropriate style for functions, mainly related to white space for nested code and comments.
- Make external model file offset hours configurable for analysis- and forecast-type files because sometimes we like to start a forecast from a forecast of another model.
- Refactor to reduce duplication of information.
- Set up filenames and paths to be specified with templates in a consistent way for every model instead of with bash logic that is different for every model's naming convention.
- Remove paths that do not exist on platforms I have access to: Jet and Hera.

No changes were made to the logic for input managed by USE_USER_STAGED_EXTRN_FILES or COMINGgfs for NCO mode, although it could make sense to re-assess the NCO mode handling at a later date.

I plan to go through and "review" the code to lead reviewers through this one since it bit of change. It may be helpful to view it using GitHub's ignore whitespace feature. 

## TESTS CONDUCTED: 
Test cases using the WE2E test on Hera; see PR for full list.
   
A test case for the same forecast configuration using known paths on Hera to exercise the new code. 

I checked that arrays were consistent, that the script exits in a sane manner when files are not available on disk or HPSS, and that I haven't broken anything with the way files are handled through the "user specified" mechanism necessary for the test framework.

## ISSUE (optional): 
This work is an incremental change in support of Issue #618 

## CONTRIBUTORS (optional): 
@christopherwharrop-noaa @venitahagerty @robgonzalezpita
@mkavulich
Copy link
Collaborator

Fixed via #666

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

No branches or pull requests

2 participants