diff --git a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml index 768f13ce408..a1077e3e172 100644 --- a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml +++ b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml @@ -10,7 +10,7 @@ arguments: resdetocean: 5.0 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20250218 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20250327 idate: 2021032418 edate: 2021032500 nens: 0 diff --git a/ci/cases/pr/C48mx500_hybAOWCDA.yaml b/ci/cases/pr/C48mx500_hybAOWCDA.yaml index dc06aacf0c6..cfef477ec13 100644 --- a/ci/cases/pr/C48mx500_hybAOWCDA.yaml +++ b/ci/cases/pr/C48mx500_hybAOWCDA.yaml @@ -11,7 +11,7 @@ arguments: resdetocean: 5.0 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C48mx500/20250327 idate: 2021032418 edate: 2021032500 nens: 2 diff --git a/ci/cases/pr/C96C48_hybatmDA.yaml b/ci/cases/pr/C96C48_hybatmDA.yaml index 22f505a147e..8584a54ec8e 100644 --- a/ci/cases/pr/C96C48_hybatmDA.yaml +++ b/ci/cases/pr/C96C48_hybatmDA.yaml @@ -12,7 +12,7 @@ arguments: resensatmos: 48 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20250327 idate: 2021122018 edate: 2021122106 nens: 2 diff --git a/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml b/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml index 8aab16dd932..59c086368f6 100644 --- a/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml +++ b/ci/cases/pr/C96C48_hybatmaerosnowDA.yaml @@ -10,7 +10,7 @@ arguments: resensatmos: 48 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20250327 idate: 2021122012 edate: 2021122100 nens: 2 diff --git a/ci/cases/pr/C96C48_ufs_hybatmDA.yaml b/ci/cases/pr/C96C48_ufs_hybatmDA.yaml index 339f7ec253a..fd25172c81b 100644 --- a/ci/cases/pr/C96C48_ufs_hybatmDA.yaml +++ b/ci/cases/pr/C96C48_ufs_hybatmDA.yaml @@ -10,7 +10,7 @@ arguments: resensatmos: 48 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20250327 idate: 2024022318 edate: 2024022406 nens: 2 @@ -24,3 +24,5 @@ skip_ci_on_hosts: - orion - hercules - awsepicglobalworkflow + - hera + - wcoss2 diff --git a/ci/cases/pr/C96_atm3DVar.yaml b/ci/cases/pr/C96_atm3DVar.yaml index b44ebaedd77..76b99f011b0 100644 --- a/ci/cases/pr/C96_atm3DVar.yaml +++ b/ci/cases/pr/C96_atm3DVar.yaml @@ -9,7 +9,7 @@ arguments: resdetatmos: 96 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20250327 idate: 2021122018 edate: 2021122106 nens: 0 diff --git a/ci/cases/pr/C96_atm3DVar_extended.yaml b/ci/cases/pr/C96_atm3DVar_extended.yaml index e8949e78c16..aec3c52087f 100644 --- a/ci/cases/pr/C96_atm3DVar_extended.yaml +++ b/ci/cases/pr/C96_atm3DVar_extended.yaml @@ -9,7 +9,7 @@ arguments: resdetatmos: 96 comroot: {{ 'RUNTESTS' | getenv }}/COMROOT expdir: {{ 'RUNTESTS' | getenv }}/EXPDIR - icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20241120 + icsdir: {{ 'ICSDIR_ROOT' | getenv }}/C96C48/20250327 idate: 2021122018 edate: 2021122118 nens: 0 diff --git a/env/WCOSS2.env b/env/WCOSS2.env index e0e27da2351..d94be2a5bdd 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -45,10 +45,6 @@ elif [[ "${step}" = "prep_emissions" ]]; then elif [[ "${step}" = "waveinit" ]] || [[ "${step}" = "waveprep" ]] || [[ "${step}" = "wavepostsbs" ]] || [[ "${step}" = "wavepostbndpnt" ]] || [[ "${step}" = "wavepostbndpntbll" ]] || [[ "${step}" = "wavepostpnt" ]]; then export USE_CFP="YES" - if [[ "${step}" = "wavepostpnt" ]] || [[ "${step}" = "wavepostbndpnt" ]] || \ - [[ "${step}" = "wavepostbndpntbll" ]]; then - export USE_CFP="NO" - fi export wavempexec="${launcher} -np" export wave_mpmd=${mpmd_opt} diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index b1a3205bb7e..27d64626b00 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -209,8 +209,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 @@ -222,8 +222,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 @@ -235,8 +235,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/parm/product/gfs.anl.paramlist.a.txt b/parm/product/gfs.anl.paramlist.a.txt index 3c7ba28bb97..dd340636d6b 100644 --- a/parm/product/gfs.anl.paramlist.a.txt +++ b/parm/product/gfs.anl.paramlist.a.txt @@ -152,6 +152,7 @@ HLCY:3000-0 m above ground ICAHT:max wind ICAHT:tropopause ICETK:surface +ICETMP:surface ICMR:50 mb ICMR:1000 mb ICMR:100 mb diff --git a/parm/product/gfs.f000.paramlist.a.txt b/parm/product/gfs.f000.paramlist.a.txt index 34d84ac3c1a..82250231758 100644 --- a/parm/product/gfs.f000.paramlist.a.txt +++ b/parm/product/gfs.f000.paramlist.a.txt @@ -165,7 +165,9 @@ HPBL:surface ICAHT:max wind ICAHT:tropopause ICEC:surface +ICEG:10 m above mean sea level ICETK:surface +ICETMP:surface ICMR:50 mb ICMR:1000 mb ICMR:100 mb diff --git a/parm/product/gfs.fFFF.paramlist.a.txt b/parm/product/gfs.fFFF.paramlist.a.txt index cb2f82f02a7..1b1943c4cd8 100644 --- a/parm/product/gfs.fFFF.paramlist.a.txt +++ b/parm/product/gfs.fFFF.paramlist.a.txt @@ -175,7 +175,9 @@ HPBL:surface ICAHT:max wind ICAHT:tropopause ICEC:surface +ICEG:10 m above mean sea level ICETK:surface +ICETMP:surface ICSEV:100 mb ICSEV:150 mb ICSEV:200 mb diff --git a/parm/wave/ww3_outp_bull.inp.tmpl b/parm/wave/ww3_outp_bull.inp.tmpl index e7741b876c4..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 + 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 2490b7a8d7e..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 + TIME DT 999 1 PREFIX $ POINT -1 diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index 9d2d5abdd36..8b91d7b0514 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -4,9 +4,8 @@ # # UNIX Script Documentation Block # Script name: exgfs_wave_post_gridded_sbs.sh -# Script description: Creates output products from binary WW3 data +# Script description: Creates output products from gridded binary WW3 data # -# Author: Jose-Henrique Alves Org: NCEP/EMC Date: 2019-12-06 # Abstract: This script is the postprocessor for the wave component in GFS. # This version runs side-by-side with the GFS fcst step. # It executes several scripts forpreparing and creating output data @@ -15,11 +14,6 @@ # wave_grib2_sbs.sh : generates GRIB2 files. # wave_grid_interp_ush.sh : interpolates data from new grids to old grids # -# Script history log: -# 2019-12-06 J-Henrique Alves: First Version adapted from HTolman post.sh 2007 -# 2020-06-10 J-Henrique Alves: Porting to R&D machine Hera -# 2020-07-31 Jessica Meixner: Removing points, now gridded data only -# # COM inputs: # # Attributes: diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 2ae6a3e306f..da71a978743 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -4,27 +4,17 @@ # # UNIX Script Documentation Block # Script name: exgfs_wave_post_pnt.sh -# Script description: Creates point output products from binary WW3 data +# Script description: Creates point output products from NetCDF WW3 point data # -# Author: Jose-Henrique Alves Org: NCEP/EMC Date: 2019-12-06 # Abstract: This script is the point postprocessor for the wave component in GFS. # 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: -# 2019-12-06 J-Henrique Alves: First Version adapted from HTolman post.sh 2007 -# 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 -# # COM inputs: # - ${COMIN_WAVE_PREP}/${RUN}.wave.t${cyc}z.mod_def.${grdID}.bin -# - ${COMIN_WAVE_HISTORY}/${RUN}.wave.t${cyc}z.points.f${FH3}.bin +# - ${COMIN_WAVE_HISTORY}/${RUN}.wave.t${cyc}z.points.f${FH3}.nc # # $Id$ # @@ -81,9 +71,6 @@ 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 ' ' @@ -106,14 +93,6 @@ # 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 @@ -147,7 +126,7 @@ fi done -# 1.c Output locations file +# 1.b Output locations file rm -f buoy.loc @@ -186,7 +165,7 @@ DOBLL_WAV='NO' fi -# 1.d Input template files +# 1.c Input template files if [ -f ${PARMgfs}/wave/ww3_outp_spec.inp.tmpl ] then @@ -233,36 +212,56 @@ DOBLL_WAV='NO' fi +# 1.d Linking the output files + + ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}") + tstart="${ymdh:0:8} ${ymdh:8:2}0000" + N=$(( ($FHMAX_WAV_PNT - $FHMIN_WAV) * 3600 / $DTPNT_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" + FH3=$(printf %03i ${fhr}) + pfile="${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.points.f${FH3}.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" - 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/POINT/1/g" \ + -e "s/DT/${DTPNT_WAV}/g" \ + -e "s/999/$N/g" \ + -e "s/PREFIX/${RUN}wave/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 - if [[ -f "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.points.f000.bin" ]]; then - ${NLN} "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.points.f000.bin" \ - "./out_pnt.${waveuoutpGRD}" - else - echo '*************************************************** ' - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.points.f000.bin" - echo '*************************************************** ' - echo ' ' - set_trace - echo "${WAV_MOD_TAG} post ${waveuoutpGRD} ${PDY}${cyc} ${cycle} : field output missing." - err=4; export err;${errchk} - fi + fi rm -f buoy_tmp.loc buoy_log.ww3 ww3_oup.inp - ${NLN} ./out_pnt.${waveuoutpGRD} ./out_pnt.ww3 ${NLN} ./mod_def.${waveuoutpGRD} ./mod_def.ww3 export pgm="${NET,,}_ww3_outp.x" @@ -293,11 +292,7 @@ rm -f buoy_log.dat 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 - Nb=$(wc buoy_tmp1.loc | awk '{ print $1 }') - rm -f buoy_tmp1.loc + Nb=$(wc buoy_log.dat | awk '{ print $1 }') if [ -s buoy_log.dat ] then @@ -317,8 +312,6 @@ DOBLL_WAV='NO' fi - fi - # 1.f Data summary set +x @@ -336,259 +329,44 @@ # --------------------------------------------------------------------------- # # 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 - 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}") - 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}.points.f${FH3}.bin" - if [ -f ${pfile} ] - then - ${NLN} ${pfile} ./out_pnt.${waveuoutpGRD} - else - echo " FATAL ERROR : NO RAW POINT OUTPUT FILE ${WAV_MOD_TAG}.points.f${FH3}.bin" - echo ' ' - set_trace - 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 - - done - - - if [ ${USE_CFP:-"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 [ ${USE_CFP:-"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 + grep -F -f ibp_tags buoy_log.dat | awk '{ print $2 }' > buoys + grep -F -f buoys buoy_log.ww3 | awk '{ print $1 }' > points + points=$(awk '{print $0 "\\n"}' points | tr -d '\n') + rm buoys - 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 [ ${USE_CFP:-"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 + # Generate the ww3_outp.inp file from the template + if [ "$DOSPC_WAV" = 'YES' ]; then + sed -e "s/TIME/${tstart}/g" \ + -e "s/DT/${DTPNT_WAV}/g" \ + -e "s/999/$N/g" \ + -e "s/PREFIX/${RUN}wave/g" \ + -e "s|POINT|$points|g" \ + -e "s/ITYPE/1/g" \ + -e "s/FORMAT/F/g" \ + ww3_outp_spec.inp.tmpl > ww3_outp.inp - if [ "$wavenproc" -gt '1' ] - then - if [ ${USE_CFP:-"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=$? + export pgm="${NET,,}_ww3_outp.x" + "${EXECgfs}/${pgm}" 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/${DTPNT_WAV}/g" \ + -e "s/999/$N/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 + export pgm="${NET,,}_ww3_outp.x" + "${EXECgfs}/${pgm}" fi - # --------------------------------------------------------------------------- # # 3. Compress point output data into tar files @@ -604,91 +382,37 @@ set_trace -# 6.b Spectral data files - - if [ ${USE_CFP:-"NO"} = "YES" ]; then nm=0; fi +# 3.b Execute the taring - if [ ${USE_CFP:-"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 )) - 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 "$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 )) - 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 )) - fi + if [[ "${DOBNDPNT_WAV}" == "YES" ]]; then + if [[ "${DOSPC_WAV}" == "YES" ]]; then + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} ibp ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_ibp_tar.out" >> cmdtarfile + fi + if [[ "${DOBLL_WAV}" == "YES" ]]; then + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} ibpbull ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_ibpbull_tar.out" >> cmdtarfile + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} ibpcbull ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_ibpcbull_tar.out" >> cmdtarfile 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}_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}_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}_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 + if [[ "${DOSPC_WAV}" == "YES" ]]; then + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} spec ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_spec_tar.out" >> cmdtarfile + fi + if [[ "${DOBLL_WAV}" == "YES" ]]; then + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} bull ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_bull_tar.out" >> cmdtarfile + echo "${USHgfs}/wave_tar.sh ${WAV_MOD_TAG} cbull ${Nb} 2>&1 | tee ${WAV_MOD_TAG}_cbull_tar.out" >> cmdtarfile fi fi - wavenproc=$(wc -l cmdtarfile | awk '{print $1}') - wavenproc=$(echo $((${wavenproc}<${NTASKS}?${wavenproc}:${NTASKS}))) - - set +x - echo ' ' - echo " Executing the wave_tar scripts at : $(date)" - echo ' ------------------------------------' - echo ' ' - set_trace - - if [ "$wavenproc" -gt '1' ] - then - if [ ${USE_CFP:-"NO"} = "YES" ]; then - ${wavempexec} -n ${wavenproc} ${wave_mpmd} cmdtarfile - else - ${wavempexec} ${wavenproc} ${wave_mpmd} cmdtarfile + # Ensure there are enough processors for MPMD else use serial + ncmds=$(wc -l < cmdtarfile) + if [[ ${NTASKS} -lt ${ncmds} ]]; then + if [[ "${USE_CFP:-}" = "YES" ]]; then + echo "WARNING: Not enough processors for MPMD, '${NTASKS} < ${ncmd}', running in serial mode" + export USE_CFP="NO" fi - exit=$? - else - chmod 744 cmdtarfile - ./cmdtarfile - exit=$? fi - if [ "$exit" != '0' ] - then - set +x - echo ' ' - echo '*************************************' - echo '*** FATAL ERROR: CMDFILE FAILED ***' - echo '*************************************' - echo ' See Details Below ' - echo ' ' - set_trace - err=10; export err;${errchk} - exit $err - fi + "${USHgfs}/run_mpmd.sh" "${DATA}/cmdtarfile" + export err=$?; err_chk # --------------------------------------------------------------------------- # # 4. Ending output @@ -696,4 +420,4 @@ exit "${exit_code}" -# End of MWW3 point prostprocessor script ---------------------------------------- # +# End of WW3 point prostprocessor script ---------------------------------------- # diff --git a/scripts/exgfs_wave_prdgen_bulls.sh b/scripts/exgfs_wave_prdgen_bulls.sh index 8509a87e9b6..1d8949cbc40 100755 --- a/scripts/exgfs_wave_prdgen_bulls.sh +++ b/scripts/exgfs_wave_prdgen_bulls.sh @@ -25,7 +25,7 @@ # 0.a Basic modes of operation # PATH for working and home directories - export RUNwave=${RUNwave:-${RUN}wave} + export RUNwave=${RUNwave:-${RUN}.wave} export envir=${envir:-ops} export cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} @@ -58,7 +58,7 @@ set_trace # 1.a Link the input file and untar it - BullIn="${COMIN_WAVE_STATION}/${RUNwave}.${cycle}.cbull_tar" + BullIn="${COMIN_WAVE_STATION}/${RUNwave}.${cycle}.cbull.tar" if [ -f $BullIn ]; then cp $BullIn cbull.tar else @@ -69,9 +69,9 @@ echo '*** ERROR : NO BULLETIN TAR FILE *** ' echo '************************************ ' echo ' ' - echo $msg set_trace msg="FATAL ERROR ${RUNwave} prdgen $date $cycle : bulletin tar missing." + echo $msg echo $msg >> $wavelog export err=1; ${errchk} exit $err @@ -96,7 +96,6 @@ echo '*** ERROR : ERROR IN BULLETIN TAR FILE *** ' echo '****************************************** ' echo ' ' - echo $msg set_trace echo "${RUNwave} prdgen $date $cycle : bulletin untar error." >> $wavelog err=2;export err;err_chk diff --git a/scripts/exgfs_wave_prdgen_gridded.sh b/scripts/exgfs_wave_prdgen_gridded.sh index 4ce9691ce4d..f153c76ddc8 100755 --- a/scripts/exgfs_wave_prdgen_gridded.sh +++ b/scripts/exgfs_wave_prdgen_gridded.sh @@ -28,7 +28,7 @@ source "${USHgfs}/wave_domain_grid.sh" # 0.a Basic modes of operation - export RUNwave=${RUNwave:-${RUN}wave} + export RUNwave=${RUNwave:-${RUN}.wave} export envir=${envir:-ops} export fstart=${fstart:-0} export FHMAX_WAV=${FHMAX_WAV_WMO:-180} #180 Total of hours to process @@ -95,7 +95,7 @@ grids=${GEMPAK_GRIDS:-ak_10m at_10m ep_10m wc_10m glo_30m} while [[ "${fhcnt}" -le "${FHMAX_WAV}" ]]; do fhr=$(printf "%03d" "${fhcnt}") for grdOut in ${grids}; do - process_grdID "${grdout}" + process_grdID "${grdOut}" grdIDin=${grdNAME} com_varname="${COMIN_WAVE_GRID}_${GRDREGION}_${GRDRES}" com_dir="${!com_varname}" diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index ab269adec51..3365ebfbe10 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -6,7 +6,6 @@ # Script name: exwave_prep.sh # Script description: Creates output products from binary WW3 data # -# Author: Hendrik Tolman Org: NCEP/EMC Date: 2007-03-01 # Abstract: This is the preprocessor for the wave component in GFS. # It executes several scripts for preparing and creating input data # as follows: @@ -28,17 +27,6 @@ # # # - Origination: 01-Mar-2007 # # # -# Update log # -# Mar2007 HTolman - Added NCO note on resources on mist/dew # -# Apr2007 HTolman - Renaming mod_def files in ${FIXgfs}/wave. # -# Mar2011 AChawla - Migrating to a vertical structure # -# Nov2012 JHAlves - Transitioning to WCOSS # -# Apr2019 JHAlves - Transitioning to GEFS workflow # -# Nov2019 JHAlves - Merging wave scripts to global workflow # -# Jun2020 JHAlves - Porting to R&D machine Hera # -# Oct2020 JMeixner - Updating RTOFS dates for processing minimal amount # -# May2022 JMeixner - Clean up and moving input to other routine # -# # # WAV_MOD_ID and WAV_MOD_TAG replace modID. WAV_MOD_TAG # # is used for ensemble-specific I/O. For deterministic # # WAV_MOD_ID=WAV_MOD_TAG # diff --git a/sorc/ufs_model.fd b/sorc/ufs_model.fd index ee3d52d3620..6ece76a2e25 160000 --- a/sorc/ufs_model.fd +++ b/sorc/ufs_model.fd @@ -1 +1 @@ -Subproject commit ee3d52d3620565dbf7bc4f47bd039fe6423fa5c1 +Subproject commit 6ece76a2e25147c7bbdf289e9d4b641576b64537 diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 000b6729397..4244d5d69c9 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -455,7 +455,7 @@ WW3_postdet() { while (( fhr <= FHMAX_WAV )); do fhr3=$(printf '%03d' "${fhr}") vdate=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} + ${fhr} hours" +%Y%m%d.%H0000) - ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.points.f${fhr3}.bin" "${DATA}/${vdate}.out_pnt.ww3" + ${NLN} "${COMOUT_WAVE_HISTORY}/${wavprfx}.points.f${fhr3}.nc" "${DATA}/${vdate}.out_pnt.ww3.nc" fhr=$((fhr + fhinc)) done diff --git a/ush/parsing_namelists_WW3.sh b/ush/parsing_namelists_WW3.sh index 7428c00651c..2d06447e795 100755 --- a/ush/parsing_namelists_WW3.sh +++ b/ush/parsing_namelists_WW3.sh @@ -51,6 +51,11 @@ WW3_namelists(){ export WW3_OUTPARS="${OUTPARS_WAV}" export WW3_DTFLD="${DTFLD_WAV}" export WW3_DTPNT="${DTPNT_WAV}" + + export WW3_GRD_OUTDIR='./' + export WW3_PNT_OUTDIR='./' + export WW3_RST_OUTDIR='./' + # Ensure the template exists local template=${WW3_INPUT_TEMPLATE:-"${PARMgfs}/ufs/ww3_shel.nml.IN"} if [[ ! -f "${template}" ]]; then diff --git a/ush/wave_tar.sh b/ush/wave_tar.sh index dc407d0f63a..885e1f69b00 100755 --- a/ush/wave_tar.sh +++ b/ush/wave_tar.sh @@ -86,8 +86,6 @@ exit 2 fi - cd "${STA_DIR}/${filext}" - # --------------------------------------------------------------------------- # # 2. Generate tar file (spectral files are compressed) @@ -103,12 +101,12 @@ 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}.${type}.tar" ./${ID}.*.${filext} + tar -cf "${ID}.${type}.tar" ./*."${filext}" exit=$? filename="${ID}.${type}.tar" if ! wait_for_file "${filename}" "${sleep_interval}" "${countMAX}" ; then diff --git a/versions/ic.ver b/versions/ic.ver index 1994910c92c..a632623d06c 100644 --- a/versions/ic.ver +++ b/versions/ic.ver @@ -4,19 +4,19 @@ #shellcheck disable=SC2034 declare -A ic_versions -ic_versions['C48']=20241120 -ic_versions['C48mx500']=20241120 -ic_versions['C48C48mx500']=20241120 +ic_versions['C48']=20250327 +ic_versions['C48mx500']=20250327 +ic_versions['C48C48mx500']=20250327 -ic_versions['C96']=20241120 -ic_versions['C96C48']=20241120 -ic_versions['C96mx100']=20240610 +ic_versions['C96']=20250327 +ic_versions['C96C48']=20250327 +ic_versions['C96mx100']=20250327 ic_versions['C384C192']=20240610 ic_versions['C384mx025']=20241120 -ic_versions['C768']=20241120 -ic_versions['C768mx025']=20250115 +ic_versions['C768']=20250327 +ic_versions['C768mx025']=20250327 -ic_versions['C1152']=20241120 -ic_versions['C1152mx025']=20250115 +ic_versions['C1152']=20250327 +ic_versions['C1152mx025']=20250327