-
Notifications
You must be signed in to change notification settings - Fork 6
/
get_realtime.sh
executable file
·35 lines (27 loc) · 1.03 KB
/
get_realtime.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# program: get_realtime.sh
# This script acquires daily USBR data from USBR webservice
FN=usbr
FNAME=usbr_realtime.shf
FN_SOURCE="./"
SHEFPATH=$FN_SOURCE/$FNAME
LOOKBACK=7
###################################################
# Acquire daily data from USBR Webservice
###################################################
cd $FN_SOURCE
#run get_usbr utilitiy to acquire SHEF from
#USBR webservice and filter data we have already seen
#NOTE: Adjust look back to get more data
$FN_SOURCE/get_usbr_webdata realtime $LOOKBACK stations.realtime.list > $SHEFPATH.unfiltered
###################################################
# Perform Feed Specific Operations (filtering, etc.)
###################################################
#Filter out SHEF messages we have seen before
$FN_SOURCE/filterA 100000 $SHEFPATH.unfiltered > $SHEFPATH
###################################################
# Clean up and back up raw data
###################################################
#cat $SHEFPATH >> $FN_SOURCE/raw/usbr_daily_${STAMP}.shf
#rm $SHEFPATH