Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPSL
SIRTA
CL31
CL raw to 1a
Commits
9d3cdbb1
Commit
9d3cdbb1
authored
Mar 03, 2017
by
Marc-Antoine Drouin
Browse files
Merge branch 'hotfix/v1.0.4'
parents
192229f3
be7a2691
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
17 deletions
+33
-17
run_raw2l1_sirta30s.sh
run_raw2l1_sirta30s.sh
+14
-7
run_raw2l1_sirta3s.sh
run_raw2l1_sirta3s.sh
+19
-10
No files found.
run_raw2l1_sirta30s.sh
View file @
9d3cdbb1
...
...
@@ -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
\r
m
$tmpfile
exit
1
fi
\r
m
$tmpfile
...
...
run_raw2l1_sirta3s.sh
View file @
9d3cdbb1
...
...
@@ -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
-l
t
H2_ON_DATE
]]
if
[[
$DATE_AS_SECONDS
-l
e
$
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
\r
m
$tmpfile
exit
1
fi
\r
m
$tmpfile
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment