Index: TOOLS/ConsoGENCMIP6/bin/conso_gencmip6.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/conso_gencmip6.py	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/conso_gencmip6.py	(revision 2417)
@@ -227,5 +227,5 @@
 
 ########################################
-def write_store(filename, logins):
+def write_store(filename, today, logins):
   """
   volume cree sur STORE
@@ -238,12 +238,51 @@
                   if conso > 0.)
 
-  for login in items:
-    storedir = get_storedir(login)
-    if not storedir:
-      break
-    igcm_out = os.path.join(storedir, "IGCM_OUT")
-
-    for dirname in os.listdir(igcm_out):
-      print(dirname, get_dirsize(dirname))
+  title_str  = "{:10s} {:10s} {:>7s} {:s}\n".format(
+                 "date",
+                 "login",
+                 "dirsize",
+                 "dirname",
+               )
+
+  with open(filename, "w") as fileout:
+    if args.dryrun:
+      print(title_str.strip())
+    else:
+      fileout.write(title_str)
+
+    for login in items:
+      if args.verbose:
+        print(login)
+      storedir = get_storedir(login)
+      if not storedir:
+        break
+      igcm_out = os.path.join(storedir, "IGCM_OUT")
+
+      for dirname in os.listdir(igcm_out):
+        print(dirname, get_dirsize(dirname))
+
+        result_str = "{:%Y-%m-%d} {:10s} {:>7s} {:s}\n".format(
+                       today,
+                       login,
+                       get_dirsize(dirname),
+                       dirname
+                     )
+        if args.dryrun:
+          print(result_str.strip())
+        else:
+          fileout.write(result_str)
+
+
+########################################
+def save_files(OUT, today):
+
+  if not args.dryrun:
+    suffix = "{:%Y%m%d}".format(today)
+    for filename in OUT.itervalues():
+      filein  = os.path.join(DIR["DATA"], filename)
+      if os.path.isfile(filein):
+        fileout = os.path.join(DIR["SAVE"],
+                               "_".join((filename, suffix)))
+        shutil.copy(filein, fileout)
 
 
@@ -273,65 +312,13 @@
     print(args)
 
-  # # Files and directories
-  # # =====================
-  # if where_we_run() == "curie":
-  #   LOCAL_DIR = os.path.join(
-  #     "/ccc",
-  #     "cont003",
-  #     "home",
-  #     "dsm",
-  #     "p86ipsl",
-  #     "ConsoGENCMIP6",
-  #     "output"
-  #   )
-  #   SAVE_DIR  = os.path.join(
-  #     "/ccc",
-  #     "work",
-  #     "cont003",
-  #     "dsm",
-  #     "p86ipsl",
-  #     "ConsoGENCMIP6",
-  #   )
-  # # elif where_we_run() == "ipsl":
-  # #   LOCAL_DIR = os.path.join(
-  # #     "/home_local",
-  # #     "slipsl",
-  # #     "ConsoGENCMIP6",
-  # #     "output"
-  # #   )
-  # #   SAVE_DIR  = os.path.join(
-  # #     "/home_local",
-  # #     "slipsl",
-  # #     "ConsoGENCMIP6",
-  # #     "save"
-  # #   )
-  # else:
-  #   LOCAL_DIR = os.path.join(
-  #     "..",
-  #     "output"
-  #   )
-  #   SAVE_DIR  = os.path.join(
-  #     "..",
-  #     "save"
-  #   )
-
-  # LOCAL_DIR = os.path.abspath(LOCAL_DIR)
-  # SAVE_DIR  = os.path.abspath(SAVE_DIR)
-
-  OUT_PARAM = "OUT_CONSO_PARAM"
-  OUT_BILAN = "OUT_CONSO_BILAN"
-  OUT_UTHEO = "OUT_CONSO_UTHEO"
-  OUT_LOGIN = "OUT_CONSO_LOGIN"
-  OUT_STORE = "OUT_CONSO_STORE"
-  OUT_CCCMP = "ccc_myproject.dat"
-
-  if args.verbose:
-    # print(LOCAL_DIR)
-    # print(SAVE_DIR)
+  if args.bilan or args.login or args.store:
+    args.all = False
+
+  if args.verbose:
     print(DIR["DATA"])
     print(DIR["SAVE"])
 
   (project, logins, today, total, utheo, ureal) = \
-      parse_myproject(os.path.join(DIR["DATA"], OUT_CCCMP))
+      parse_myproject(os.path.join(DIR["DATA"], OUT["CCCMP"]))
 
   if args.verbose:
@@ -345,10 +332,16 @@
   # 1- Parametres du projet
   # -----------------------
-  write_param(os.path.join(DIR["DATA"], OUT_PARAM), project)
+  if args.verbose:
+    print("=> write_param")
+
+  write_param(os.path.join(DIR["DATA"], OUT["PARAM"]), project)
 
   # 2- Conso totale par jour
   # ------------------------
+  if args.verbose:
+    print("=> write_bilan")
+
   write_bilan(
-    os.path.join(DIR["DATA"], OUT_BILAN),
+    os.path.join(DIR["DATA"], OUT["BILAN"]),
     today,
     total,
@@ -359,30 +352,30 @@
   # 2b- Conso thÃ©orique par jour
   # ----------------------------
-  write_utheo(os.path.join(DIR["DATA"], OUT_UTHEO), today, utheo)
+  if args.verbose:
+    print("=> write_utheo")
+
+  write_utheo(os.path.join(DIR["DATA"], OUT["UTHEO"]), today, utheo)
 
   # 3- Conso par login (HOME)
   # -------------------------
-  write_login(os.path.join(DIR["DATA"], OUT_LOGIN), today, logins)
+  if args.verbose:
+    print("=> write_login")
+
+  write_login(os.path.join(DIR["DATA"], OUT["LOGIN"]), today, logins)
 
   # 4- volume cree sur STORE
   # ------------------------
+  if args.verbose:
+    print("=> write_store")
+
   # if where_we_run() == "curie":
-  #   write_store(os.path.join(DIR["DATA"], OUT_STORE))
-  write_store(os.path.join(DIR["DATA"], OUT_STORE), logins)
+  #   write_store(os.path.join(DIR["DATA"], OUT["STORE"]))
+  write_store(os.path.join(DIR["DATA"], OUT["STORE"]), today, logins)
 
   # Save files (on WORKDIR)
   # =======================
+  if args.verbose:
+    print("=> Save files")
+
   if not args.dryrun:
-    suffix = "{:%Y%m%d}".format(today)
-    file_list = [
-      OUT_PARAM,
-      OUT_BILAN,
-      OUT_UTHEO,
-      OUT_LOGIN,
-      OUT_STORE
-    ]
-    for filename in file_list:
-      filein  = os.path.join(DIR["DATA"], filename)
-      if os.path.isfile(filein):
-        fileout = os.path.join(DIR["SAVE"], "_".join((filename, suffix)))
-        shutil.copy(filein, fileout)
+    save_files(OUT, today)
Index: TOOLS/ConsoGENCMIP6/bin/gencmip6.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/gencmip6.py	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/gencmip6.py	(revision 2417)
@@ -111,4 +111,8 @@
       missing_values="nan",
     )
+    print(data)
+    print(type(data))
+    print(data.shape)
+    print(data.size)
     dates, utheos = zip(*data)
 
Index: TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py	(revision 2417)
+++ TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py	(revision 2417)
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# this must come first
+from __future__ import print_function, unicode_literals, division
+
+# standard library imports
+import os
+# import os.path
+
+# Application library imports
+from gencmip6 import *
+
+
+ROOT_DIR = os.getcwd()
+
+# Common paths
+DIR = {
+  "ROOT": ROOT_DIR,
+  "DATA": os.path.join(ROOT_DIR, "output"),
+  "SAVE": os.path.join(ROOT_DIR, "save"),
+  "PLOT": os.path.join(ROOT_DIR, "plot"),
+}
+
+# Common files
+OUT = {
+  "PARAM": "OUT_CONSO_PARAM",
+  "BILAN": "OUT_CONSO_BILAN",
+  "UTHEO": "OUT_CONSO_UTHEO",
+  "LOGIN": "OUT_CONSO_LOGIN",
+  "STORE": "OUT_CONSO_STORE",
+  "CCCMP": "ccc_myproject.dat"
+}
+
+
+if __name__ == "__main__":
+  print(DIR, )
+  print(OUT, )
Index: TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py.init
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py.init	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/gencmip6_path.py.init	(revision 2417)
@@ -25,2 +25,3 @@
 if __name__ == "__main__":
   print(DIR, )
+2
Index: TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/plot_bilan.py	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/plot_bilan.py	(revision 2417)
@@ -9,5 +9,4 @@
 import os
 import os.path
-# import glob
 import datetime as dt
 import numpy as np
@@ -273,10 +272,7 @@
   # ... Files and directories ...
   # -----------------------------
-  file_pattern = "OUT_CONSO_"
-  file_param = get_last_file(DIR["DATA"], file_pattern+"PARAM")
-  file_utheo = get_last_file(DIR["DATA"], file_pattern+"UTHEO")
-  file_bilan = get_last_file(DIR["DATA"], file_pattern+"BILAN")
-  file_login = get_last_file(DIR["DATA"], file_pattern+"LOGIN")
-  file_store = get_last_file(DIR["DATA"], file_pattern+"STORE")
+  file_param = get_last_file(DIR["DATA"], OUT["PARAM"])
+  file_utheo = get_last_file(DIR["DATA"], OUT["UTHEO"])
+  file_bilan = get_last_file(DIR["DATA"], OUT["BILAN"])
   img_name = "bilan.pdf"
 
@@ -285,6 +281,5 @@
     print(file_utheo)
     print(file_bilan)
-    print(file_login)
-    print(file_store)
+    print(img_name)
 
   # .. Get project info ..
@@ -309,9 +304,4 @@
   # .. Extract data depending on C.L. arguments ..
   # ==============================================
-  # args.range = [
-  #   string_to_date("2015-01-01"),
-  #   string_to_date("2015-01-31")
-  # ]
-  # args.full  = True
   if args.full:
     selected_items = bilan.get_items_in_full_range(args.inc)
Index: TOOLS/ConsoGENCMIP6/bin/plot_login.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/plot_login.py	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/plot_login.py	(revision 2417)
@@ -9,6 +9,4 @@
 import os
 import os.path
-# import glob
-# import datetime as dt
 import numpy as np
 import matplotlib.pyplot as plt
@@ -45,13 +43,4 @@
     self[login] = Login(date, login, conso)
 
-  # #---------------------------------------
-  # def get_items_in_full_range(self, inc=1):
-  #   """
-  #   """
-  #   items = (item for item in self.itervalues())
-  #   items = sorted(items, key=lambda item: item.date)
-
-  #   return items[::inc]
-
   #---------------------------------------
   def get_items(self):
