Skip to content
Snippets Groups Projects
Verified Commit e84fcbbf authored by David Hoese's avatar David Hoese
Browse files

Fix level b1 python used

parent 8092a940
No related branches found
No related tags found
No related merge requests found
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
# Moves ceilometer data in raw (inst-data) and cache # Moves ceilometer data in raw (inst-data) and cache
SCRIPT_HOME="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_HOME="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Assumes this script is in /opt/*/aoss_ceilo*/repos/git/AossCeilo/scripts/
ENV="$(realpath $(realpath ${SCRIPT_HOME})/../../../../)"
source $ENV/scripts/metobs_config.sh source $SCRIPT_HOME/metobs_config.sh
LOCK=${LOCKDIR}/$(basename $0).lock LOCK=${LOCKDIR}/$(basename $0).lock
( (
... ...
......
*/1 * * * * /opt/metobs/aoss_ceilo/scripts/rsync_data.sh &> /dev/null */1 * * * * /opt/metobs/aoss_ceilo/scripts/rsync_data.sh &> /dev/null
*/5 * * * * /opt/metobs/aoss_ceilo/scripts/start_ceilo_ingest.sh &> /dev/null */5 * * * * /opt/metobs/aoss_ceilo/scripts/start_ceilo_ingest.sh &> /dev/null
*/10 * * * * /opt/metobs/aoss_ceilo/scripts/run_ceilo_level_b1.sh &> /dev/null
...@@ -24,7 +24,7 @@ fi ...@@ -24,7 +24,7 @@ fi
flock -x -n 200 || log_info "Script is already running, will not run again." flock -x -n 200 || log_info "Script is already running, will not run again."
if [ ! -d $CEILO_CACHE_DIR ]; then if [ ! -d $CEILO_CACHE_DIR ]; then
oops "Tower cache directory doesn't exist: $CEILO_CACHE_DIR" oops "Ceilometer cache directory doesn't exist: $CEILO_CACHE_DIR"
fi fi
log_info "$(date +%Y-%m-%dT%H:%M:%S): Running level b1 jobs for ${DATE}" >> $logfile log_info "$(date +%Y-%m-%dT%H:%M:%S): Running level b1 jobs for ${DATE}" >> $logfile
...@@ -51,27 +51,27 @@ fi ...@@ -51,27 +51,27 @@ fi
p_tmp_out="$tmp_dir/$p_out_bn" p_tmp_out="$tmp_dir/$p_out_bn"
log_info "Generating NetCDF files..." log_info "Generating NetCDF files..."
python -m aossceilo.level_b1.nc $curr_file $p_file $p_file2 -o $tmp_out $p_tmp_out >> $logfile ${ENV}/bin/python -m aossceilo.level_b1.nc $curr_file $p_file $p_file2 -o $tmp_out $p_tmp_out >> $logfile
nc_status=$? nc_status=$?
if [ $nc_status -ne 0 ]; then if [ $nc_status -ne 0 ]; then
oops "NetCDF generation failed for $DATE" oops "NetCDF generation failed for $DATE"
fi fi
log_info "Moving NetCDF file from temp directory to cache" log_info "Moving NetCDF file from temp directory to cache"
python -m metobscommon.archive.incoming -vv -l $logfile b1 aoss.ceilo $tmp_dir/aoss_ceilo.%Y-%m-%d.nc --dates ${DATE} ${PDATE} || oops "NetCDF archive failed" ${ENV}/bin/python -m metobscommon.archive.incoming -vv -l $logfile b1 aoss.ceilo $tmp_dir/aoss_ceilo.%Y-%m-%d.nc --dates ${DATE} ${PDATE} || oops "NetCDF archive failed"
### Quicklook Generation ### ### Quicklook Generation ###
# assumes that out_file is what the archive script wrote the file as # assumes that out_file is what the archive script wrote the file as
log_info "Generating Quicklook images..." log_info "Generating Quicklook images..."
python -m aossceilo.level_b1.quicklook --daily $curr_out_file $p_out_file -o $tmp_dir >> $logfile ${ENV}/bin/python -m aossceilo.level_b1.quicklook --daily $curr_out_file $p_out_file -o $tmp_dir >> $logfile
quicklook_status=$? quicklook_status=$?
if [ $quicklook_status -ne 0 ]; then if [ $quicklook_status -ne 0 ]; then
oops "Quicklook generation failed for $DATE" oops "Quicklook generation failed for $DATE"
fi fi
log_info "Moving Level B1 quicklooks from temp directory to cache" log_info "Moving Level B1 quicklooks from temp directory to cache"
python -m metobscommon.archive.incoming -vv -l $logfile b1 aoss.ceilo $tmp_dir/aoss_ceilo.%Y-%m-%d*.png --dates ${DATE} ${PDATE} || oops "Quicklook archive failed" ${ENV}/bin/python -m metobscommon.archive.incoming -vv -l $logfile b1 aoss.ceilo $tmp_dir/aoss_ceilo.%Y-%m-%d*.png --dates ${DATE} ${PDATE} || oops "Quicklook archive failed"
#Delete the working directory #Delete the working directory
rm -rf $tmp_dir || oops "Could not delete working directory: $tmp_dir" rm -rf $tmp_dir || oops "Could not delete working directory: $tmp_dir"
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment