source: TOOLS/ConsoGENCMIP6/launch_conso.sh @ 2427

Last change on this file since 2427 was 2427, checked in by labetoulle, 9 years ago

Move common functions to common module

File size: 1.5 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# Load python
14# ===========
15# python/2.7.3 is the default, but it comes with matplotlib 1.2,
16# which is too old (no context manager for PdfPages)
17module load python/2.7.8
18
19# Go to root directory
20# ====================
21cd /ccc/cont003/home/dsm/p86ipsl/ConsoGENCMIP6/
22
23# Main script to get data
24# =======================
25script="conso_gencmip6"
26printf "${script}\n"
27echo "--------------------"
28bin/${script}.py
29rc=$?
30if [ ${rc} -ne 0 ] ; then
31  echo "${script} terminated abnormally"
32  exit
33else
34  echo "${script} OK"
35fi
36
37# Plot daily consumption
38# ======================
39# -f : plot the whole period of the project
40# -d : copy plot on dods
41script="plot_bilan"
42printf "\n${script}\n"
43echo "--------------------"
44bin/${script}.py -fd
45rc=$?
46if [ ${rc} -ne 0 ] ; then
47  echo "${script} terminated abnormally"
48else
49  echo "${script} OK"
50fi
51
52script="plot_login"
53printf "\n${script}\n"
54echo "--------------------"
55bin/${script}.py -d
56rc=$?
57if [ ${rc} -ne 0 ] ; then
58  echo "${script} terminated abnormally"
59else
60  echo "${script} OK"
61fi
62
63script="plot_store"
64printf "\n${script}\n"
65echo "--------------------"
66bin/${script}.py -d
67rc=$?
68if [ ${rc} -ne 0 ] ; then
69  echo "${script} terminated abnormally"
70else
71  echo "${script} OK"
72fi
73
74printf "\nEnd of script OK\n"
Note: See TracBrowser for help on using the repository browser.