@@ -84,12 +73,4 @@
   def __repr__(self):
     return "{} ({:.2}h)".format(self.login, self.conso)
-
-  # #---------------------------------------
-  # def isfilled(self):
-  #   return self.filled
-
-  # #---------------------------------------
-  # def fill(self):
-  #   self.filled = True
 
 
@@ -181,11 +162,14 @@
   # ... Files and directories ...
   # -----------------------------
-  file_pattern = "OUT_CONSO_"
-  file_param = get_last_file(DIR["DATA"], file_pattern+"PARAM")
-  file_utheo = get_last_file(DIR["DATA"], file_pattern+"UTHEO")
-  file_bilan = get_last_file(DIR["DATA"], file_pattern+"BILAN")
-  file_login = get_last_file(DIR["DATA"], file_pattern+"LOGIN")
-  file_store = get_last_file(DIR["DATA"], file_pattern+"STORE")
-  img_name = "login.pdf"
+  file_param = get_last_file(DIR["DATA"], OUT["PARAM"])
+  file_utheo = get_last_file(DIR["DATA"], OUT["UTHEO"])
+  file_login = get_last_file(DIR["DATA"], OUT["LOGIN"])
+  img_name = "bilan.pdf"
+
+  if args.verbose:
+    print(file_param)
+    print(file_utheo)
+    print(file_login)
+    print(img_name)
 
   # .. Get project info ..
