source: TOOLS/ConsoGENCMIP6/launch_conso.sh @ 2460

Last change on this file since 2460 was 2460, checked in by labetoulle, 7 years ago
  • Use an INI config file
  • reaname "gencmip6" variables
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3# Cron to keep track of the consumption and data volume
4# for GENCMIP6 project.
5# To be executed every day at 6am
6# ======================================================================
7
8# Initialize module command
9# =========================
10if [ -f /etc/bashrc ] ; then
11  . /etc/bashrc
12fi
13
14# Load python
15# ===========
16# python/2.7.3 is the default, but it comes with matplotlib 1.2,
17# which is too old (no context manager for PdfPages)
18module load python/2.7.8
19
20# Go to root directory
21# ====================
22ROOT_DIR=$( dirname $0 )
23cd ${ROOT_DIR}
24
25# Main script to get data
26# =======================
27script="conso_gencmip6"
28printf "${script}\n"
29echo "--------------------"
30bin/${script}.py -v
31rc=$?
32if [ ${rc} -ne 0 ] ; then
33  echo "${script} terminated abnormally"
34  exit
35else
36  echo "${script} OK"
37fi
38
39# Plot daily consumption
40# ======================
41# -f : plot the whole period of the project
42# -d : copy plot on dods
43# -v : verbose mode
44script="plot_bilan"
45printf "\n${script}\n"
46echo "--------------------"
47bin/${script}.py -fv
48rc=$?
49if [ ${rc} -ne 0 ] ; then
50  echo "${script} terminated abnormally"
51else
52  echo "${script} OK"
53fi
54
55script="plot_bilan_jobs"
56printf "\n${script}\n"
57echo "--------------------"
58bin/${script}.py -fv
59rc=$?
60if [ ${rc} -ne 0 ] ; then
61  echo "${script} terminated abnormally"
62else
63  echo "${script} OK"
64fi
65
66script="plot_login"
67printf "\n${script}\n"
68echo "--------------------"
69bin/${script}.py -v
70rc=$?
71if [ ${rc} -ne 0 ] ; then
72  echo "${script} terminated abnormally"
73else
74  echo "${script} OK"
75fi
76
77script="plot_store"
78printf "\n${script}\n"
79echo "--------------------"
80bin/${script}.py -v
81rc=$?
82if [ ${rc} -ne 0 ] ; then
83  echo "${script} terminated abnormally"
84else
85  echo "${script} OK"
86fi
87
88printf "\nEnd of script OK\n"
89
Note: See TracBrowser for help on using the repository browser.