Skip to content

Commit

Permalink
Bring last minute NCO changes:bad bracket,do "grep --text"
Browse files Browse the repository at this point in the history
  • Loading branch information
ilianagenkova committed May 31, 2024
1 parent 3bfc153 commit f1e6c71
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 36 deletions.
15 changes: 9 additions & 6 deletions scripts/excdas_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,20 +327,23 @@ err10=0
TANK_MAX_255003=${TANK_MAX_255003:-3221225472} #3Gb
TANK_MAX_255004=${TANK_MAX_255004:-1610612736} #1.5Gb
TANK_MAX_255030=${TANK_MAX_255030:-4187593114} #3.9Gb
if [ -s ${TANK}/${PDY}/b255/xx003 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
if [ -s ${TANK}/${PDY}/b255/xx003 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
export SKIP_255003=YES
msg="WARNING: TANK b255/xx003 exceeds TANK_MAX_255003 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx004 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
if [ -s ${TANK}/${PDY}/b255/xx004 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
export SKIP_255004=YES
msg="WARNING: TANK b255/xx004 exceeds TANK_MAX_255004 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx030 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
if [ -s ${TANK}/${PDY}/b255/xx030 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
export SKIP_255030=YES
msg="WARNING: TANK b255/xx030 exceeds TANK_MAX_255030 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
#end of block

Expand Down
15 changes: 9 additions & 6 deletions scripts/exdump_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,23 @@ err10=0
TANK_MAX_255003=${TANK_MAX_255003:-3221225472} #3Gb
TANK_MAX_255004=${TANK_MAX_255004:-1610612736} #1.5Gb
TANK_MAX_255030=${TANK_MAX_255030:-4187593114} #3.9Gb
if [ -s ${TANK}/${PDY}/b255/xx003 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
if [ -s ${TANK}/${PDY}/b255/xx003 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
export SKIP_255003=YES
msg="WARNING: TANK b255/xx003 exceeds TANK_MAX_255003 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx004 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
if [ -s ${TANK}/${PDY}/b255/xx004 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
export SKIP_255004=YES
msg="WARNING: TANK b255/xx004 exceeds TANK_MAX_255004 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx030 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
if [ -s ${TANK}/${PDY}/b255/xx030 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
export SKIP_255030=YES
msg="WARNING: TANK b255/xx030 exceeds TANK_MAX_255030 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
#end of block

Expand Down
15 changes: 9 additions & 6 deletions scripts/exrap_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,23 @@ err12=0
TANK_MAX_255003=${TANK_MAX_255003:-3221225472} #3Gb
TANK_MAX_255004=${TANK_MAX_255004:-1610612736} #1.5Gb
TANK_MAX_255030=${TANK_MAX_255030:-4187593114} #3.9Gb
if [ -s ${TANK}/${PDY}/b255/xx003 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
if [ -s ${TANK}/${PDY}/b255/xx003 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
export SKIP_255003=YES
msg="WARNING: TANK b255/xx003 exceeds TANK_MAX_255003 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx004 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
if [ -s ${TANK}/${PDY}/b255/xx004 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
export SKIP_255004=YES
msg="WARNING: TANK b255/xx004 exceeds TANK_MAX_255004 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
# echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx030 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
if [ -s ${TANK}/${PDY}/b255/xx030 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
export SKIP_255030=YES
msg="WARNING: TANK b255/xx030 exceeds TANK_MAX_255030 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
#end of block

Expand Down
15 changes: 9 additions & 6 deletions scripts/exrtma_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,23 @@ err5=0
TANK_MAX_255003=${TANK_MAX_255003:-3221225472} #3Gb
TANK_MAX_255004=${TANK_MAX_255004:-1610612736} #1.5Gb
TANK_MAX_255030=${TANK_MAX_255030:-4187593114} #3.9Gb
if [ -s ${TANK}/${PDY}/b255/xx003 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
if [ -s ${TANK}/${PDY}/b255/xx003 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
export SKIP_255003=YES
msg="WARNING: TANK b255/xx003 exceeds TANK_MAX_255003 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx004 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
if [ -s ${TANK}/${PDY}/b255/xx004 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
export SKIP_255004=YES
msg="WARNING: TANK b255/xx004 exceeds TANK_MAX_255004 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx030 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
if [ -s ${TANK}/${PDY}/b255/xx030 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
export SKIP_255030=YES
msg="WARNING: TANK b255/xx030 exceeds TANK_MAX_255030 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
#end of block

Expand Down
15 changes: 9 additions & 6 deletions scripts/exurma_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,23 @@ err6=0
TANK_MAX_255003=${TANK_MAX_255003:-3221225472} #3Gb
TANK_MAX_255004=${TANK_MAX_255004:-1610612736} #1.5Gb
TANK_MAX_255030=${TANK_MAX_255030:-4187593114} #3.9Gb
if [ -s ${TANK}/${PDY}/b255/xx003 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
if [ -s ${TANK}/${PDY}/b255/xx003 ]&& [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx003)" -gt "$TANK_MAX_255003" ]; then
export SKIP_255003=YES
msg="WARNING: TANK b255/xx003 exceeds TANK_MAX_255003 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx004 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
if [ -s ${TANK}/${PDY}/b255/xx004 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx004)" -gt "$TANK_MAX_255004" ]; then
export SKIP_255004=YES
msg="WARNING: TANK b255/xx004 exceeds TANK_MAX_255004 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
if [ -s ${TANK}/${PDY}/b255/xx030 && "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
if [ -s ${TANK}/${PDY}/b255/xx030 ] && [ "$(stat -c '%s' ${TANK}/${PDY}/b255/xx030)" -gt "$TANK_MAX_255030" ]; then
export SKIP_255030=YES
msg="WARNING: TANK b255/xx030 exceeds TANK_MAX_255030 => not dumped"
echo $msg | mail.py -s $msg -c [email protected]
echo $msg | mail.py -s "$msg"
#echo $msg | mail.py -s "$msg" -c [email protected]
fi
#end of block

Expand Down
4 changes: 2 additions & 2 deletions ush/bufr_avgdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ for cycle_avg in $cycles; do
> accum.obs.counts.${cycle_avg}
for dtg in "${arr30d[@]}"; do
set +x
grep -h -e " REPORTS" -e "^EOF @@@" \
grep --text -h -e " REPORTS" -e "^EOF @@@" \
$OBCNTarch/${net}.${dtg}/*${cycle_avg}.status.*bufr_d | \
grep -e " in data group " -e "^EOF @@@" | grep -e " HAS" -e "^EOF @@@" | \
grep -v -e "Domain" >> delete
Expand All @@ -354,7 +354,7 @@ for cycle_avg in $cycles; do
done
done

grep -e "^_" -e "^:" $DUMPLIST | grep -Fe "#>" > dumplist
grep --text -e "^_" -e "^:" $DUMPLIST | grep -Fe "#>" > dumplist


# Generate a new average file
Expand Down
8 changes: 4 additions & 4 deletions ush/bufr_datacount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ echo $RETC > $COMOUT/${RUN}.${cycle}.dump_alert_flag.$tmmark
# and 12-month ago 30-day avg files
# ------------------------------------------------------------------------

grep -e "^_" -e "^:" $LIST_CNT | grep -Fe "#>" > dumplist
grep --text -e "^_" -e "^:" $LIST_CNT | grep -Fe "#>" > dumplist

if [ -s $COMIN/${RUN}.${cycle}.status.tm00.bufr_d ]; then
status_bufr_d=$COMIN/${RUN}.${cycle}.status.tm00.bufr_d
Expand All @@ -114,7 +114,7 @@ elif [ -s $COMOUT/${RUN}.${cycle}.status.tm00.bufr_d ]; then
else
status_bufr_d=/dev/null
fi
grep -Fe " REPORTS" $status_bufr_d | grep -Fe " in data group " | \
grep --text -Fe " REPORTS" $status_bufr_d | grep -Fe " in data group " | \
grep -Fe " HAS" | grep -v -Fe "Domain" > delete
awk -F" HAS" '{print$2}' delete | awk -F" REPORTS" '{print$1}' | \
sed "s/[^0-9]/ /g" > delete.r
Expand All @@ -126,7 +126,7 @@ rm delete delete.l delete.r

> obcount_30davg.${NET}.current
if [ -s $AVGDarch_IN/obcount_30davg.${NET}.current ]; then
grep "^# " $AVGDarch_IN/obcount_30davg.${NET}.current | \
grep --text "^# " $AVGDarch_IN/obcount_30davg.${NET}.current | \
sed "s/# ......./ /g" | sed "s/[^0-9]/ /g" \
> obcount_30davg.${NET}.current
fi
Expand All @@ -146,7 +146,7 @@ for months_ago in 3 6 9 12; do

> obcount_30davg.${NET}.${months_ago}months_ago
if [ -s $AVGDarch_IN/obcount_30davg.${NET}.${arch_year}${arch_month} ]; then
grep "^# " $AVGDarch_IN/obcount_30davg.${NET}.${arch_year}${arch_month} | \
grep --text "^# " $AVGDarch_IN/obcount_30davg.${NET}.${arch_year}${arch_month} | \
sed "s/# ......./ /g" | sed "s/[^0-9]/ /g" \
> obcount_30davg.${NET}.${months_ago}months_ago
fi
Expand Down

0 comments on commit f1e6c71

Please sign in to comment.