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

Remove multi-grid wave support #3188

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7f00d08
modified scripts\exgfs_wave_post_gridded_sbs.sh
AntonMFernando-NOAA Dec 20, 2024
1d1a0f3
Merge branch 'NOAA-EMC:develop' into feature/remove_waveGRD
AntonMFernando-NOAA Dec 20, 2024
471b759
modified ush\forecast_postdet.sh and ush\wave_grid_interp_sbs.sh
AntonMFernando-NOAA Dec 20, 2024
b3992d7
Merge branch 'feature/remove_waveGRD' of https://github.com/AntonMFer…
AntonMFernando-NOAA Dec 20, 2024
af0e86f
modified ush\parsing_namelists_WW3.sh
AntonMFernando-NOAA Dec 20, 2024
1b0765b
modified scripts\exgfs_wave_post_gridded_sbs.sh
AntonMFernando-NOAA Dec 20, 2024
12acba6
modified ush\parsing_namelists_WW3.sh
AntonMFernando-NOAA Dec 20, 2024
e070372
added waveMULTIGRID='.false.'
AntonMFernando-NOAA Dec 20, 2024
0e0c1b9
remove the variable waveMULTIGRID
AntonMFernando-NOAA Dec 20, 2024
5f38480
removed waveMULTIGRID var
AntonMFernando-NOAA Dec 21, 2024
1f9319c
modified scripts\exgfs_wave_post_gridded_sbs.sh
AntonMFernando-NOAA Dec 22, 2024
1be896c
modified ush\wave_grid_interp_sbs.sh
AntonMFernando-NOAA Dec 23, 2024
3b21bf5
added quotes to ush\parsing_namelists_WW3.sh
AntonMFernando-NOAA Dec 23, 2024
a04be83
added quotes to ush\parsing_namelists_WW3.sh
AntonMFernando-NOAA Dec 23, 2024
620df1a
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Dec 24, 2024
e9af5b0
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Dec 26, 2024
2530b57
corrected a typo parm\archive\enkf_restartb_grp.yaml.j2
AntonMFernando-NOAA Dec 27, 2024
4d1ebad
corrected typos
AntonMFernando-NOAA Jan 1, 2025
9124667
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Jan 2, 2025
5e2e30c
added endfor for parm\archive\enkf_restarta_grp.yaml.j2
AntonMFernando-NOAA Jan 3, 2025
b26e391
modified parm\archive\enkf_restarta_grp.yaml.j2
AntonMFernando-NOAA Jan 3, 2025
28672e8
modified parm\archive\enkf_restarta_grp.yaml.j2
AntonMFernando-NOAA Jan 3, 2025
cfd7d83
modified parm\archive\enkf_restartb_grp.yaml.j2
AntonMFernando-NOAA Jan 3, 2025
dc93d20
modifed parm\archive\enkf_restartb_grp.yaml.j2
AntonMFernando-NOAA Jan 3, 2025
f926ed7
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Jan 3, 2025
259f268
edited config.wave
AntonMFernando-NOAA Jan 3, 2025
f64694a
removed waveesmfGRD from scripts
AntonMFernando-NOAA Jan 3, 2025
e4b74db
removed USE_WAV_RMP var
AntonMFernando-NOAA Jan 3, 2025
82c2bfa
updated parm\config\gfs\config.wave
AntonMFernando-NOAA Jan 3, 2025
d8a908b
updated parm\config\gfs\config.wave
AntonMFernando-NOAA Jan 3, 2025
fe756e1
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Jan 4, 2025
6743a93
Merge branch 'develop' into feature/remove_waveGRD
AntonMFernando-NOAA Jan 4, 2025
d820a5e
modified parm\config\gfs\config.wave
AntonMFernando-NOAA Jan 4, 2025
9830414
Merge branch 'feature/remove_waveGRD' of https://github.com/AntonMFer…
AntonMFernando-NOAA Jan 4, 2025
5b484f4
Merge branch 'develop' into feature/remove_waveGRD
aerorahul Jan 6, 2025
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
20 changes: 1 addition & 19 deletions parm/config/gefs/config.wave
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,10 @@ export RUNwave="${RUN}wave"
export RUNRSTwave="gdas"

#grid dependent variable defaults
export waveGRDN='1' # grid number for ww3_multi
export waveGRDG='10' # grid group for ww3_multi
export USE_WAV_RMP='NO' # YES/NO rmp grid remapping pre-processed coefficients
export waveMULTIGRID='.false.' # .true./.false. for multi or shel
export MESH_WAV="mesh.${waveGRD}.nc" # Mesh grid for wave model for CMEPS
export waveesmfGRD=' ' # input grid for multigrid

#Grid dependent variables for various grids
case "${waveGRD}" in
"gnh_10m;aoc_9km;gsh_15m")
#GFSv16 settings:
export waveGRDN='1 2 3'
export waveGRDG='10 20 30'
export USE_WAV_RMP='YES'
export waveMULTIGRID='.true.'
JessicaMeixner-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export IOSRV='3'
export MESH_WAV=' '
export waveesmfGRD='glox_10m'
export waveuoutpGRD='points'
export waveinterpGRD='glo_15mxt at_10m ep_10m wc_10m glo_30m'
export wavepostGRD='gnh_10m aoc_9km gsh_15m'
;;
"gwes_30m")
#Grid used for P8
export waveinterpGRD=''
Expand Down Expand Up @@ -157,7 +139,7 @@ export WW3CURIENS='F'
export GOFILETYPE=1 # GOFILETYPE=1 one gridded file per output step
export POFILETYPE=1 # POFILETYPE=1 one point file per output step

# Parameters for ww3_multi/shel.inp
# Parameters for ww3_shel.inp
# Unified output T or F
export FUNIPNT='T'
# Output server type (see ww3_shel/multi.inp in WW3 repo)
Expand Down
20 changes: 1 addition & 19 deletions parm/config/gfs/config.wave
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,10 @@ export RUNwave="${RUN}wave"
export RUNRSTwave="gdas"

#grid dependent variable defaults
export waveGRDN='1' # grid number for ww3_multi
export waveGRDG='10' # grid group for ww3_multi
export USE_WAV_RMP='NO' # YES/NO rmp grid remapping pre-processed coefficients
export waveMULTIGRID='.false.' # .true./.false. for multi or shel
export MESH_WAV="mesh.${waveGRD}.nc" # Mesh grid for wave model for CMEPS
export waveesmfGRD=' ' # input grid for multigrid

#Grid dependent variables for various grids
case "${waveGRD}" in
"gnh_10m;aoc_9km;gsh_15m")
#GFSv16 settings:
export waveGRDN='1 2 3'
export waveGRDG='10 20 30'
export USE_WAV_RMP='YES'
export waveMULTIGRID='.true.'
JessicaMeixner-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export IOSRV='3'
export MESH_WAV=' '
export waveesmfGRD='glox_10m'
export waveuoutpGRD='points'
export waveinterpGRD='glo_15mxt at_10m ep_10m wc_10m glo_30m'
export wavepostGRD='gnh_10m aoc_9km gsh_15m'
;;
"gwes_30m")
#Grid used for P8
export waveinterpGRD=''
Expand Down Expand Up @@ -187,7 +169,7 @@ export WW3CURIENS='F'
export GOFILETYPE=1 # GOFILETYPE=1 one gridded file per output step
export POFILETYPE=1 # POFILETYPE=1 one point file per output step

# Parameters for ww3_multi/shel.inp
# Parameters for ww3_shel.inp
# Unified output T or F
export FUNIPNT='T'
# Output server type (see ww3_shel/multi.inp in WW3 repo)
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_wave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ source "${USHgfs}/preamble.sh"
chmod 744 cmdfile

# Eliminate duplicate grids
array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $waveesmfGRD $wavepostGRD $waveinterpGRD)
array=($WAVECUR_FID $WAVEICE_FID $WAVEWND_FID $waveuoutpGRD $waveGRD $wavepostGRD $waveinterpGRD)
grdALL=$(printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' ')

for grdID in ${grdALL}; do
Expand Down
16 changes: 7 additions & 9 deletions scripts/exgfs_wave_post_gridded_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,13 @@ source "${USHgfs}/preamble.sh"

if [ $fhr = $fhrg ]
then
for wavGRD in ${waveGRD}; do
gfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_grd.${wavGRD}.${YMD}.${HMS}"
if [[ ! -s "${gfile}" ]]; then
echo " FATAL ERROR : NO RAW FIELD OUTPUT FILE ${gfile}"
err=3; export err; "${errchk}"
exit "${err}"
fi
${NLN} "${gfile}" "./out_grd.${wavGRD}"
done
gfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_grd.${waveGRD}.${YMD}.${HMS}"
if [[ ! -s "${gfile}" ]]; then
echo " FATAL ERROR : NO RAW FIELD OUTPUT FILE ${gfile}"
err=3; export err; "${errchk}"
exit "${err}"
fi
${NLN} "${gfile}" "./out_grd.${waveGRD}"

