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

Refactor gridded wave post #3014

Open
wants to merge 62 commits into
base: develop
Choose a base branch
from

Conversation

AntonMFernando-NOAA
Copy link
Contributor

Description

The gridded wave post (wavepostsbs) script currently loops over all forecast hours and acts as its own post manager. Other component post and product scripts operate on one forecast time. This PR will update the wave post to match other components, that creates a bunch of short jobs instead of one long job (per member).
Resolves #2290

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? NO
  • Does this change require a documentation update? NO
  • Does this change require an update to any of the following submodules? NO

How has this been tested?

  • Run CI tests in HERA, ORION, and HERCULES

Checklist

  • Gridded wave post scripts that process only one forecast hour specified by the workflow manager (rocoto/ecflow)
  • Rocoto workflow updated to create the corresponding tasks for the new paradigm for both GFS and GEFS
  • Output identical to current system for both GFS and GEFS

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.

gfs_tasks.py will also need to be updated with the changes to the wave post job.

fi
fhrg=$fhr
sleep_interval=10
iwaitmax=120 # Maximum loop cycles for waiting until wave component output file is ready (fails after max)
while [ $fhr -le $FHMAX_WAV ]; do

if [ $fhr -le $FHMAX_WAV ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just take this out. It is up to the workflow to determine which hours to run for.

Copy link
Contributor Author

@AntonMFernando-NOAA AntonMFernando-NOAA Oct 30, 2024

Choose a reason for hiding this comment

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

@WalterKolczynski-NOAA All contents inside the loop? L239 - L432 or just the loop?

Copy link
Contributor

@WalterKolczynski-NOAA WalterKolczynski-NOAA Oct 30, 2024

Choose a reason for hiding this comment

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

Just the if that replaces the while Still need most of the stuff inside it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't delete it. Just commented it out.

Comment on lines 225 to 234
if [ "${RERUN:-NO}" = "YES" ]; then
fhr=$((FHRUN + FHMIN_WAV))
if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then
FHINCG=$FHOUT_HF_WAV
else
FHINCG=$FHOUT_WAV
fi
fhr=$((fhr + FHINCG))
fhr=$((FORECAST_HOUR + FHINCG))
else
fhr=$FHMIN_WAV
fhr=$FORECAST_HOUR
Copy link
Contributor

Choose a reason for hiding this comment

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

This section can just be removed. The forecast hour is provided and does not need to be calculated anymore.

Comment on lines 421 to 430
if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ "$fhr" -lt $FHMAX_HF_WAV ]; then
FHINCG=$FHOUT_HF_WAV
else
FHINCG=$FHOUT_WAV
fi
fhrg=$((fhr+FHINCG))
fi
echo $fhrg
echo "$fhrg"

fhr=$fhrg #loop with out_grd stride
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more stuff to calculate the next hour to run when it was a loop and is no longer needed.

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 Modified gfs_tasks.py and did your suggested changes to exgfs_wave_post_gridded_sbs.sh. Ran GEFS and GFS tests on HERCULES and they all passed. Did a check on output files and see no difference (between develop and current branches). Anymore suggestions?

AntonMFernando-NOAA and others added 22 commits October 30, 2024 13:43
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

Successfully merging this pull request may close these issues.

Refactor gridded wave post to match other components
7 participants