From d52977d94d684de0111303d4eb2e54d63c2b62a2 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Wed, 22 Jan 2025 18:10:48 +0000 Subject: [PATCH 01/24] update fix for wave --- versions/fix.ver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/fix.ver b/versions/fix.ver index db54701e777..7f69e657b2e 100644 --- a/versions/fix.ver +++ b/versions/fix.ver @@ -23,6 +23,6 @@ export reg2grb2_ver=20220805 export sfc_climo_ver=20220805 export ugwd_ver=20240624 export verif_ver=20220805 -export wave_ver=20240105 +export wave_ver=20250110 export orog_nest_ver=global-nest.20240419 export ugwd_nest_ver=global-nest.20240419 From 26765f6b82b3a8a62442e14064f23d8a446c58e8 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Fri, 24 Jan 2025 17:58:22 +0000 Subject: [PATCH 02/24] do not copy temp files to COM as they are not needed fix broken logic so that we do not try to copy somethign to COM --- ush/wave_grid_interp_sbs.sh | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/ush/wave_grid_interp_sbs.sh b/ush/wave_grid_interp_sbs.sh index c046afb2e93..6f9d110ac6f 100755 --- a/ush/wave_grid_interp_sbs.sh +++ b/ush/wave_grid_interp_sbs.sh @@ -142,14 +142,6 @@ source "${USHgfs}/preamble.sh" "${EXECgfs}/${pgm}" 1> gint.${grdID}.out 2>&1 export err=$?;err_chk -# Write interpolation file to main TEMP dir area if not there yet - if [ "wht_OK" = 'no' ] # FIXME: This is never going to evaluate to true, wht_OK is a string and needs to be ${wht_OK}. With ${wht_OK}, the next line is trying to copy into ${FIXgfs} space. This leads to a Permission denied error. The logic here needs to be evaluated and recoded. #TODO - then - cp -f ./WHTGRIDINT.bin ${DATA}/ww3_gint.WHTGRIDINT.bin.${grdID} - cp -f ./WHTGRIDINT.bin ${FIXgfs}/wave/ww3_gint.WHTGRIDINT.bin.${grdID} - fi - - if [ "$err" != '0' ] then set +x @@ -168,25 +160,6 @@ source "${USHgfs}/preamble.sh" rm -f mod_def.* mv out_grd.$grdID ${DATA}/output_${ymdh}0000/out_grd.$grdID -# 1.c Save in /com - - set +x - echo " Saving GRID file as ${COMOUT_WAVE_PREP}/${WAV_MOD_TAG}.out_grd.${grdID}.${PDY}${cyc}" - set_trace - cp "${DATA}/output_${ymdh}0000/out_grd.${grdID}" "${COMOUT_WAVE_PREP}/${WAV_MOD_TAG}.out_grd.${grdID}.${PDY}${cyc}" - -# if [ "$SENDDBN" = 'YES' ] -# then -# set +x -# echo " Alerting GRID file as $COMOUT/rundata/$WAV_MOD_TAG.out_grd.$grdID.${PDY}${cyc} -# set_trace - -# -# PUT DBNET ALERT HERE .... -# - -# fi - # --------------------------------------------------------------------------- # # 2. Clean up the directory From ac141b6736cbf199ef8f5072adf0d1beffc398c0 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Fri, 24 Jan 2025 18:09:11 +0000 Subject: [PATCH 03/24] remove un-used COMOUT_WAVE_PREP in JGLOBAL_WAVE_POST_SBS and subsequent scripts --- jobs/JGLOBAL_WAVE_POST_SBS | 3 +-- ush/wave_grid_interp_sbs.sh | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index 171d1605156..77886be2b01 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -13,10 +13,9 @@ export MP_PULSE=0 YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ COMIN_WAVE_PREP:COM_WAVE_PREP_TMPL \ COMIN_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \ - COMOUT_WAVE_PREP:COM_WAVE_PREP_TMPL \ COMOUT_WAVE_GRID:COM_WAVE_GRID_TMPL -for out_dir in "${COMOUT_WAVE_PREP}" "${COMOUT_WAVE_GRID}"; do +for out_dir in "${COMOUT_WAVE_GRID}"; do if [[ ! -d "${out_dir}" ]]; then mkdir -p "${out_dir}"; fi done diff --git a/ush/wave_grid_interp_sbs.sh b/ush/wave_grid_interp_sbs.sh index 6f9d110ac6f..fd7180add69 100755 --- a/ush/wave_grid_interp_sbs.sh +++ b/ush/wave_grid_interp_sbs.sh @@ -66,8 +66,7 @@ source "${USHgfs}/preamble.sh" set_trace if [[ -z "${PDY}" ]] || [[ -z "${cyc}" ]] || [[ -z "${cycle}" ]] || [[ -z "${EXECgfs}" ]] || \ - [[ -z "${COMOUT_WAVE_PREP}" ]] || [[ -z "${WAV_MOD_TAG}" ]] || [[ -z "${SENDDBN}" ]] || \ - [ -z "${waveGRD}" ] + [[ -z "${waveGRD}" ]] || [[ -z "${WAV_MOD_TAG}" ]] || [[ -z "${SENDDBN}" ]] then set +x echo ' ' @@ -75,7 +74,7 @@ source "${USHgfs}/preamble.sh" echo '*** EXPORTED VARIABLES IN postprocessor NOT SET ***' echo '***************************************************' echo ' ' - echo "${PDY}${cyc} ${cycle} ${EXECgfs} ${COMOUT_WAVE_PREP} ${WAV_MOD_TAG} ${SENDDBN} ${waveGRD}" + echo "${PDY}${cyc} ${cycle} ${EXECgfs} ${WAV_MOD_TAG} ${SENDDBN} ${waveGRD}" set_trace exit 1 fi From 9ac3313c1facdb0c52d80c5672fb0e6c7afc4b37 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Fri, 24 Jan 2025 18:09:54 +0000 Subject: [PATCH 04/24] change name of restart variables --- ush/forecast_postdet.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 7b9bd0ee48d..7cb2badadca 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -367,16 +367,10 @@ WW3_postdet() { elif [[ -s "${ww3_binary_restart_file}" ]]; then # found binary ww3 restart file export WW3_restart_from_binary=true - if [[ -f "${DATA}/ufs.cpld.cpl.r.nc" ]]; then - #if this is a cmeps continue then the wave restart name is different - seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds - local ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}" - ${NCP} "${ww3_binary_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ - || ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 ) - else - ${NCP} "${ww3_binary_restart_file}" "${DATA}/restart.ww3" \ - || ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 ) - fi + seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds + local ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}" + ${NCP} "${ww3_binary_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ + || ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 ) else if [[ "${RERUN}" == "YES" ]]; then # In the case of a RERUN, the WW3 restart file is required From 02ca6aeb199c92f1b1ebbe5910c2a7f8fb44d20f Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Mon, 27 Jan 2025 19:52:20 +0000 Subject: [PATCH 05/24] update ic date --- versions/ic.ver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/ic.ver b/versions/ic.ver index e7bd8358ef9..1994910c92c 100644 --- a/versions/ic.ver +++ b/versions/ic.ver @@ -16,7 +16,7 @@ ic_versions['C384C192']=20240610 ic_versions['C384mx025']=20241120 ic_versions['C768']=20241120 -ic_versions['C768mx025']=20241120 +ic_versions['C768mx025']=20250115 ic_versions['C1152']=20241120 -ic_versions['C1152mx025']=20241120 +ic_versions['C1152mx025']=20250115 From 3342450a42b299d0750b5bcc701766d55fe98363 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Wed, 29 Jan 2025 13:55:11 +0000 Subject: [PATCH 06/24] changes requested by NCO for v16 adding to develop --- scripts/exgfs_wave_post_pnt.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 96c60fc96c0..bad848c5888 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -618,13 +618,13 @@ source "${USHgfs}/preamble.sh" if [ ${CFP_MP:-"NO"} = "YES" ] && [ "$DOBLL_WAV" = "YES" ]; then if [ "$DOBNDPNT_WAV" = YES ]; then if [ "$DOSPC_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile nm=$(( nm + 1 )) fi if [ "$DOBLL_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile nm=$(( nm + 1 )) - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_ibpcbull_tar.out 2>&1 " >> cmdtarfile nm=$(( nm + 1 )) fi else @@ -633,28 +633,28 @@ source "${USHgfs}/preamble.sh" nm=$(( nm + 1 )) fi if [ "$DOBLL_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile nm=$(( nm + 1 )) - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile nm=$(( nm + 1 )) fi fi else if [ "$DOBNDPNT_WAV" = YES ]; then if [ "$DOSPC_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile fi if [ "$DOBLL_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_ibpcbull_tar.out 2>&1 " >> cmdtarfile fi else if [ "$DOSPC_WAV" = YES ]; then echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG spec $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile fi if [ "$DOBLL_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile fi fi fi From a06de0f3a3411b3ed2798694eee92cceb699269e Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Wed, 29 Jan 2025 19:50:18 +0000 Subject: [PATCH 07/24] add environment variable for fcst job for hercules/orion for addressing hang issues --- env/HERCULES.env | 1 + env/ORION.env | 2 ++ 2 files changed, 3 insertions(+) diff --git a/env/HERCULES.env b/env/HERCULES.env index acfbe438ef5..b565881a73d 100755 --- a/env/HERCULES.env +++ b/env/HERCULES.env @@ -214,6 +214,7 @@ case ${step} in "fcst" | "efcs") export OMP_STACKSIZE=512M + export FI_MLX_INJECT_LIMIT=0 (( nnodes = (ntasks+tasks_per_node-1)/tasks_per_node )) (( ufs_ntasks = nnodes*tasks_per_node )) diff --git a/env/ORION.env b/env/ORION.env index fbe00c153ce..64f3f3d555c 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -208,6 +208,8 @@ elif [[ "${step}" = "eupd" ]]; then elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then + export FI_MLX_INJECT_LIMIT=0 + (( nnodes = (ntasks+tasks_per_node-1)/tasks_per_node )) (( ufs_ntasks = nnodes*tasks_per_node )) # With ESMF threading, the model wants to use the full node From a9d8f7ed6788e53e428a0e385323d789d089b9bc Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Thu, 30 Jan 2025 14:11:17 +0000 Subject: [PATCH 08/24] update WW3 IC error handling --- ush/forecast_postdet.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 7cb2badadca..65ab5695f94 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -372,13 +372,13 @@ WW3_postdet() { ${NCP} "${ww3_binary_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ || ( echo "FATAL ERROR: Unable to copy binary WW3 IC, ABORT!"; exit 1 ) else - if [[ "${RERUN}" == "YES" ]]; then + if [[ "${RERUN}" == "YES" ]] || [[ -f "${DATA}/ufs.cpld.cpl.r.nc" ]]; then # In the case of a RERUN, the WW3 restart file is required - echo "FATAL ERROR: WW3 binary | netcdf restart file '${ww3_binary_restart_file}' | '${ww3_netcdf_restart_file}' not found for RERUN='${RERUN}', ABORT!" + # In the case of runtype=continue, if no wave restart when using PIO, the model will fail + echo "FATAL ERROR: WW3 binary | netcdf restart file '${ww3_binary_restart_file}' | '${ww3_netcdf_restart_file}' not found for RERUN='${RERUN}' or runtype=continue, ABORT!" exit 1 else echo "WARNING: WW3 binary | netcdf restart file '${ww3_binary_restart_file}' | '${ww3_netcdf_restart_file}' not found for warm_start='${warm_start}', will start from rest!" - export WW3_restart_from_binary=true fi fi From ee352fe65a76bb81011ad6601016577e1fa8ebca Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Thu, 30 Jan 2025 21:30:21 +0000 Subject: [PATCH 09/24] remove loop in JGLOBAL_WAVE_POST_SBS --- jobs/JGLOBAL_WAVE_POST_SBS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index 77886be2b01..acd654d6fa0 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -15,9 +15,7 @@ YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ COMIN_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \ COMOUT_WAVE_GRID:COM_WAVE_GRID_TMPL -for out_dir in "${COMOUT_WAVE_GRID}"; do - if [[ ! -d "${out_dir}" ]]; then mkdir -p "${out_dir}"; fi -done +if [[ ! -d "${COMOUT_WAVE_GRID}" ]]; then mkdir -p "${COMOUT_WAVE_GRID}"; fi if [[ -n "${wavepostGRD}" || -n "${waveinterpGRD}" ]]; then for grdID in ${wavepostGRD} ${waveinterpGRD}; do From 300f8f081027544585af564ef8454217d2d39c12 Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Wed, 5 Feb 2025 15:26:38 -0600 Subject: [PATCH 10/24] update ufs weather model hash --- sorc/ufs_model.fd | 2 +- ush/parsing_namelists_WW3.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index 76471dc6b7b..ee3d52d3620 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit 76471dc6b7bfc3342416d1a3402f360724f7c0fa +Subproject commit ee3d52d3620565dbf7bc4f47bd039fe6423fa5c1 diff --git a/ush/parsing_namelists_WW3.sh b/ush/parsing_namelists_WW3.sh index 67bffb19676..fcda4f17f72 100755 --- a/ush/parsing_namelists_WW3.sh +++ b/ush/parsing_namelists_WW3.sh @@ -27,6 +27,7 @@ WW3_namelists(){ #set coupling to ice/current WW3_ICE="F" WW3_CUR="F" + WW3_WLEV="F" case ${WW3ICEINP} in 'YES' ) From 02210bf942f991441ce36b3b0d3b2349ae3e89c8 Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Thu, 6 Feb 2025 07:47:15 -0600 Subject: [PATCH 11/24] updating script for shell check --- ush/parsing_namelists_WW3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/parsing_namelists_WW3.sh b/ush/parsing_namelists_WW3.sh index fcda4f17f72..7428c00651c 100755 --- a/ush/parsing_namelists_WW3.sh +++ b/ush/parsing_namelists_WW3.sh @@ -27,7 +27,6 @@ WW3_namelists(){ #set coupling to ice/current WW3_ICE="F" WW3_CUR="F" - WW3_WLEV="F" case ${WW3ICEINP} in 'YES' ) @@ -46,6 +45,7 @@ WW3_namelists(){ # Variables used in atparse of shel template export WW3_IC1="F" export WW3_IC5="F" + export WW3_WLEV="F" export WW3_ICE export WW3_CUR export WW3_OUTPARS="${OUTPARS_WAV}" From bbd9bd8d65863e9495828d061c029740d458e29d Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Fri, 7 Feb 2025 09:13:10 -0600 Subject: [PATCH 12/24] add fv3 output variable to model_configure --- ush/parsing_model_configure_FV3.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ush/parsing_model_configure_FV3.sh b/ush/parsing_model_configure_FV3.sh index d28048f0986..a6adbeaf8a3 100755 --- a/ush/parsing_model_configure_FV3.sh +++ b/ush/parsing_model_configure_FV3.sh @@ -56,6 +56,9 @@ local JMO=${LATB_JMO} local OUTPUT_FH=${FV3_OUTPUT_FH_NML} local IAU_OFFSET=${IAU_OFFSET:-0} +#set FV3 output directory: +local FV3ATM_OUTPUT_DIR="./" + # Ensure the template exists if [[ "${DO_NEST:-NO}" == "YES" ]] ; then local NEST_IMO=${npx_nest} From 5bb8f7012260c3b31bcf2168423c06c179aba1e9 Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Tue, 11 Feb 2025 09:45:37 -0600 Subject: [PATCH 13/24] point to ww3 with point updates --- .gitmodules | 2 +- sorc/ufs_model.fd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index c80d24c03aa..47c9c397241 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "sorc/ufs_model.fd"] path = sorc/ufs_model.fd - url = https://github.com/ufs-community/ufs-weather-model + url = https://github.com/jessicameixner-noaa/ufs-weather-model [submodule "sorc/wxflow"] path = sorc/wxflow url = https://github.com/NOAA-EMC/wxflow diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index ee3d52d3620..7b22ad54d47 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit ee3d52d3620565dbf7bc4f47bd039fe6423fa5c1 +Subproject commit 7b22ad54d4754c1d7dccc8ff42af18c99c1b2fe9 From f65f51e7e375b400996ee5be0ac9af88cfdceab2 Mon Sep 17 00:00:00 2001 From: Ali Tarazouj Date: Tue, 11 Feb 2025 12:27:11 -0600 Subject: [PATCH 14/24] adding .nc to ush/forecast_postdet.sh in the point output name for netcdf output --- ush/forecast_postdet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 65ab5695f94..e2ea1c7c3f8 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -428,7 +428,7 @@ 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) - ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3" + ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3.nc" fhr=$((fhr + fhinc)) done From 48091ee4e4ec169558cf033c122a5068de01c784 Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Tue, 11 Feb 2025 15:42:23 -0600 Subject: [PATCH 15/24] update ww3 --- sorc/ufs_model.fd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index 7b22ad54d47..0b592e714d5 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit 7b22ad54d4754c1d7dccc8ff42af18c99c1b2fe9 +Subproject commit 0b592e714d5449d1e627b5c7bcf627cf2db574e8 From 682b4c25ddf86544670128d39c5d5d3e4a655c1e Mon Sep 17 00:00:00 2001 From: JessicaMeixner-NOAA Date: Wed, 12 Feb 2025 08:13:40 -0600 Subject: [PATCH 16/24] update ww3 --- sorc/ufs_model.fd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index 0b592e714d5..f899f014c6c 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit 0b592e714d5449d1e627b5c7bcf627cf2db574e8 +Subproject commit f899f014c6cd4f926996ba2da0f3c039418c625e From 58102cdd5bc2c9ad665722b410f4766609de2bf7 Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Wed, 12 Feb 2025 20:22:33 +0000 Subject: [PATCH 17/24] modified the exgfs_wave_post_pnt.sh; config.resources; wave_tar.sh to be compatible with the optimized ww3_outp fot netcdf point outputs, per_time_step --- parm/config/gfs/config.resources | 12 +- scripts/exgfs_wave_post_pnt.sh | 327 ++++++------------------------- ush/forecast_postdet.sh | 2 +- ush/wave_tar.sh | 2 - 4 files changed, 67 insertions(+), 276 deletions(-) diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index 23fe8cdf187..7bc26b3556b 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -210,8 +210,8 @@ case ${step} in # The wavepost*pnt* jobs are I/O heavy and do not scale well to large nodes. # Limit the number of tasks/node to 40. "wavepostbndpnt") - walltime="03:00:00" - ntasks=240 + walltime="00:30:00" + ntasks=1 threads_per_task=1 tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True @@ -223,8 +223,8 @@ case ${step} in ;; "wavepostbndpntbll") - walltime="01:00:00" - ntasks=448 + walltime="00:10:00" + ntasks=2 threads_per_task=1 tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True @@ -236,8 +236,8 @@ case ${step} in ;; "wavepostpnt") - walltime="04:00:00" - ntasks=200 + walltime="00:35:00" + ntasks=3 threads_per_task=1 tasks_per_node=$(( max_tasks_per_node / threads_per_task )) export is_exclusive=True diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index bad848c5888..7e367dd945c 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -11,9 +11,6 @@ # It executes several scripts forpreparing and creating output data # as follows: # -# wave_outp_spec.sh : generates spectral data for output locations -# wave_outp_bull.sh : generates bulletins for output locations -# wave_outp_cat.sh : cats the by hour into the single output file # wave_tar.sh : tars the spectral and bulletin multiple files # # Script history log: @@ -21,6 +18,7 @@ # 2020-06-10 J-Henrique Alves: Porting to R&D machine Hera # 2020-07-30 Jessica Meixner: Points only - no gridded data # 2020-09-29 Jessica Meixner: optimized by changing loop structures +# 2025-02-12 Ali Salimi-Tarazou: Changed to be compatible with the new optimized ww3_outp # # COM inputs: # - ${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${grdID} @@ -85,9 +83,6 @@ source "${USHgfs}/preamble.sh" mkdir -p ${STA_DIR}/spec mkdir -p ${STA_DIR}/bull mkdir -p ${STA_DIR}/cbull - mkdir -p ${STA_DIR}/specfhr - mkdir -p ${STA_DIR}/bullfhr - mkdir -p ${STA_DIR}/cbullfhr set +x echo ' ' @@ -110,14 +105,6 @@ source "${USHgfs}/preamble.sh" # 1.a Model definition files and output files (set up using poe) -# 1.a.1 Set up the parallel command tasks - - rm -f cmdfile - touch cmdfile - chmod 744 cmdfile - - set_trace - # Copy model definition files iloop=0 for grdID in ${waveuoutpGRD}; do @@ -151,7 +138,7 @@ source "${USHgfs}/preamble.sh" fi done -# 1.c Output locations file +# 1.b Output locations file rm -f buoy.loc @@ -190,7 +177,7 @@ source "${USHgfs}/preamble.sh" DOBLL_WAV='NO' fi -# 1.d Input template files +# 1.c Input template files if [ -f ${PARMgfs}/wave/ww3_outp_spec.inp.tmpl ] then @@ -237,7 +224,7 @@ source "${USHgfs}/preamble.sh" DOBLL_WAV='NO' fi -# 1.e Getting buoy information for points +# 1.d Getting buoy information for points if [ "$DOSPC_WAV" = 'YES' ] || [ "$DOBLL_WAV" = 'YES' ] then @@ -255,12 +242,12 @@ source "${USHgfs}/preamble.sh" #export OFFSET_START_HOUR=$( printf "%02d" ${half_assim} ) hh=$( printf "%02d" $(( cyc + OFFSET_START_HOUR )) ) HMS="${hh}0000" - if [[ -f "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" ]]; then - ${NLN} "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" \ - "./out_pnt.${waveuoutpGRD}" + if [[ -f "${COMIN_WAVE_HISTORY}/${PDY}.${HMS}.out_pnt.ww3.nc" ]]; then + ${NLN} "${COMIN_WAVE_HISTORY}/${PDY}.${HMS}.out_pnt.ww3.nc" \ + "./${PDY}.${HMS}.out_pnt.ww3.nc" else echo '*************************************************** ' - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.${waveuoutpGRD}.${PDY}.${HMS} " + echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${PDY}.${HMS}.out_pnt.ww3.nc " echo '*************************************************** ' echo ' ' set_trace @@ -269,7 +256,7 @@ source "${USHgfs}/preamble.sh" fi rm -f buoy_tmp.loc buoy_log.ww3 ww3_oup.inp - ${NLN} ./out_pnt.${waveuoutpGRD} ./out_pnt.ww3 + #${NLN} ./${PDY}.${HMS}.out_pnt.ww3.nc ./out_pnt.ww3.nc ${NLN} ./mod_def.${waveuoutpGRD} ./mod_def.ww3 export pgm="${NET,,}_ww3_outp.x" @@ -301,8 +288,8 @@ source "${USHgfs}/preamble.sh" mv buoy_log.tmp buoy_log.dat grep -F -f ibp_tags buoy_lst.loc > buoy_tmp1.loc - #sed '$d' buoy_tmp1.loc > buoy_tmp2.loc awk '{ print $1 }' buoy_tmp1.loc > buoy_lst.txt + buoys=`awk '{ print $1 }' buoy_tmp1.loc` Nb=$(wc buoy_tmp1.loc | awk '{ print $1 }') rm -f buoy_tmp1.loc @@ -343,259 +330,71 @@ source "${USHgfs}/preamble.sh" # --------------------------------------------------------------------------- # # 2. Make files for processing boundary points # -# 2.a Command file set-up +# 2.a Creating ww3_outp.inp for each job and execute ww3_outp set +x echo ' Making command file for wave post points ' set_trace - - rm -f cmdfile - touch cmdfile - chmod 744 cmdfile - -# 1.a.2 Loop over forecast time to generate post files + + grep -F -f ibp_tags buoy_lst.loc | awk '{ print $1 }' > buoys + grep -F -f buoys buoy_log.ww3 | awk '{ print $1 }' > points + points=$(cat points | awk '{print $0 "\\n"}' | tr -d '\n') + rm buoys + + ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") + tstart="${ymdh:0:8} ${ymdh:8:2}0000" + dtspec=3600. # default time step (not used here) + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) + truntime="${PDY} ${cyc}0000" + + # Loop through forecast hours to link output file fhr=$FHMIN_WAV - # Generated sed-searchable paths - escaped_USHgfs="${USHgfs//\//\\\/}" while [ $fhr -le $FHMAX_WAV_PNT ]; do - - echo " Creating the wave point scripts at : $(date)" - ymdh=$($NDATE "${fhr}" "${PDY}${cyc}") + ymdh=$($NDATE $fhr "${PDY}${cyc}") YMD=${ymdh:0:8} HMS="${ymdh:8:2}0000" - YMDHMS=${YMD}${HMS} - FH3=$(printf %03i ${fhr}) - - rm -f tmpcmdfile.${FH3} - touch tmpcmdfile.${FH3} - mkdir output_$YMDHMS - cd output_$YMDHMS - -# Create instances of directories for spec and gridded output - export SPECDATA=${DATA}/output_$YMDHMS - escaped_SPECDATA="${SPECDATA//\//\\\/}" - export BULLDATA=${DATA}/output_$YMDHMS - cp $DATA/mod_def.${waveuoutpGRD} mod_def.${waveuoutpGRD} - - pfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}" - if [ -f ${pfile} ] - then - ${NLN} ${pfile} ./out_pnt.${waveuoutpGRD} + pfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" + if [[ -f "${pfile}" ]]; then + ${NLN} "${pfile}" "./${PDY}.${HMS}.out_pnt.ww3.nc" else - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.$waveuoutpGRD.${YMD}.${HMS} " - echo ' ' - set_trace - err=7; export err;${errchk} + echo '*************************************************** ' + echo " FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.${waveuoutpGRD}.${YMD}.${HMS} " + echo '*************************************************** ' + [[ "$LOUD" = YES ]] && set -x + err=7; export err; ${errchk} exit $err fi - cd $DATA - - if [ "$DOSPC_WAV" = 'YES' ] - then - export dtspec=3600. - # Construct the wave_outp_spec (spec) command to run on each buoy in buoy_lst.txt - sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_spec.sh \1 ${ymdh} spec ${escaped_SPECDATA} > ${escaped_SPECDATA}\/spec_\1.out 2>\&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}" - fi - - if [ "$DOBLL_WAV" = 'YES' ] - then - export dtspec=3600. - # Construct the wave_outp_spec (bull) command to run on each buoy in buoy_lst.txt - sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_spec.sh \1 ${ymdh} bull ${escaped_SPECDATA} > ${escaped_SPECDATA}\/bull_\1.out 2>\&1/" buoy_lst.txt >> "tmpcmdfile.${FH3}" - fi - - split -n l/1/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.01 - split -n l/2/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.02 - split -n l/3/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.03 - split -n l/4/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.04 - split -n l/5/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.05 - split -n l/6/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.06 - split -n l/7/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.07 - split -n l/8/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.08 - split -n l/9/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.09 - split -n l/10/10 tmpcmdfile.$FH3 > cmdfile.${FH3}.10 - - rm tmpcmdfile.$FH3 - chmod 744 cmdfile.${FH3}.01 cmdfile.${FH3}.02 cmdfile.${FH3}.03 cmdfile.${FH3}.04 - chmod 744 cmdfile.${FH3}.05 cmdfile.${FH3}.06 cmdfile.${FH3}.07 cmdfile.${FH3}.08 - chmod 744 cmdfile.${FH3}.09 cmdfile.${FH3}.10 - echo "$DATA/cmdfile.${FH3}.01" >> cmdfile - echo "$DATA/cmdfile.${FH3}.02" >> cmdfile - echo "$DATA/cmdfile.${FH3}.03" >> cmdfile - echo "$DATA/cmdfile.${FH3}.04" >> cmdfile - echo "$DATA/cmdfile.${FH3}.05" >> cmdfile - echo "$DATA/cmdfile.${FH3}.06" >> cmdfile - echo "$DATA/cmdfile.${FH3}.07" >> cmdfile - echo "$DATA/cmdfile.${FH3}.08" >> cmdfile - echo "$DATA/cmdfile.${FH3}.09" >> cmdfile - echo "$DATA/cmdfile.${FH3}.10" >> cmdfile - - FHINCP=$(( DTPNT_WAV / 3600 )) fhrp=$((fhr+FHINCP)) - fhr=$fhrp # no gridded output, loop with out_pnt stride - + fhr=$fhrp # no gridded output, loop with out_pnt stride done - - if [ ${CFP_MP:-"NO"} = "YES" ]; then - nfile=0 - ifile=0 - iline=1 - ifirst='yes' - nlines=$( wc -l cmdfile | awk '{print $1}' ) - while [ $iline -le $nlines ]; do - line=$( sed -n ''$iline'p' cmdfile ) - if [ -z "$line" ]; then - break - else - if [ "$ifirst" = 'yes' ]; then - echo "#!/bin/sh" > cmdmfile.$nfile - echo "$nfile cmdmfile.$nfile" >> cmdmprog - chmod 744 cmdmfile.$nfile - fi - echo $line >> cmdmfile.$nfile - nfile=$(( nfile + 1 )) - if [ $nfile -eq $NTASKS ]; then - nfile=0 - ifirst='no' - fi - iline=$(( iline + 1 )) - fi - done - fi - - wavenproc=$(wc -l cmdfile | awk '{print $1}') - wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) - - set +x - echo ' ' - echo " Executing the wave point scripts at : $(date)" - echo ' ------------------------------------' - echo ' ' - set_trace - - if [ "$wavenproc" -gt '1' ] - then - if [ ${CFP_MP:-"NO"} = "YES" ]; then - ${wavempexec} -n ${wavenproc} ${wave_mpmd} cmdmprog - else - ${wavempexec} ${wavenproc} ${wave_mpmd} cmdfile - fi - exit=$? - else - chmod 744 cmdfile - ./cmdfile - exit=$? - fi - - if [ "$exit" != '0' ] - then - set +x - echo ' ' - echo '*************************************' - echo '*** FATAL ERROR: CMDFILE FAILED ***' - echo '*************************************' - echo ' See Details Below ' - echo ' ' - set_trace - err=8; export err;${errchk} - exit $err - fi - -# 2.b Loop over each buoy to cat the final buoy file for all fhr - - cd $DATA - - echo "Before create cmdfile for cat buoy : $(date)" - rm -f cmdfile.buoy - touch cmdfile.buoy - chmod 744 cmdfile.buoy - CATOUTDIR=${DATA}/pnt_cat_out - escaped_CATOUTDIR="${CATOUTDIR//\//\\\/}" - mkdir -p ${CATOUTDIR} - - if [ "$DOSPC_WAV" = 'YES' ] - then - # Construct wave_outp_cat (spec) call for each buoy in buoy_lst.txt - sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} spec > ${escaped_CATOUTDIR}\/spec_cat_\1.out 2>\&1/" buoy_lst.txt >> cmdfile.buoy - fi - - if [ "$DOBLL_WAV" = 'YES' ] - then - # Construct wave_outp_cat (bull) call for each buoy in buoy_lst.txt - sed "s/^\(.*\)$/${escaped_USHgfs}\/wave_outp_cat.sh \1 ${FHMAX_WAV_PNT} bull > ${escaped_CATOUTDIR}\/bull_cat_\1.out 2>\&1/" buoy_lst.txt >> cmdfile.buoy - fi - - if [ ${CFP_MP:-"NO"} = "YES" ]; then - nfile=0 - ifile=0 - iline=1 - ifirst='yes' - nlines=$( wc -l < cmdfile.buoy) - while [ $iline -le $nlines ]; do - line=$( sed -n ''$iline'p' cmdfile.buoy ) - if [ -z "$line" ]; then - break - else - if [ "$ifirst" = 'yes' ]; then - echo "#!/bin/sh" > cmdfile.buoy.$nfile - echo "$nfile cmdfile.buoy.$nfile" >> cmdmprogbuoy - chmod 744 cmdfile.buoy.$nfile - fi - echo $line >> cmdfile.buoy.$nfile - nfile=$(( nfile + 1 )) - if [ $nfile -eq $NTASKS ]; then - nfile=0 - ifirst='no' - fi - iline=$(( iline + 1 )) - fi - done - fi - - wavenproc=$(wc -l < cmdfile.buoy) - wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) - - set +x - echo ' ' - echo " Executing the boundary point cat script at : $(date)" - echo ' ------------------------------------' - echo ' ' - set_trace - - if [ "$wavenproc" -gt '1' ] - then - if [ ${CFP_MP:-"NO"} = "YES" ]; then - # shellcheck disable=SC2086 - ${wavempexec} -n "${wavenproc}" ${wave_mpmd} cmdmprogbuoy - else - # shellcheck disable=SC2086 - ${wavempexec} "${wavenproc}" ${wave_mpmd} cmdfile.buoy - fi - exit=$? - else - chmod 744 ${fcmdnow} - ./${fcmdnow} - exit=$? + # Generate the ww3_outp.inp file from the template + if [ "$DOSPC_WAV" = 'YES' ]; then + sed -e "s/TIME/${tstart}/g" \ + -e "s/DT/${dtspec}/g" \ + -e "s/999/$N/g" \ + -e "s|POINT|$points|g" \ + -e "s/ITYPE/1/g" \ + -e "s/FORMAT/F/g" \ + ww3_outp_spec.inp.tmpl > ww3_outp.inp + + export pgm="${NET,,}_ww3_outp.x" + "${EXECgfs}/${pgm}" > ww3_outp_spec.log 2>&1 fi - if [ "$exit" != '0' ] - then - set +x - echo ' ' - echo '*************************************' - echo '*** FATAL ERROR: CMDFILE FAILED ***' - echo '*************************************' - echo ' See Details Below ' - echo ' ' - set_trace - err=9; export err;${errchk} - exit $err + if [ "$DOBLL_WAV" = 'YES' ]; then + sed -e "s/TIME/${tstart}/g" \ + -e "s/DT/${dtspec}/g" \ + -e "s/999/$N/g" \ + -e "s|POINT|$points|g" \ + -e "s/REFT/$truntime/g" \ + ww3_outp_bull.inp.tmpl > ww3_outp.inp + export pgm="${NET,,}_ww3_outp.x" + "${EXECgfs}/${pgm}" > ww3_outp_bull.log 2>&1 fi - # --------------------------------------------------------------------------- # # 3. Compress point output data into tar files @@ -618,25 +417,19 @@ source "${USHgfs}/preamble.sh" if [ ${CFP_MP:-"NO"} = "YES" ] && [ "$DOBLL_WAV" = "YES" ]; then if [ "$DOBNDPNT_WAV" = YES ]; then if [ "$DOSPC_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile fi if [ "$DOBLL_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_ibpcbull_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) fi else if [ "$DOSPC_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG spec $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG spec $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile fi if [ "$DOBLL_WAV" = YES ]; then - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile - nm=$(( nm + 1 )) + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile + echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile fi fi else diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 65ab5695f94..e2ea1c7c3f8 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -428,7 +428,7 @@ 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) - ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3" + ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3.nc" fhr=$((fhr + fhinc)) done diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index f82849854ff..a31c8b39600 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -88,8 +88,6 @@ source "${USHgfs}/preamble.sh" exit 2 fi - cd "${STA_DIR}/${filext}" - # --------------------------------------------------------------------------- # # 2. Generate tar file (spectral files are compressed) From 6af9b87b8e9c1b9e8d0537bdaaacae38a440e942 Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Thu, 13 Feb 2025 15:41:32 +0000 Subject: [PATCH 18/24] modified the raw point output name for the netcdf file --- scripts/exgfs_wave_post_pnt.sh | 6 +++--- ush/forecast_postdet.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 7e367dd945c..9625f23c44e 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -242,8 +242,8 @@ source "${USHgfs}/preamble.sh" #export OFFSET_START_HOUR=$( printf "%02d" ${half_assim} ) hh=$( printf "%02d" $(( cyc + OFFSET_START_HOUR )) ) HMS="${hh}0000" - if [[ -f "${COMIN_WAVE_HISTORY}/${PDY}.${HMS}.out_pnt.ww3.nc" ]]; then - ${NLN} "${COMIN_WAVE_HISTORY}/${PDY}.${HMS}.out_pnt.ww3.nc" \ + if [[ -f "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" ]]; then + ${NLN} "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" \ "./${PDY}.${HMS}.out_pnt.ww3.nc" else echo '*************************************************** ' @@ -358,7 +358,7 @@ source "${USHgfs}/preamble.sh" ${NLN} "${pfile}" "./${PDY}.${HMS}.out_pnt.ww3.nc" else echo '*************************************************** ' - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.${waveuoutpGRD}.${YMD}.${HMS} " + echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${PDY}.${HMS}.out_pnt.ww3.nc " echo '*************************************************** ' [[ "$LOUD" = YES ]] && set -x err=7; export err; ${errchk} diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index e2ea1c7c3f8..2ad184e1148 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -428,7 +428,7 @@ 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) - ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}" "${DATA}/${vdate}.out_pnt.ww3.nc" + ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.out_pnt.${waveuoutpGRD}.${vdate}.nc" "${DATA}/${vdate}.out_pnt.ww3.nc" fhr=$((fhr + fhinc)) done From 62aebc641085d62f90ebde81f1e20b9ab59ab49a Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Fri, 14 Feb 2025 18:31:46 +0000 Subject: [PATCH 19/24] modified exgfs_wave_post_pnt.sh; ww3_outp.in; wave_tar.sh to be compatible with the new optimized ww3_outp program with the netcdf inputs --- parm/wave/ww3_outp_bull.inp.tmpl | 2 +- parm/wave/ww3_outp_spec.inp.tmpl | 2 +- scripts/exgfs_wave_post_pnt.sh | 117 ++++++++++++++----------------- ush/forecast_postdet.sh | 1 + ush/wave_tar.sh | 4 +- 5 files changed, 58 insertions(+), 68 deletions(-) diff --git a/parm/wave/ww3_outp_bull.inp.tmpl b/parm/wave/ww3_outp_bull.inp.tmpl index e7741b876c4..0ce30e903da 100755 --- a/parm/wave/ww3_outp_bull.inp.tmpl +++ b/parm/wave/ww3_outp_bull.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 + TIME DT 999 1 $ POINT -1 diff --git a/parm/wave/ww3_outp_spec.inp.tmpl b/parm/wave/ww3_outp_spec.inp.tmpl index 2490b7a8d7e..f1f1346f07a 100755 --- a/parm/wave/ww3_outp_spec.inp.tmpl +++ b/parm/wave/ww3_outp_spec.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 + TIME DT 999 1 $ POINT -1 diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 9625f23c44e..c97fb3da8a4 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -224,39 +224,56 @@ source "${USHgfs}/preamble.sh" DOBLL_WAV='NO' fi -# 1.d Getting buoy information for points +# 1.d Linking the output files + + ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") + tstart="${ymdh:0:8} ${ymdh:8:2}0000" + dtspec=3600. # default time step (not used here) + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) + truntime="${PDY} ${cyc}0000" + + # Loop through forecast hours to link output file + fhr=$FHMIN_WAV + while [ $fhr -le $FHMAX_WAV_PNT ]; do + ymdh=$($NDATE $fhr "${PDY}${cyc}") + YMD=${ymdh:0:8} + HMS="${ymdh:8:2}0000" + pfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" + if [[ -f "${pfile}" ]]; then + ${NLN} "${pfile}" "./${YMD}.${HMS}.out_pnt.ww3.nc" + else + echo '*************************************************** ' + echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${YMD}.${HMS}.out_pnt.ww3.nc " + echo '*************************************************** ' + [[ "$LOUD" = YES ]] && set -x + err=7; export err; ${errchk} + exit $err + fi + + FHINCP=$(( DTPNT_WAV / 3600 )) + fhrp=$((fhr+FHINCP)) + fhr=$fhrp # no gridded output, loop with out_pnt stride + done + +# 1.e Getting buoy information for points if [ "$DOSPC_WAV" = 'YES' ] || [ "$DOBLL_WAV" = 'YES' ] then ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") + YMD=${ymdh:0:8} tstart="${ymdh:0:8} ${ymdh:8:2}0000" + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) dtspec=3600. # default time step (not used here) sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${dtspec}/g" \ - -e "s/POINT/1/g" \ + -e "s/999/$N/g" \ + -e "s/^.*POINT.*/\$ &/g" \ -e "s/ITYPE/0/g" \ -e "s/FORMAT/F/g" \ ww3_outp_spec.inp.tmpl > ww3_outp.inp - - ${NLN} mod_def.$waveuoutpGRD mod_def.ww3 - #export OFFSET_START_HOUR=$( printf "%02d" ${half_assim} ) - hh=$( printf "%02d" $(( cyc + OFFSET_START_HOUR )) ) - HMS="${hh}0000" - if [[ -f "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" ]]; then - ${NLN} "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" \ - "./${PDY}.${HMS}.out_pnt.ww3.nc" - else - echo '*************************************************** ' - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${PDY}.${HMS}.out_pnt.ww3.nc " - echo '*************************************************** ' - echo ' ' - set_trace - echo "${WAV_MOD_TAG} post ${waveuoutpGRD} ${PDY}${cyc} ${cycle} : field output missing." - err=4; export err;${errchk} fi rm -f buoy_tmp.loc buoy_log.ww3 ww3_oup.inp - #${NLN} ./${PDY}.${HMS}.out_pnt.ww3.nc ./out_pnt.ww3.nc ${NLN} ./mod_def.${waveuoutpGRD} ./mod_def.ww3 export pgm="${NET,,}_ww3_outp.x" @@ -287,11 +304,8 @@ source "${USHgfs}/preamble.sh" rm -f buoy_log.dat mv buoy_log.tmp buoy_log.dat - grep -F -f ibp_tags buoy_lst.loc > buoy_tmp1.loc - awk '{ print $1 }' buoy_tmp1.loc > buoy_lst.txt - buoys=`awk '{ print $1 }' buoy_tmp1.loc` - Nb=$(wc buoy_tmp1.loc | awk '{ print $1 }') - rm -f buoy_tmp1.loc + buoys=`awk '{ print $2 }' buoy_log.dat` + Nb=$(wc buoy_log.dat | awk '{ print $1 }') if [ -s buoy_log.dat ] then @@ -311,8 +325,6 @@ source "${USHgfs}/preamble.sh" DOBLL_WAV='NO' fi - fi - # 1.f Data summary set +x @@ -336,40 +348,11 @@ source "${USHgfs}/preamble.sh" echo ' Making command file for wave post points ' set_trace - grep -F -f ibp_tags buoy_lst.loc | awk '{ print $1 }' > buoys + grep -F -f ibp_tags buoy_log.dat | awk '{ print $2 }' > buoys grep -F -f buoys buoy_log.ww3 | awk '{ print $1 }' > points points=$(cat points | awk '{print $0 "\\n"}' | tr -d '\n') rm buoys - ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") - tstart="${ymdh:0:8} ${ymdh:8:2}0000" - dtspec=3600. # default time step (not used here) - N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) - truntime="${PDY} ${cyc}0000" - - # Loop through forecast hours to link output file - fhr=$FHMIN_WAV - while [ $fhr -le $FHMAX_WAV_PNT ]; do - ymdh=$($NDATE $fhr "${PDY}${cyc}") - YMD=${ymdh:0:8} - HMS="${ymdh:8:2}0000" - pfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${YMD}.${HMS}.nc" - if [[ -f "${pfile}" ]]; then - ${NLN} "${pfile}" "./${PDY}.${HMS}.out_pnt.ww3.nc" - else - echo '*************************************************** ' - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${PDY}.${HMS}.out_pnt.ww3.nc " - echo '*************************************************** ' - [[ "$LOUD" = YES ]] && set -x - err=7; export err; ${errchk} - exit $err - fi - - FHINCP=$(( DTPNT_WAV / 3600 )) - fhrp=$((fhr+FHINCP)) - fhr=$fhrp # no gridded output, loop with out_pnt stride - done - # Generate the ww3_outp.inp file from the template if [ "$DOSPC_WAV" = 'YES' ]; then sed -e "s/TIME/${tstart}/g" \ @@ -410,27 +393,33 @@ source "${USHgfs}/preamble.sh" set_trace -# 6.b Spectral data files +# 3.b Execute the taring if [ ${CFP_MP:-"NO"} = "YES" ]; then nm=0; fi if [ ${CFP_MP:-"NO"} = "YES" ] && [ "$DOBLL_WAV" = "YES" ]; then if [ "$DOBNDPNT_WAV" = YES ]; then if [ "$DOSPC_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibp $Nb > ${WAV_MOD_TAG}_ibp_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) fi if [ "$DOBLL_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile - echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_ibpcbull_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpbull $Nb > ${WAV_MOD_TAG}_ibpbull_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG ibpcbull $Nb > ${WAV_MOD_TAG}_ibpcbull_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) fi else if [ "$DOSPC_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG spec $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG spec $Nb > ${WAV_MOD_TAG}_spec_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) fi if [ "$DOBLL_WAV" = YES ]; then - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile - echo "${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile - fi + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG bull $Nb > ${WAV_MOD_TAG}_bull_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) + echo "$nm ${USHgfs}/wave_tar.sh $WAV_MOD_TAG cbull $Nb > ${WAV_MOD_TAG}_cbull_tar.out 2>&1 " >> cmdtarfile + nm=$(( nm + 1 )) + fi fi else if [ "$DOBNDPNT_WAV" = YES ]; then diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 2ad184e1148..289838aa3e5 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -378,6 +378,7 @@ WW3_postdet() { echo "FATAL ERROR: WW3 binary | netcdf restart file '${ww3_binary_restart_file}' | '${ww3_netcdf_restart_file}' not found for RERUN='${RERUN}' or runtype=continue, ABORT!" exit 1 else + export WW3_restart_from_binary=false echo "WARNING: WW3 binary | netcdf restart file '${ww3_binary_restart_file}' | '${ww3_netcdf_restart_file}' not found for warm_start='${warm_start}', will start from rest!" fi fi diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index a31c8b39600..5dd638628eb 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -103,12 +103,12 @@ source "${USHgfs}/preamble.sh" while [[ "${tardone}" = "no" ]] do - nf=$(ls | awk '/'$ID.*.$filext'/ {a++} END {print a}') + nf=$(find . -maxdepth 1 -type f -name "*.$filext" | wc -l) nbm2=$(( $nb - 2 )) if [[ "${nf}" -ge "${nbm2}" ]] then - tar -cf "${ID}.${cycle}.${type}_tar" ./${ID}.*.${filext} + tar -cf "${ID}.${cycle}.${type}_tar" *."${filext}" exit=$? filename="${ID}.${cycle}.${type}_tar" if ! wait_for_file "${filename}" "${sleep_interval}" "${countMAX}" ; then From 58a8c3edd8b3d8efa80803da0910fab335cc3fd7 Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Fri, 21 Feb 2025 01:13:29 +0000 Subject: [PATCH 20/24] changing the wave_tar.sh and template ww3_outp to work with the retrieved prefix --- parm/wave/ww3_outp_bull.inp.tmpl | 2 +- parm/wave/ww3_outp_spec.inp.tmpl | 2 +- ush/wave_tar.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/parm/wave/ww3_outp_bull.inp.tmpl b/parm/wave/ww3_outp_bull.inp.tmpl index 0ce30e903da..4ca87b274d4 100755 --- a/parm/wave/ww3_outp_bull.inp.tmpl +++ b/parm/wave/ww3_outp_bull.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 1 + TIME DT 999 1 gfswave $ POINT -1 diff --git a/parm/wave/ww3_outp_spec.inp.tmpl b/parm/wave/ww3_outp_spec.inp.tmpl index f1f1346f07a..f8be0f09070 100755 --- a/parm/wave/ww3_outp_spec.inp.tmpl +++ b/parm/wave/ww3_outp_spec.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 1 + TIME DT 999 1 gfswave $ POINT -1 diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index 5dd638628eb..a31c8b39600 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -103,12 +103,12 @@ source "${USHgfs}/preamble.sh" while [[ "${tardone}" = "no" ]] do - nf=$(find . -maxdepth 1 -type f -name "*.$filext" | wc -l) + nf=$(ls | awk '/'$ID.*.$filext'/ {a++} END {print a}') nbm2=$(( $nb - 2 )) if [[ "${nf}" -ge "${nbm2}" ]] then - tar -cf "${ID}.${cycle}.${type}_tar" *."${filext}" + tar -cf "${ID}.${cycle}.${type}_tar" ./${ID}.*.${filext} exit=$? filename="${ID}.${cycle}.${type}_tar" if ! wait_for_file "${filename}" "${sleep_interval}" "${countMAX}" ; then From ce182478bc3abb9bfdce4dbfca00278ca49cf08b Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Fri, 21 Feb 2025 18:52:54 +0000 Subject: [PATCH 21/24] using DTPNT_WAV for time step in the wave_pnt script --- scripts/exgfs_wave_post_pnt.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index c97fb3da8a4..8b258f9629f 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -228,8 +228,7 @@ source "${USHgfs}/preamble.sh" ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") tstart="${ymdh:0:8} ${ymdh:8:2}0000" - dtspec=3600. # default time step (not used here) - N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) * 3600 / $DTPNT_WAV + 1 )) truntime="${PDY} ${cyc}0000" # Loop through forecast hours to link output file @@ -262,10 +261,9 @@ source "${USHgfs}/preamble.sh" ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") YMD=${ymdh:0:8} tstart="${ymdh:0:8} ${ymdh:8:2}0000" - N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) + 1 )) - dtspec=3600. # default time step (not used here) + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) * 3600 / $DTPNT_WAV + 1 )) sed -e "s/TIME/${tstart}/g" \ - -e "s/DT/${dtspec}/g" \ + -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ -e "s/^.*POINT.*/\$ &/g" \ -e "s/ITYPE/0/g" \ @@ -356,7 +354,7 @@ source "${USHgfs}/preamble.sh" # Generate the ww3_outp.inp file from the template if [ "$DOSPC_WAV" = 'YES' ]; then sed -e "s/TIME/${tstart}/g" \ - -e "s/DT/${dtspec}/g" \ + -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ -e "s|POINT|$points|g" \ -e "s/ITYPE/1/g" \ @@ -369,7 +367,7 @@ source "${USHgfs}/preamble.sh" if [ "$DOBLL_WAV" = 'YES' ]; then sed -e "s/TIME/${tstart}/g" \ - -e "s/DT/${dtspec}/g" \ + -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ -e "s|POINT|$points|g" \ -e "s/REFT/$truntime/g" \ From 735dbd792b881c1e1d792f036d613d755af728b9 Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Tue, 25 Feb 2025 16:35:42 +0000 Subject: [PATCH 22/24] pointing to AliS ufs_model and WW3 --- .gitmodules | 2 +- sorc/ufs_model.fd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index c80d24c03aa..fda1a5c187c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "sorc/ufs_model.fd"] path = sorc/ufs_model.fd - url = https://github.com/ufs-community/ufs-weather-model + url = https://github.com/AliS-Noaa/ufs-weather-model [submodule "sorc/wxflow"] path = sorc/wxflow url = https://github.com/NOAA-EMC/wxflow diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index ee3d52d3620..647d4f79881 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit ee3d52d3620565dbf7bc4f47bd039fe6423fa5c1 +Subproject commit 647d4f7988199f9b892fd16f416ab060a6715ae3 From 2a928093dfd1ac95aadf00c6e7e0a3344968bf5f Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Mon, 17 Mar 2025 19:43:54 +0000 Subject: [PATCH 23/24] minor shel warning resolved and the prefix is templated in the spec.inp and bull.inp --- parm/wave/ww3_outp_bull.inp.tmpl | 2 +- parm/wave/ww3_outp_spec.inp.tmpl | 2 +- scripts/exgfs_wave_post_pnt.sh | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/parm/wave/ww3_outp_bull.inp.tmpl b/parm/wave/ww3_outp_bull.inp.tmpl index 4ca87b274d4..b9d5339a0a3 100755 --- a/parm/wave/ww3_outp_bull.inp.tmpl +++ b/parm/wave/ww3_outp_bull.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 1 gfswave + TIME DT 999 1 PREFIX $ POINT -1 diff --git a/parm/wave/ww3_outp_spec.inp.tmpl b/parm/wave/ww3_outp_spec.inp.tmpl index f8be0f09070..82865a93014 100755 --- a/parm/wave/ww3_outp_spec.inp.tmpl +++ b/parm/wave/ww3_outp_spec.inp.tmpl @@ -1,6 +1,6 @@ $ WAVEWATCH III Point output post-processing $ ------------------------------------------ - TIME DT 999 1 gfswave + TIME DT 999 1 PREFIX $ POINT -1 diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index b900975432a..3af61db764a 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -265,6 +265,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ + -e "s/PREFIX/$RUNwave/g" \ -e "s/^.*POINT.*/\$ &/g" \ -e "s/ITYPE/0/g" \ -e "s/FORMAT/F/g" \ @@ -302,7 +303,6 @@ source "${USHgfs}/preamble.sh" rm -f buoy_log.dat mv buoy_log.tmp buoy_log.dat - buoys=`awk '{ print $2 }' buoy_log.dat` Nb=$(wc buoy_log.dat | awk '{ print $1 }') if [ -s buoy_log.dat ] @@ -348,7 +348,7 @@ source "${USHgfs}/preamble.sh" grep -F -f ibp_tags buoy_log.dat | awk '{ print $2 }' > buoys grep -F -f buoys buoy_log.ww3 | awk '{ print $1 }' > points - points=$(cat points | awk '{print $0 "\\n"}' | tr -d '\n') + points=$(awk '{print $0 "\\n"}' points | tr -d '\n') rm buoys # Generate the ww3_outp.inp file from the template @@ -356,6 +356,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ + -e "s/PREFIX/$RUNwave/g" \ -e "s|POINT|$points|g" \ -e "s/ITYPE/1/g" \ -e "s/FORMAT/F/g" \ @@ -369,6 +370,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ + -e "s/PREFIX/$RUNwave/g" \ -e "s|POINT|$points|g" \ -e "s/REFT/$truntime/g" \ ww3_outp_bull.inp.tmpl > ww3_outp.inp From 8ee2df44c95c34d45e1c42a9342986e58e170200 Mon Sep 17 00:00:00 2001 From: AliS-Noaa Date: Mon, 17 Mar 2025 19:51:00 +0000 Subject: [PATCH 24/24] correcting RUNwave --- scripts/exgfs_wave_post_pnt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 3af61db764a..cb5a19ea359 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -265,7 +265,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ - -e "s/PREFIX/$RUNwave/g" \ + -e "s/PREFIX/${RUN}wave/g" \ -e "s/^.*POINT.*/\$ &/g" \ -e "s/ITYPE/0/g" \ -e "s/FORMAT/F/g" \ @@ -356,7 +356,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ - -e "s/PREFIX/$RUNwave/g" \ + -e "s/PREFIX/${RUN}wave/g" \ -e "s|POINT|$points|g" \ -e "s/ITYPE/1/g" \ -e "s/FORMAT/F/g" \ @@ -370,7 +370,7 @@ source "${USHgfs}/preamble.sh" sed -e "s/TIME/${tstart}/g" \ -e "s/DT/${DTPNT_WAV}/g" \ -e "s/999/$N/g" \ - -e "s/PREFIX/$RUNwave/g" \ + -e "s/PREFIX/${RUN}wave/g" \ -e "s|POINT|$points|g" \ -e "s/REFT/$truntime/g" \ ww3_outp_bull.inp.tmpl > ww3_outp.inp