Skip to content
Snippets Groups Projects
Commit 9d3cdbb1 authored by Marc-Antoine Drouin's avatar Marc-Antoine Drouin
Browse files

Merge branch 'hotfix/v1.0.4'

parents 192229f3 be7a2691
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@
# : v1.0.1 correct problem with path of configuration file
# : v1.0.2 correct source for LISA configuration file
# 20170303 : v1.0.3 add material to process 3s SIRTA CL31 data
# : v1.0.4 correct several bugs in 3s script and make 30s script more robust
#
# SIRTA 2013
#==============================================================================
......@@ -213,15 +214,21 @@ cmd="$PYTHON $RAW2L1 '$date' $RAW2L1_CONF ${fich_entree[@]} $tmpfile -log $RAW2L
eval $cmd
# suppression des donnees qui ne correspondent pas au jour
#-----------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
if [[ $? == 0 ]]
then
# suppression des donnees qui ne correspondent pas au jour
#-------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
else
\rm $tmpfile
exit 1
fi
\rm $tmpfile
......
......@@ -32,6 +32,7 @@
# : v1.0.1 correct problem with path of configuration file
# : v1.0.2 correct source for LISA configuration file
# 20170303 : v1.0.3 add material to process 3s SIRTA CL31 data
# : v1.0.4 correct several bugs in 3s script and make 30s script more robust
#
# SIRTA 2013
#==============================================================================
......@@ -103,7 +104,7 @@ VERSION=1
REP_SOURCES=$(dirname $(readlink -f $0))
# date à partir de laquelle le h2 passe a on
H2_ON_DATE = $(date -u -d 20150520 +%s)
H2_ON_DATE=$(date -u -d 20150520 +%s)
n=0
......@@ -130,7 +131,7 @@ do
esac
done
DATE_AS_SECONDS = $(date -u -d $date +%s)
DATE_AS_SECONDS=$(date -u -d $date +%s)
# RAW2L1 needed path
PYTHON="/opt/python_envs/python2/bin/python"
......@@ -192,9 +193,10 @@ fi
#------------------------------------------------------------------------------
n=0
if [[ $DATE_AS_SECONDS -lt H2_ON_DATE ]]
if [[ $DATE_AS_SECONDS -le $H2_ON_DATE ]]
then
# fichier avec h2 off
consignerMsg "configuration h2 off"
while read l
do
fich_entree[n]=$l
......@@ -204,6 +206,7 @@ then
RAW2L1_CONF=${REP_SOURCES}"/conf_vaisala_cl31_sirta3s-h2off.ini"
else
# fichier avec h2 on
consignerMsg "configuration h2 on"
while read l
do
fich_entree[n]=$l
......@@ -233,15 +236,21 @@ cmd="$PYTHON $RAW2L1 '$date' $RAW2L1_CONF ${fich_entree[@]} $tmpfile -log $RAW2L
eval $cmd
# suppression des donnees qui ne correspondent pas au jour
#-----------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
if [[ $? == 0 ]]
then
# suppression des donnees qui ne correspondent pas au jour
#-------------------------------------------------------------------------
date_as_days=$(($(date -u -d "$date" +%s)/86400))
date_p1=$(($date_as_days + 1))
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
cmd="$NCKS -h -O -d time,${date_as_days}.0,${date_p1}.0 $tmpfile $fich_sortie"
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
consignerMsg "suppression des données n'appartenant au jour traite"
eval $cmd
else
\rm $tmpfile
exit 1
fi
\rm $tmpfile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment