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

Design/forecast app #1386

Closed
wants to merge 4 commits into from
Closed

Design/forecast app #1386

wants to merge 4 commits into from

Conversation

HenryRWinterbottom
Copy link
Contributor

The intention of this PR is to provide an easy to review design template, specific to the forecast task refactoring. It does require merging or rebasing and may be removed following completion of the respective task refactoring.

Notes/comments are included in the changed files.

I believe it to be advantageous to drive all task steps initiated from the scripts level (e.g., initialize, run, and finalize) using YAML-formatted files. The YAML-formatted filepath would be defined within the run-time environment. See the notes placed within the YAML-formatted files beneath parm/config/yaml.

@HenryRWinterbottom HenryRWinterbottom self-assigned this Mar 9, 2023
@HenryRWinterbottom HenryRWinterbottom added the feature New feature or request label Mar 9, 2023
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shellcheck found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

Copy link
Contributor

@CoryMartin-NOAA CoryMartin-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing too controversial here, looks good pending my question.

Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good skeleton to start with. Issues are mostly things that aren't your fault.

Made comments on the first j-job I saw, but they apply to all. I know a lot of the things pointed out were from the scripts being emulated, but if we are writing from scratch we should probably not repeat the shortcomings if we can help it (@aerorahul can overrule me here). Also, new shell scripts should come up clean in shellcheck.

if [ ${DO_WAVE:-"NO"} = "YES" ]; then
# WAVE component directory
export CDUMPwave=${CDUMPwave:-${CDUMP}wave}
export COMINwave=${COMINwave:-$(compath.py ${envir}/${NET}/${gfs_ver})/${CDUMP}.${PDY}/${cyc}/wave}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compath.py should not be used to refer to paths within the GFS package (see #289).

Suggested change
export COMINwave=${COMINwave:-$(compath.py ${envir}/${NET}/${gfs_ver})/${CDUMP}.${PDY}/${cyc}/wave}
export COMINwave=${COMINwave:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${cyc}/wave}

# WAVE component directory
export CDUMPwave=${CDUMPwave:-${CDUMP}wave}
export COMINwave=${COMINwave:-$(compath.py ${envir}/${NET}/${gfs_ver})/${CDUMP}.${PDY}/${cyc}/wave}
export COMOUTwave=${COMOUTwave:-$(compath.py -o ${NET}/${gfs_ver})/${CDUMP}.${PDY}/${cyc}/wave}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export COMOUTwave=${COMOUTwave:-$(compath.py -o ${NET}/${gfs_ver})/${CDUMP}.${PDY}/${cyc}/wave}
export COMOUTwave=${COMOUTwave:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${cyc}/wave}

Comment on lines +22 to +23
rCDUMP=${CDUMP}
[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rCDUMP=${CDUMP}
[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas"
export rCDUMP="gdas"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WalterKolczynski-NOAA I just made a copy of file had in another branch. I am guess my rebase didn't take. Before any development/refactoring proceeds I will make sure I begin from a branch UTD with develop. Thank you for the heads-up.

Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in develop too. Trying not to repeat its mistakes. CDUMP can only be gdas or gfs (enkfgdas and enkfgfs have a different j-job for now). Changing gfs to gdas just means it is always gdas, so let's just say that. (If the enkf script gets combined into this one, I think it would instead be rCDUMP=${RUN/gfs/gdas}.)


# ----

fix_ugwd_:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a trailing underscore here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WalterKolczynski-NOAA Likely a typo. Thanks for catching it.

@aerorahul
Copy link
Contributor

Mostly looks good.
We can discuss specifics offline.

Copy link
Contributor

@guillaumevernieres guillaumevernieres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean!

Copy link
Contributor

@CoryMartin-NOAA CoryMartin-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I defer on the specifics of the J-jobs to R/W, but this looks good to me.

@WalterKolczynski-NOAA
Copy link
Contributor

@HenryWinterbottom-NOAA Did you push your changes to GitHub? I don't see any since my last review.

@aerorahul
Copy link
Contributor

I think this PR served its purpose for having a discussion.
Closing.

@aerorahul aerorahul closed this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants