From e1a083a7210a668751121065f3b85931f10c730e Mon Sep 17 00:00:00 2001
From: davidh-ssec <david.hoese@ssec.wisc.edu>
Date: Thu, 4 Jan 2018 11:57:22 -0600
Subject: [PATCH] Change raw tower ascii files from rig_tower to aoss_tower

---
 scripts/archive_tower.sh    |  4 ++--
 scripts/loggernet_rotate.sh |  5 ++---
 scripts/metobs_config.sh    | 11 ++++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/scripts/archive_tower.sh b/scripts/archive_tower.sh
index 0dae664..d14f386 100755
--- a/scripts/archive_tower.sh
+++ b/scripts/archive_tower.sh
@@ -29,7 +29,7 @@ fi
     fi
 
     log_info "$(date +%Y-%m-%dT%H:%M:%S): Running archive jobs for ${DATE}"
-    $ENV/bin/python -m metobscommon.archive.incoming -vv -l $logfile --dates=${DATE} 00 aoss.tower "rig_tower.%Y-%m-%d.ascii"
+    $ENV/bin/python -m metobscommon.archive.incoming -vv -l $logfile --dates=${DATE} 00 aoss.tower "aoss_tower.%Y-%m-%d.ascii"
 
     # Hack to keep the old 'ascii' directory up to date
     # FIXME: Remove this once all new generation scripts work
@@ -39,7 +39,7 @@ fi
     link_fn="$TOWER_CACHE_DIR/ascii/${year}/${month}/rig_tower.${year}-${month}-${day}.ascii"
     if [ ! -e $link_fn ]; then
         mkdir -p $TOWER_CACHE_DIR/ascii/${year}/${month}/
-        ln -s "$TOWER_PRAW_DIR/${year}/${month}/${day}/rig_tower.${year}-${month}-${day}.ascii" ${link_fn}
+        ln -s "$TOWER_PRAW_DIR/${year}/${month}/${day}/aoss_tower.${year}-${month}-${day}.ascii" ${link_fn}
     fi
 
     log_info "Done"
diff --git a/scripts/loggernet_rotate.sh b/scripts/loggernet_rotate.sh
index 0217b5c..2498caf 100755
--- a/scripts/loggernet_rotate.sh
+++ b/scripts/loggernet_rotate.sh
@@ -9,12 +9,11 @@ LOGGERNET_DATA=/data1/incoming/aoss/tower/
 #LOGGERNET_DATA=/tmp
 HEADER_SIZE=0
 INPUT_PREFIX="rig_tower"
-OUTPUT_PREFIX="rig_tower"
+OUTPUT_PREFIX="aoss_tower"
 #FILE_SUFFIXES="engdata metdata gpsdata"
 FILE_SUFFIXES="_"
-INPUT_EXT="dat"
+INPUT_EXT="ascii"
 OUTPUT_EXT="ascii"
-DAYS=6
 
 assert_python() {
     python -c "import sys; sys.exit(sys.version_info[0] >= 3)"
diff --git a/scripts/metobs_config.sh b/scripts/metobs_config.sh
index c1e2dd7..c612e1a 100644
--- a/scripts/metobs_config.sh
+++ b/scripts/metobs_config.sh
@@ -2,17 +2,18 @@
 # These values should override values used in python or bash scripts
 #
 # where the tower ascii files get pushed to
-export TOWER_INCOMING_DIR=/mnt/inst-data/incoming/aoss/tower
+DATA_ROOT=/data1
+export TOWER_INCOMING_DIR="${DATA_ROOT}/incoming/aoss/tower"
 # The archived location (primary raw)
-export TOWER_PRAW_DIR=/mnt/inst-data/raw/aoss/tower
+export TOWER_PRAW_DIR="${DATA_ROOT}/raw/aoss/tower"
 # Where generated products go
-export TOWER_CACHE_DIR=/mnt/inst-data/cache/aoss/tower
+export TOWER_CACHE_DIR="${DATA_ROOT}/cache/aoss/tower"
 # Python environment to use and where scripts are location
-export ENV=/data1/software/aoss-tower3
+export ENV=/opt/metobs/aoss_tower
 # Directory where logs will be stored
 export LOGDIR=$ENV/logs
 # Directory where work files can be placed (inside a separate temp directory)
-export WORKDIR=/mnt/inst-data/tmp
+export WORKDIR="${DATA_ROOT}/tmp"
 
 log_info() {
     echo "INFO: $*" &>> $logfile
-- 
GitLab