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

Update wave jobs to use COMIN/COMOUT #2643

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
63c47ab
../jobs/JGLOBAL_WAVE_POST_BNDPNT
henrywinterbottom-wxdev May 24, 2024
74370c4
Update.
henrywinterbottom-wxdev May 24, 2024
47f873c
Wave post-processing script fixes.
henrywinterbottom-wxdev May 25, 2024
8427e46
Updates for COMIN/COMOUT.
henrywinterbottom-wxdev May 27, 2024
257ec6b
Merge branch 'NOAA-EMC:develop' into feature/gwdev_issue_2451
HenryRWinterbottom May 29, 2024
5bafc6b
Bringing branch UTD with WIP.
HenryRWinterbottom May 29, 2024
1861a77
Merge branch 'NOAA-EMC:develop' into feature/gwdev_issue_2451
HenryRWinterbottom May 29, 2024
b8e0c00
Merge branch 'NOAA-EMC:develop' into feature/gwdev_issue_2451
HenryRWinterbottom May 30, 2024
8432581
COMIN/COMOUT updates/corrections.
HenryRWinterbottom May 30, 2024
3118937
Update jobs/JGLOBAL_WAVE_INIT
HenryRWinterbottom May 31, 2024
31082aa
Update jobs/JGLOBAL_WAVE_POST_BNDPNT
HenryRWinterbottom May 31, 2024
a9a0258
Update jobs/JGLOBAL_WAVE_POST_BNDPNTBLL
HenryRWinterbottom May 31, 2024
94a9688
Update jobs/JGLOBAL_WAVE_POST_PNT
HenryRWinterbottom May 31, 2024
cdb0e82
Update jobs/JGLOBAL_WAVE_POST_SBS
HenryRWinterbottom May 31, 2024
883fa7c
Update jobs/JGLOBAL_WAVE_POST_SBS
HenryRWinterbottom May 31, 2024
2a81ae8
Update jobs/JGLOBAL_WAVE_PRDGEN_BULLS
HenryRWinterbottom May 31, 2024
87e2492
Update jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED
HenryRWinterbottom May 31, 2024
4d27a6c
Update jobs/JGLOBAL_WAVE_PREP
HenryRWinterbottom May 31, 2024
cb1764c
Update jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED
HenryRWinterbottom May 31, 2024
1241ede
Update scripts/exgfs_wave_init.sh
HenryRWinterbottom May 31, 2024
b0c7bad
Update jobs/JGLOBAL_WAVE_INIT
HenryRWinterbottom May 31, 2024
4b2f7ce
Addressing reviewer suggestion.
HenryRWinterbottom May 31, 2024
8f65499
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom May 31, 2024
cc4b281
Update ush/wave_tar.sh
HenryRWinterbottom Jun 4, 2024
d17d688
Update ush/wave_prnc_ice.sh
HenryRWinterbottom Jun 4, 2024
7438915
Update ush/wave_grid_interp_sbs.sh
HenryRWinterbottom Jun 4, 2024
226e112
Update ush/wave_grid_interp_sbs.sh
HenryRWinterbottom Jun 4, 2024
2acd4cc
Update jobs/JGLOBAL_WAVE_POST_SBS
HenryRWinterbottom Jun 4, 2024
52bfa61
Update jobs/JGLOBAL_WAVE_POST_BNDPNT
HenryRWinterbottom Jun 4, 2024
31e3e88
Update jobs/JGLOBAL_WAVE_POST_PNT
HenryRWinterbottom Jun 4, 2024
6be0cef
Update jobs/JGLOBAL_WAVE_POST_SBS
HenryRWinterbottom Jun 4, 2024
4ce3fe5
Update jobs/JGLOBAL_WAVE_POST_BNDPNT
HenryRWinterbottom Jun 4, 2024
96e3b42
Update jobs/JGLOBAL_WAVE_INIT
HenryRWinterbottom Jun 4, 2024
a6b36c7
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 4, 2024
a3fcbe1
Fixed typo detected by linter.
henrywinterbottom-wxdev Jun 4, 2024
4a5fef0
Added missing semicolon.
henrywinterbottom-wxdev Jun 4, 2024
0131597
Merge branch 'NOAA-EMC:develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 6, 2024
526c64c
Merge branch 'NOAA-EMC:develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 7, 2024
fc6d0c2
Addressed reviewer comment.
HenryRWinterbottom Jun 10, 2024
e125237
Addressed reviewer comments.
HenryRWinterbottom Jun 10, 2024
3351699
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 11, 2024
0c53d4b
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 12, 2024
5b35906
Addressed reviewer comments.
HenryRWinterbottom Jun 12, 2024
cde9194
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 12, 2024
1186cad
Bug fix.
HenryRWinterbottom Jun 12, 2024
cf666ea
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 13, 2024
cfc4f78
Addressed reviewer comments.
henrywinterbottom-wxdev Jun 13, 2024
b224d62
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 13, 2024
a549600
Shellcheck linter.
henrywinterbottom-wxdev Jun 13, 2024
03eba4e
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 13, 2024
416b524
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 17, 2024
452fcd9
Merge branch 'develop' into feature/gwdev_issue_2451
aerorahul Jun 18, 2024
7401664
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 20, 2024
acbf9c9
Addressed reviewer comment.
HenryRWinterbottom Jun 20, 2024
0fed287
Update jobs/JGLOBAL_WAVE_PREP
HenryRWinterbottom Jun 20, 2024
0f91c5c
Removed unneccessary template creation.
HenryRWinterbottom Jun 20, 2024
7922af7
Merge branch 'feature/gwdev_issue_2451' of https://github.com/HenryWi…
HenryRWinterbottom Jun 20, 2024
eb5fe34
Removed unnecessary template.
HenryRWinterbottom Jun 20, 2024
9ecbfd5
Addressed reviewer comment.
HenryRWinterbottom Jun 20, 2024
0134119
Fixed linter error; updated call.
HenryRWinterbottom Jun 20, 2024
abef5ef
Fixed linter error.
HenryRWinterbottom Jun 20, 2024
401bbba
Updated flags.
HenryRWinterbottom Jun 20, 2024
ccc0718
Reverted previous mkdir call flags.
HenryRWinterbottom Jun 20, 2024
0474c12
Update jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED
HenryRWinterbottom Jun 21, 2024
aff4814
Addressed reviewer comment.
HenryRWinterbottom Jun 21, 2024
6214778
Merge branch 'develop' into feature/gwdev_issue_2451
aerorahul Jun 21, 2024
26ba301
Corrected CI/CD detected bug.
HenryRWinterbottom Jun 21, 2024
11a7937
Merge branch 'feature/gwdev_issue_2451' of https://github.com/HenryWi…
HenryRWinterbottom Jun 21, 2024
67417a3
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 24, 2024
63904c2
Update jobs/JGLOBAL_WAVE_POST_SBS
HenryRWinterbottom Jun 25, 2024
fbbd643
Merge branch 'develop' into feature/gwdev_issue_2451
HenryRWinterbottom Jun 25, 2024
e17eec7
Made correction to path causing issue for RDHPCS Hercules.
HenryRWinterbottom Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions jobs/JGLOBAL_WAVE_INIT
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ export errchk=${errchk:-err_chk}
export MP_PULSE=0

