source: TOOLS/ConsoGENCMIP6/launch_conso.sh @ 2517

Last change on this file since 2517 was 2460, checked in by labetoulle, 9 years ago
  • Use an INI config file
  • reaname "gencmip6" variables
  • Property svn:executable set to *
File size: 1.7 KB
RevLine 
[2422]1#!/bin/bash
2#
[2423]3# Cron to keep track of the consumption and data volume
4# for GENCMIP6 project.
5# To be executed every day at 6am
[2422]6# ======================================================================
7
[2423]8# Initialize module command
9# =========================
[2422]10if [ -f /etc/bashrc ] ; then
[2429]11  . /etc/bashrc
[2422]12fi
[2460]13
[2423]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)
[2422]18module load python/2.7.8
19
[2423]20# Go to root directory
21# ====================
[2460]22ROOT_DIR=$( dirname $0 )
23cd ${ROOT_DIR}
[2422]24
[2423]25# Main script to get data
26# =======================
[2427]27script="conso_gencmip6"
28printf "${script}\n"
29echo "--------------------"
[2437]30bin/${script}.py -v
[2427]31rc=$?
32if [ ${rc} -ne 0 ] ; then
33  echo "${script} terminated abnormally"
34  exit
35else
36  echo "${script} OK"
37fi
[2422]38
[2423]39# Plot daily consumption
40# ======================
41# -f : plot the whole period of the project
42# -d : copy plot on dods
[2460]43# -v : verbose mode
[2427]44script="plot_bilan"
45printf "\n${script}\n"
46echo "--------------------"
[2437]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 "--------------------"
[2460]58bin/${script}.py -fv
[2427]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 "--------------------"
[2437]69bin/${script}.py -v
[2427]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 "--------------------"
[2437]80bin/${script}.py -v
[2427]81rc=$?
82if [ ${rc} -ne 0 ] ; then
83  echo "${script} terminated abnormally"
84else
85  echo "${script} OK"
86fi
87
88printf "\nEnd of script OK\n"
[2433]89
Note: See TracBrowser for help on using the repository browser.