if [ "$DOGRI_WAV" = 'YES' ]
then
Expand Down
25 changes: 5 additions & 20 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,28 +375,16 @@ WW3_postdet() {

# Link output files
local wavprfx="${RUN}wave${WAV_MEMBER:-}"
if [[ "${waveMULTIGRID}" == ".true." ]]; then
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.log.mww3.${PDY}${cyc}" "log.mww3"
for ww3_grid in ${waveGRD}; do
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.log.${ww3_grid}.${PDY}${cyc}" "log.${ww3_grid}"
done
else
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.log.${waveGRD}.${PDY}${cyc}" "log.ww3"
fi
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.log.${waveGRD}.${PDY}${cyc}" "log.ww3"
aerorahul marked this conversation as resolved.
Show resolved Hide resolved

# Loop for gridded output (uses FHINC)
local fhr vdate FHINC ww3_grid
fhr=${FHMIN_WAV}
fhinc=${FHOUT_WAV}
while (( fhr <= FHMAX_WAV )); do
vdate=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} + ${fhr} hours" +%Y%m%d.%H0000)
if [[ "${waveMULTIGRID}" == ".true." ]]; then
for ww3_grid in ${waveGRD} ; do
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_grd.${ww3_grid}.${vdate}" "${DATA}/${vdate}.out_grd.${ww3_grid}"
done
else
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_grd.${waveGRD}.${vdate}" "${DATA}/${vdate}.out_grd.ww3"
fi
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_grd.${waveGRD}.${vdate}" "${DATA}/${vdate}.out_grd.ww3"

if (( FHMAX_HF_WAV > 0 && FHOUT_HF_WAV > 0 && fhr < FHMAX_HF_WAV )); then
fhinc=${FHOUT_HF_WAV}
fi
Expand All @@ -408,11 +396,8 @@ WW3_postdet() {
fhinc=${FHINCP_WAV}
while (( fhr <= FHMAX_WAV )); do
vdate=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} + ${fhr} hours" +%Y%m%d.%H0000)
if [[ "${waveMULTIGRID}" == ".true." ]]; then
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.${waveuoutpGRD}"
else
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3"
fi
${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3"

fhr=$((fhr + fhinc))
done
}
Expand Down
33 changes: 3 additions & 30 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -591,22 +591,9 @@ WW3_predet(){
# Files from wave prep and wave init jobs
# Copy mod_def files for wave grids
local ww3_grid
if [[ "${waveMULTIGRID}" == ".true." ]]; then
local array=("${WAVECUR_FID}" "${WAVEICE_FID}" "${WAVEWND_FID}" "${waveuoutpGRD}" "${waveGRD}" "${waveesmfGRD}")
echo "Wave Grids: ${array[*]}"
local grdALL
# shellcheck disable=SC2312
grdALL=$(printf "%s\n" "${array[@]}" | sort -u | tr '\n' ' ')

for ww3_grid in ${grdALL}; do
${NCP} "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${ww3_grid}" "${DATA}/mod_def.${ww3_grid}" \
|| ( echo "FATAL ERROR: Failed to copy '${RUN}wave.mod_def.${ww3_grid}' from '${COMIN_WAVE_PREP}'"; exit 1 )
done
else
#if shel, only 1 waveGRD which is linked to mod_def.ww3
${NCP} "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${waveGRD}" "${DATA}/mod_def.ww3" \
|| ( echo "FATAL ERROR: Failed to copy '${RUN}wave.mod_def.${waveGRD}' from '${COMIN_WAVE_PREP}'"; exit 1 )
fi
#if shel, only 1 waveGRD which is linked to mod_def.ww3
${NCP} "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${waveGRD}" "${DATA}/mod_def.ww3" \
|| ( echo "FATAL ERROR: Failed to copy '${RUN}wave.mod_def.${waveGRD}' from '${COMIN_WAVE_PREP}'"; exit 1 )

if [[ "${WW3ICEINP}" == "YES" ]]; then
local wavicefile="${COMIN_WAVE_PREP}/${RUN}wave.${WAVEICE_FID}.t${current_cycle:8:2}z.ice"
Expand Down Expand Up @@ -638,20 +625,6 @@ WW3_predet(){
fi

WAV_MOD_TAG="${RUN}wave${waveMEMB}"
if [[ "${USE_WAV_RMP:-YES}" == "YES" ]]; then
local file file_array file_count
# shellcheck disable=SC2312
mapfile -t file_array < <(find "${FIXgfs}/wave" -name "rmp_src_to_dst_conserv_*" | sort)
file_count=${#file_array[@]}
if (( file_count > 0 )); then
for file in "${file_array[@]}" ; do
${NCP} "${file}" "${DATA}/"
done
else
echo 'FATAL ERROR : No rmp precomputed nc files found for wave model, ABORT!'
exit 4
fi
fi
}

# shellcheck disable=SC2034
Expand Down
Loading
Loading