# Set COM Paths
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_PREP
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMOUT_WAVE_PREP:COM_WAVE_PREP_TMPL

mkdir -m 775 -p ${COM_WAVE_PREP}
mkdir -m 775 -p "${COMIN_WAVE_PREP}"
mkdir -m 775 -p "${COMOUT_WAVE_PREP}"

# Set mpi serial command
export wavempexec=${wavempexec:-"mpirun -n"}
Expand Down
10 changes: 7 additions & 3 deletions jobs/JGLOBAL_WAVE_POST_BNDPNT
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ export errchk=${errchk:-err_chk}
export MP_PULSE=0

# Set COM Paths and GETGES environment
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_PREP COM_WAVE_HISTORY COM_WAVE_STATION
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
Copy link
Contributor

Choose a reason for hiding this comment

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

what is being written out in COMOUT_WAVE_HISTORY from this job?
This should be a COMIN variable, if I understand this job correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logic was derived from 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.

@aerorahul What is the verdict here?

Copy link
Contributor

@aerorahul aerorahul Jun 10, 2024

Choose a reason for hiding this comment

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

Where are the inputs derived from in this job?
Those should be labeled COMIN_.
Where are the outputs from this job placed under?
Those should be labeled as COMOUT_.
Without looking in what the job is doing and placing data, I don't think I can state definitively. I can definitely say though, WAVE_HISTORY should not be a COMOUT_ variable from this job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