@@ -233,6 +217,6 @@
   plot_data(ax, ycoord, ylabels, consos)
 
-  # # ... Tweak figure ...
-  # # --------------------
+  # ... Tweak figure ...
+  # --------------------
   title = "Consommation {} par login\n{:%d/%m/%Y}".format(
     gencmip6.project.upper(),
Index: TOOLS/ConsoGENCMIP6/bin/plot_store.py
===================================================================
--- TOOLS/ConsoGENCMIP6/bin/plot_store.py	(revision 2413)
+++ TOOLS/ConsoGENCMIP6/bin/plot_store.py	(revision 2417)
@@ -9,6 +9,4 @@
 import os
 import os.path
-# import glob
-# import datetime as dt
 import numpy as np
 import matplotlib.pyplot as plt
@@ -213,11 +211,14 @@
   # ... Files and directories ...
   # -----------------------------
-  file_pattern = "OUT_CONSO_"
-  file_param = get_last_file(DIR["DATA"], file_pattern+"PARAM")
-  file_utheo = get_last_file(DIR["DATA"], file_pattern+"UTHEO")
-  file_bilan = get_last_file(DIR["DATA"], file_pattern+"BILAN")
-  file_login = get_last_file(DIR["DATA"], file_pattern+"LOGIN")
-  file_store = get_last_file(DIR["DATA"], file_pattern+"STORE")
-  img_name = "store.pdf"
+  file_param = get_last_file(DIR["DATA"], OUT["PARAM"])
+  file_utheo = get_last_file(DIR["DATA"], OUT["UTHEO"])
+  file_store = get_last_file(DIR["DATA"], OUT["STORE"])
+  img_name = "bilan.pdf"
+
+  if args.verbose:
+    print(file_param)
+    print(file_utheo)
+    print(file_store)
+    print(img_name)
 
   # .. Get project info ..
