Skip to content

Commit

Permalink
Updates to match NCO configuration on WCOSS2
Browse files Browse the repository at this point in the history
  • Loading branch information
awest-noaa committed Apr 26, 2022
1 parent 84ae9d3 commit eba7180
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ush/rtofs/bin/make_rtofs_sector.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -xa
# -----------------------------------------------------------
# UNIX Shell Script
# Tested Operating System(s): RHEL 5, 6
Expand Down Expand Up @@ -286,7 +287,10 @@ do
continue
fi

epoc_time=`${WGRIB2} -unix_time ${SPOOLdir}/rtofs_glo.t${CYCLE}z.n024_${RTOFSSECTOR}_std.grb2 | grep "1:0:unix" | awk -F= '{ print $3 }'`
epoc_time=""
while [ "${epoc_time}" == "" ] || [ "${epoc_time}" == "-1" ]; do
epoc_time=$(${WGRIB2} -d 1 -unix_time ${SPOOLdir}/rtofs_glo.t${CYCLE}z.n024_${RTOFSSECTOR}_std.grb2 | grep "1:0" | grep "unix" | awk -F= '{ print $3 }')
done
epoc_time=$(echo "$epoc_time - 3600" | bc)
date_str=`echo ${epoc_time} | awk '{ print strftime("%Y%m%d", $1) }'`
if [ -e ${OUTPUTdir}/wave_rtofs_uv_${epoc_time}_${date_str}_${CYCLE}_f000.dat ] &&
Expand Down

0 comments on commit eba7180

Please sign in to comment.