@HenryWinterbottom-NOAA I still do not think we need a COMOUT_WAVE_HISTORY. If that means that we remove it from line 18 as well, I think that's okay.

Copy link
Contributor

Choose a reason for hiding this comment

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

Jessica is correct. I did an audit of these last week, COMOUT_WAVE_HISTORY should not be needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@HenryWinterbottom-NOAA COMOUT_WAVE_HISTORY should be removed 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.

@JessicaMeixner-NOAA Thank you. I missed this in the thread. Fixed.

COMOUT_WAVE_STATION:COM_WAVE_STATION_TMPL

if [[ ! -d ${COM_WAVE_STATION} ]]; then mkdir -p "${COM_WAVE_STATION}"; fi
if [[ ! -d ${COMIN_WAVE_STATION} ]]; then mkdir -p "${COMIN_WAVE_STATION}"; fi

# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
Expand All @@ -36,7 +40,7 @@ if [ ${err} -ne 0 ]; then
fi

##########################################
# Remove the Temporary working directory
# Remove the Temporary working directory
##########################################
cd ${DATAROOT}
[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA}
Expand Down
8 changes: 6 additions & 2 deletions jobs/JGLOBAL_WAVE_POST_BNDPNTBLL
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ export CDATE=${PDY}${cyc}
export MP_PULSE=0

# Set COM Paths and GETGES environment
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_PREP COM_WAVE_HISTORY COM_WAVE_STATION
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this a COMOUT? Is this job writing out to this directory?
What are the inputs to this job?

Copy link
Contributor Author

@HenryRWinterbottom HenryRWinterbottom Jun 10, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I just did a quick check and I don't see anywhere that we're writing out to the wave history directory - although it is a bit odd considering the line for creating the directory. I assume that's a mistake from copy/pasting from something else and was not properly cleaned up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the clarification, @JessicaMeixner-NOAA. In that case, all COMOUT should then be COMIN as noted by @aerorahul. Correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think COMOUT_WAVE_HISTORY -> COMIN_WAVE_HISTORY

I'm checking on COMIN_WAVE_STATION I think this should be COMOUT... but i'll have to look .

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, WAVE_STATION is where output goes: https://github.com/NOAA-EMC/global-workflow/blob/develop/ush/wave_tar.sh#L185

So COMIN_WAVE_STATION -> COMOUT_WAVE_STATION

WAVE_PREP and WAVE_HISTORY are where inputs are coming from.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @JessicaMeixner-NOAA
That was also my understanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@HenryWinterbottom-NOAA the forecast model writes to this location, this post job reads from this location.

COMOUT_WAVE_STATION:COM_WAVE_STATION_TMPL

if [[ ! -d ${COM_WAVE_STATION} ]]; then mkdir -p "${COM_WAVE_STATION}"; fi
if [[ ! -d ${COMIN_WAVE_STATION} ]]; then mkdir -p "${COMIN_WAVE_STATION}"; fi

# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
Expand Down
8 changes: 6 additions & 2 deletions jobs/JGLOBAL_WAVE_POST_PNT
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ export errchk=${errchk:-err_chk}
export MP_PULSE=0

# Set COM Paths and GETGES environment
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_PREP COM_WAVE_HISTORY COM_WAVE_STATION
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, no need for COMOUT_WAVE_HISTORY, unless I'm missing something.

Copy link
Contributor

Choose a reason for hiding this comment

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

@HenryWinterbottom-NOAA - I think this is still unresolved and should not be 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.

This was also resolved.

COMOUT_WAVE_STATION:COM_WAVE_STATION_TMPL

