-
Notifications
You must be signed in to change notification settings - Fork 168
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
base: develop
Are you sure you want to change the base?
Changes from 39 commits
26e06a3
99dea4a
97b5932
64552f8
ed3768c
9373b88
916c1fa
f018d2e
aede2e9
f59a6c9
f07b0ec
6261b4f
b2b3078
ea023be
3c69e48
16205f1
0c7cb50
458b130
027e79f
f75bbf3
b408e75
d96631e
08c4f12
bc74e49
99869ed
8b9d5d1
2646773
f31c4c1
4f58676
bed6e67
e742c7d
bd34f6c
a0f6cfd
901a299
4fc487b
f9ed53e
55171ec
12619c9
b78ea08
232d438
f7c4ba4
2e4d298
1028319
4fe0e52
95d2532
bda6124
8cbffe5
50550e4
bcd3386
bad7250
8a0833b
4db4b82
96934ca
cb6881d
d378f80
636e44c
dc6049e
d279aa2
a9fb44d
a179f2b
88c4cce
2446ff3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
# 0. Preparations | ||
|
||
source "${USHgfs}/preamble.sh" | ||
|
||
#set FORECAST_HOUR | ||
export FORECAST_HOUR=$(( 10#${FHR3} )) | ||
# 0.a Basic modes of operation | ||
|
||
# Set wave model ID tag to include member number | ||
|
@@ -221,22 +222,21 @@ | |
# 1.a.2 Loop over forecast time to generate post files | ||
# When executed side-by-side, serial mode (cfp when run after the fcst step) | ||
# Contingency for RERUN=YES | ||
if [ "${RERUN-NO}" = "YES" ]; then | ||
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 | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't delete it. Just commented it out. |
||
ymdh=$($NDATE $fhr ${PDY}${cyc}) | ||
YMD=$(echo $ymdh | cut -c1-8) | ||
HMS="$(echo $ymdh | cut -c9-10)0000" | ||
|
@@ -256,7 +256,7 @@ | |
export GRDIDATA=${DATA}/output_$YMDHMS | ||
|
||
# Gridded data (main part, need to be run side-by-side with forecast | ||
|
||
if [ $fhr = $fhrg ] | ||
then | ||
for wavGRD in ${waveGRD}; do | ||
|
@@ -269,7 +269,7 @@ | |
fi | ||
${NLN} "${gfile}" "./out_grd.${wavGRD}" | ||
done | ||
|
||
if [ "$DOGRI_WAV" = 'YES' ] | ||
then | ||
nigrd=1 | ||
|
@@ -344,11 +344,11 @@ | |
if [ "$ifirst" = 'yes' ]; then | ||
echo "#!/bin/sh" > cmdmfile.$nfile | ||
echo "$nfile cmdmfile.$nfile" >> cmdmprog | ||
chmod 744 cmdmfile.$nfile | ||
chmod 744 "cmdmfile.$nfile" | ||
fi | ||
echo $line >> cmdmfile.$nfile | ||
echo $line >> "cmdmfile.$nfile" | ||
nfile=$(( nfile + 1 )) | ||
if [ $nfile -eq $NTASKS ]; then | ||
if [ $nfile -eq "$NTASKS" ]; then | ||
|
||
nfile=0 | ||
ifirst='no' | ||
fi | ||
|
@@ -392,15 +392,15 @@ | |
echo ' ' | ||
set_trace | ||
err=4; export err;${errchk} | ||
exit $err | ||
exit "$err" | ||
fi | ||
|
||
rm -f out_grd.* # Remove large binary grid output files | ||
|
||
cd $DATA | ||
|
||
FHINCG=$(( DTFLD_WAV / 3600 )) | ||
if [ $fhr = $fhrg ] | ||
if [ "$fhr" = "$fhrg" ] | ||
then | ||
# Check if grib2 file created | ||
ENSTAG="" | ||
|
@@ -416,20 +416,20 @@ | |
echo ' ' | ||
set_trace | ||
err=5; export err;${errchk} | ||
exit $err | ||
exit "$err" | ||
fi | ||
if [ $FHMAX_HF_WAV -gt 0 ] && [ $FHOUT_HF_WAV -gt 0 ] && [ $fhr -lt $FHMAX_HF_WAV ]; then | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WalterKolczynski-NOAA Modified |
||
|
||
done | ||
fi | ||
|
||
# --------------------------------------------------------------------------- # | ||
# 7. Ending output | ||
|
There was a problem hiding this comment.
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.