if [[ ! -d ${COM_WAVE_STATION} ]]; then mkdir -p "${COM_WAVE_STATION}"; fi
if [[ ! -d ${COMIN_WAVE_STATION} ]]; then mkdir -p "${COMIN_WAVE_STATION}"; fi

# Set wave model ID tag to include member number
# if ensemble; waveMEMB var empty in deterministic
Expand Down
8 changes: 6 additions & 2 deletions jobs/JGLOBAL_WAVE_POST_SBS
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ export errchk=${errchk:-err_chk}
export MP_PULSE=0

# Set COM Paths and GETGES environment
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_PREP COM_WAVE_HISTORY COM_WAVE_GRID
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMOUT_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
COMOUT_WAVE_GRID:COM_WAVE_GRID_TMPL

mkdir -p "${COM_WAVE_GRID}"
mkdir -p "${COMOUT_WAVE_GRID}"


# Set wave model ID tag to include member number
Expand Down
6 changes: 4 additions & 2 deletions jobs/JGLOBAL_WAVE_PRDGEN_BULLS
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ export SENDDBN_NTC=${SENDDBN_NTC:-YES}
export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_STATION COM_WAVE_WMO
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMOUT_WAVE_WMO:COM_WAVE_WMO_TMPL

if [[ ! -d ${COM_WAVE_WMO} ]]; then mkdir -p "${COM_WAVE_WMO}"; fi
if [[ ! -d ${COMOUT_WAVE_WMO} ]]; then mkdir -p "${COMOUT_WAVE_WMO}"; fi

###################################
# Execute the Script
Expand Down
8 changes: 5 additions & 3 deletions jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ export SENDDBN_NTC=${SENDDBN_NTC:-YES}
export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_WAVE_GRID COM_WAVE_WMO
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_WAVE_GRID:COM_WAVE_GRID_TMPL \
COMOUT_WAVE_WMO:COM_WAVE_WMO

if [[ ! -d ${COM_WAVE_WMO} ]]; then mkdir -p "${COM_WAVE_WMO}"; fi
if [[ ! -d ${COMOUT_WAVE_WMO} ]]; then mkdir -p "${COMOUT_WAVE_WMO}"; fi

mkdir -p "${COM_WAVE_WMO}"
mkdir -p "${COMOUT_WAVE_WMO}"

###################################
# Execute the Script
Expand Down
8 changes: 5 additions & 3 deletions jobs/JGLOBAL_WAVE_PREP
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ export MP_PULSE=0
export CDO=${CDO_ROOT}/bin/cdo

# Set COM Paths and GETGES environment
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OBS COM_WAVE_PREP
declare_from_tmpl -rx COM_RTOFS
[[ ! -d ${COM_WAVE_PREP} ]] && mkdir -m 775 -p "${COM_WAVE_PREP}"
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMIN_OBS:COM_OBS_TMPL \
COMOUT_WAVE_PREP:COM_WAVE_PREP_TMPL \
COMIN_RTOFS:COM_RTOFS_TMPL
[[ ! -d ${COMOUT_WAVE_PREP} ]] && mkdir -m 775 -p "${COMOUT_WAVE_PREP}"

# Execute the Script
${SCRgfs}/exgfs_wave_prep.sh
Expand Down
18 changes: 9 additions & 9 deletions scripts/exgfs_wave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ source "${USHgfs}/preamble.sh"
grdALL=$(printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' ')

for grdID in ${grdALL}; do
if [[ -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
if [[ -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
set +x
echo " Mod def file for ${grdID} found in ${COM_WAVE_PREP}. copying ...."
echo " Mod def file for ${grdID} found in ${COMIN_WAVE_PREP}. copying ...."
set_trace
cp "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"
cp "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"

else
set +x
echo " Mod def file for ${grdID} not found in ${COM_WAVE_PREP}. Setting up to generate ..."
echo " Mod def file for ${grdID} not found in ${COMIN_WAVE_PREP}. Setting up to generate ..."
echo ' '
set_trace
if [ -f ${FIXgfs}/wave/ww3_grid.inp.$grdID ]
Expand Down Expand Up @@ -125,7 +125,7 @@ source "${USHgfs}/preamble.sh"
fi
#TO DO: how do we say "it's unstructured, and therefore need to have error check here"

[[ ! -d "${COM_WAVE_PREP}" ]] && mkdir -m 775 -p "${COM_WAVE_PREP}"
[[ ! -d "${COMOUT_WAVE_PREP}" ]] && mkdir -m 775 -p "${COMOUT_WAVE_PREP}"
if [ ${CFP_MP:-"NO"} = "YES" ]; then
echo "$nmoddef ${USHgfs}/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile
else
Expand Down Expand Up @@ -190,7 +190,7 @@ source "${USHgfs}/preamble.sh"
# 1.a.3 File check

for grdID in ${grdALL}; do
if [[ -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
if [[ -f "${COMOUT_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
set +x
echo ' '
echo " mod_def.$grdID succesfully created/copied "
Expand All @@ -213,10 +213,10 @@ source "${USHgfs}/preamble.sh"
# Copy to other members if needed
if (( NMEM_ENS > 0 )); then
for mem in $(seq -f "%03g" 1 "${NMEM_ENS}"); do
MEMDIR="mem${mem}" YMD=${PDY} HH=${cyc} declare_from_tmpl COM_WAVE_PREP_MEM:COM_WAVE_PREP_TMPL
mkdir -p "${COM_WAVE_PREP_MEM}"
MEMDIR="mem${mem}" YMD=${PDY} HH=${cyc} declare_from_tmpl COMOUT_WAVE_PREP_MEM:COM_WAVE_PREP_TMPL
mkdir -p "${COMOUT_WAVE_PREP_MEM}"
for grdID in ${grdALL}; do
${NLN} "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "${COM_WAVE_PREP_MEM}/${RUN}wave.mod_def.${grdID}"
${NLN} "${COMOUT_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "${COMOUT_WAVE_PREP_MEM}/${RUN}wave.mod_def.${grdID}"
done
done
fi
Expand Down
10 changes: 5 additions & 5 deletions scripts/exgfs_wave_post_gridded_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ source "${USHgfs}/preamble.sh"

# 1.a.1 Copy model definition files
for grdID in ${waveGRD} ${wavepostGRD} ${waveinterpGRD}; do
if [[ -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
if [[ -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
set +x
echo " Mod def file for ${grdID} found in ${COM_WAVE_PREP}. copying ...."
echo " Mod def file for ${grdID} found in ${COMIN_WAVE_PREP}. copying ...."
set_trace

cp -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"
cp -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"
fi
done

Expand Down Expand Up @@ -258,7 +258,7 @@ source "${USHgfs}/preamble.sh"
then
iwait=0
for wavGRD in ${waveGRD} ; do
gfile=${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_grd.${wavGRD}.${YMD}.${HMS}
gfile=${COMOUT_WAVE_HISTORY}/${WAV_MOD_TAG}.out_grd.${wavGRD}.${YMD}.${HMS}
while [ ! -s ${gfile} ]; do sleep 10; let iwait=iwait+1; done
if [ $iwait -eq $iwaitmax ]; then
echo '*************************************************** '
Expand Down Expand Up @@ -409,7 +409,7 @@ source "${USHgfs}/preamble.sh"
ENSTAG=""
if [ ${waveMEMB} ]; then ENSTAG=".${membTAG}${waveMEMB}" ; fi
gribchk="${RUN}wave.${cycle}${ENSTAG}.${GRDNAME}.${GRDRES}.f${FH3}.grib2"
if [ ! -s ${COM_WAVE_GRID}/${gribchk} ]; then
if [ ! -s ${COMOUT_WAVE_GRID}/${gribchk} ]; then
set +x
echo ' '
echo '********************************************'
Expand Down
12 changes: 6 additions & 6 deletions scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ source "${USHgfs}/preamble.sh"
# Copy model definition files
iloop=0
for grdID in ${waveuoutpGRD}; do
if [[ -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
if [[ -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]]; then
set +x
echo " Mod def file for ${grdID} found in ${COM_WAVE_PREP}. copying ...."
echo " Mod def file for ${grdID} found in ${COMIN_WAVE_PREP}. copying ...."
set_trace

cp -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"
cp -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "mod_def.${grdID}"
iloop=$((iloop + 1))
fi
done
Expand Down Expand Up @@ -249,8 +249,8 @@ source "${USHgfs}/preamble.sh"

${NLN} mod_def.$waveuoutpGRD mod_def.ww3
HMS="${cyc}0000"
if [[ -f "${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" ]]; then
${NLN} "${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" \
if [[ -f "${COMOUT_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" ]]; then
${NLN} "${COMOUT_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" \
"./out_pnt.${waveuoutpGRD}"
else
echo '*************************************************** '
Expand Down Expand Up @@ -368,7 +368,7 @@ source "${USHgfs}/preamble.sh"
export BULLDATA=${DATA}/output_$YMDHMS
cp $DATA/mod_def.${waveuoutpGRD} mod_def.${waveuoutpGRD}

pfile="${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}"
pfile="${COMOUT_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}"
if [ -f ${pfile} ]
then
${NLN} ${pfile} ./out_pnt.${waveuoutpGRD}
Expand Down
12 changes: 6 additions & 6 deletions scripts/exgfs_wave_prdgen_bulls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ source "${USHgfs}/preamble.sh"

# 1. Get necessary files
set +x
echo " Copying bulletins from ${COM_WAVE_STATION}"
echo " Copying bulletins from ${COMIN_WAVE_STATION}"
set_trace

# 1.a Link the input file and untar it
BullIn="${COM_WAVE_STATION}/${RUNwave}.${cycle}.cbull_tar"
BullIn="${COMIN_WAVE_STATION}/${RUNwave}.${cycle}.cbull_tar"
if [ -f $BullIn ]; then
cp $BullIn cbull.tar
else
Expand Down Expand Up @@ -170,7 +170,7 @@ source "${USHgfs}/preamble.sh"
set_trace

formbul.pl -d "${headr}" -f "${fname}" -j "${job}" -m "${RUNwave}" \
-p "${COM_WAVE_WMO}" -s "NO" -o "${oname}" > formbul.out 2>&1
-p "${COMOUT_WAVE_WMO}" -s "NO" -o "${oname}" > formbul.out 2>&1
OK=$?

if [ "$OK" != '0' ] || [ ! -f $oname ]; then
Expand All @@ -196,15 +196,15 @@ source "${USHgfs}/preamble.sh"

# 3. Send output files to the proper destination
set_trace
cp "awipsbull.${cycle}.${RUNwave}" "${COM_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}"
cp "awipsbull.${cycle}.${RUNwave}" "${COMOUT_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}"
if [ "$SENDDBN_NTC" = YES ]; then
make_ntc_bull.pl "WMOBH" "NONE" "KWBC" "NONE" "${DATA}/awipsbull.${cycle}.${RUNwave}" \
"${COM_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}"
"${COMOUT_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}"
else
if [ "${envir}" = "para" ] || [ "${envir}" = "test" ] || [ "${envir}" = "dev" ]; then
echo "Making NTC bulletin for parallel environment, but do not alert."
(export SENDDBN=NO; make_ntc_bull.pl "WMOBH" "NONE" "KWBC" "NONE" \
"${DATA}/awipsbull.${cycle}.${RUNwave}" "${COM_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}")
"${DATA}/awipsbull.${cycle}.${RUNwave}" "${COMOUT_WAVE_WMO}/awipsbull.${cycle}.${RUNwave}")
fi
fi

Expand Down
8 changes: 4 additions & 4 deletions scripts/exgfs_wave_prdgen_gridded.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m}
esac
#

GRIBIN="${COM_WAVE_GRID}/${RUNwave}.${cycle}.${grdID}.f${fhr}.grib2"
GRIBIN="${COMIN_WAVE_GRID}/${RUNwave}.${cycle}.${grdID}.f${fhr}.grib2"
GRIBIN_chk=$GRIBIN.idx

icnt=1
Expand Down Expand Up @@ -232,16 +232,16 @@ grids=${grids:-ak_10m at_10m ep_10m wc_10m glo_30m}
#set_trace
#set +x
echo " Saving $AWIPSGRB.$grdOut.f${fhr} as grib2.$cycle.awipsww3_${grdID}.f${fhr}"
echo " in ${COM_WAVE_WMO}"
echo " in ${COMOUT_WAVE_WMO}"
#set_trace
cp "${AWIPSGRB}.${grdID}.f${fhr}" "${COM_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}"
cp "${AWIPSGRB}.${grdID}.f${fhr}" "${COMOUT_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}"
#set +x


if [ "$SENDDBN" = 'YES' ]
then
echo " Sending $AWIPSGRB.$grdID.f${fhr} to DBRUN."
"${DBNROOT}/bin/dbn_alert" GRIB_LOW "${RUN}" "${job}" "${COM_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}"
"${DBNROOT}/bin/dbn_alert" GRIB_LOW "${RUN}" "${job}" "${COMOUT_WAVE_WMO}/grib2.${cycle}.f${fhr}.awipsww3_${grdOut}"
fi
rm -f $AWIPSGRB.$grdID.f${fhr} tocgrib2.out
done # For grids
Expand Down
28 changes: 14 additions & 14 deletions scripts/exgfs_wave_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ source "${USHgfs}/preamble.sh"

for grdID in $grdINP $waveGRD
do
if [ -f "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]
if [ -f "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" ]
then
set +x
echo " Mod def file for $grdID found in ${COM_WAVE_PREP}. copying ...."
echo " Mod def file for $grdID found in ${COMIN_WAVE_PREP}. copying ...."
set_trace
cp ${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID} mod_def.$grdID
cp ${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID} mod_def.$grdID

else
set +x
Expand Down Expand Up @@ -322,19 +322,19 @@ source "${USHgfs}/preamble.sh"
ymdh_rtofs=$ymdh_beg

if [ "$FHMAX_WAV_CUR" -le 72 ]; then
rtofsfile1="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f024_prog.nc"
rtofsfile2="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f048_prog.nc"
rtofsfile3="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f072_prog.nc"
rtofsfile1="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f024_prog.nc"
rtofsfile2="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f048_prog.nc"
rtofsfile3="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f072_prog.nc"
if [ ! -f $rtofsfile1 ] || [ ! -f $rtofsfile2 ] || [ ! -f $rtofsfile3 ]; then
#Needed current files are not available, so use RTOFS from previous day
export RPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8)
fi
else
rtofsfile1="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f096_prog.nc"
rtofsfile2="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f120_prog.nc"
rtofsfile3="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f144_prog.nc"
rtofsfile4="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f168_prog.nc"
rtofsfile5="${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f192_prog.nc"
rtofsfile1="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f096_prog.nc"
rtofsfile2="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f120_prog.nc"
rtofsfile3="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f144_prog.nc"
rtofsfile4="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f168_prog.nc"
rtofsfile5="${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_f192_prog.nc"
if [ ! -f $rtofsfile1 ] || [ ! -f $rtofsfile2 ] || [ ! -f $rtofsfile3 ] ||
[ ! -f $rtofsfile4 ] || [ ! -f $rtofsfile5 ]; then
#Needed current files are not available, so use RTOFS from previous day
Expand All @@ -360,8 +360,8 @@ source "${USHgfs}/preamble.sh"
fhr_rtofs=$(${NHOUR} ${ymdh_rtofs} ${RPDY}00)
fh3_rtofs=$(printf "%03d" "${fhr_rtofs#0}")

curfile1h=${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc
curfile3h=${COM_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc
curfile1h=${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc
curfile3h=${COMIN_RTOFS}/${WAVECUR_DID}.${RPDY}/rtofs_glo_2ds_${fext}${fh3_rtofs}_prog.nc

if [ -s ${curfile1h} ] && [ "${FLGHF}" = "T" ] ; then
curfile=${curfile1h}
Expand Down Expand Up @@ -465,7 +465,7 @@ source "${USHgfs}/preamble.sh"
cat $file >> cur.${WAVECUR_FID}
done

cp -f cur.${WAVECUR_FID} ${COM_WAVE_PREP}/${RUN}wave.${WAVECUR_FID}.$cycle.cur
cp -f cur.${WAVECUR_FID} ${COMOUT_WAVE_PREP}/${RUN}wave.${WAVECUR_FID}.$cycle.cur

else
echo ' '
Expand Down
Loading
Loading