Index: /TOOLS/ConsoGENCMIP6/bin/libconso.py
===================================================================
--- /TOOLS/ConsoGENCMIP6/bin/libconso.py	(revision 2716)
+++ /TOOLS/ConsoGENCMIP6/bin/libconso.py	(revision 2717)
@@ -167,10 +167,15 @@
 
 ########################################
-def get_input_files(dir_data, file_list):
+def get_input_files(dir_data, file_list, date=None):
   """
   """
   res = []
 
-  for filename in file_list:
+  for filebase in file_list:
+    if date:
+      filename = "_".join((filebase, date))
+    else:
+      filename = filebase
+
     res.append(get_last_file(dir_data, filename))
 
@@ -244,5 +249,9 @@
     dates, utheos = zip(*data)
 
-    (x1, x2) = (np.nanargmin(utheos), np.nanargmax(utheos))
+    x2 = len(utheos) - 1
+    for nb, elem in enumerate(utheos[-2::-1]):
+      if elem >= utheos[x2]:
+        break
+      x1 = x2 - nb + 1
 
     m = np.array([[x1, 1.], [x2, 1.]])
@@ -256,8 +265,7 @@
 
     if poly_ok:
-      delta = int(round(polynome.r[0] + 1))
-
-      d1 = dates[0]
-      self.date_init = d1 + dt.timedelta(days=delta)
+      delta = x1 - int(round(polynome.r[0]))
+      d1 = dates[x1]
+      self.date_init = d1 - dt.timedelta(days=delta)
     else:
       self.date_init = dt.datetime(self.deadline.year, 1, 1)
Index: /TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
===================================================================
--- /TOOLS/ConsoGENCMIP6/bin/plot_bilan.py	(revision 2716)
+++ /TOOLS/ConsoGENCMIP6/bin/plot_bilan.py	(revision 2717)
@@ -242,4 +242,34 @@
   from matplotlib.ticker import AutoMinorLocator
 
+  # ... Compute useful stuff ...
+  # ----------------------------
+  multialloc = False
+  if conso_per_day_2:
+    date_inter = projet.date_init + dt.timedelta(days=projet.days//2)
+    if projet.date_init in dates:
+      xi = dates.index(projet.date_init)
+    else:
+      xi = 0
+
+    if projet.deadline in dates:
+      xf = dates.index(projet.deadline)
+    else:
+      xf = len(dates) + 1
+
+    if date_inter in dates:
+      xn = dates.index(date_inter)
+      yi = conso_per_day
+      yf = conso_per_day_2
+      multialloc = True
+    else:
+      if dates[-1] < date_inter:
+        xn = xf
+        yi = conso_per_day
+        yf = conso_per_day
+      elif dates[0] > date_inter:
+        xn = xi
+        yi = conso_per_day_2
+        yf = conso_per_day_2
+
   # ... Config axes ...
   # -------------------
@@ -249,5 +279,8 @@
     ymax = conso_max  # + conso_max*.1
   else:
-    ymax = 3. * max(conso_per_day, conso_per_day_2)
+    if multialloc:
+      ymax = 3. * max(yi, yf)
+    else:
+      ymax = 3. * yi
 
   if conso_max > ymax:
@@ -274,5 +307,14 @@
   ax_theo.set_ylim(0., 100)
 
-  # 2) Ticks labels
+  # 2) Plot ideal daily consumption in hours
+  line_color = "blue"
+  line_alpha = 0.5
+  line_label = "conso journaliÃšre\nidÃ©ale (heures)"
+  ax_conso.plot(
+    [xi, xn, xn, xf], [yi, yi, yf, yf],
+    color=line_color, alpha=line_alpha, label=line_label,
+  )
+
+  # 3) Ticks labels
   (date_beg, date_end) = (dates[0], dates[-1])
   date_fmt = "{:%d-%m}"
@@ -300,5 +342,5 @@
   yticks = list(ax_conso.get_yticks())
   yticks.append(conso_per_day)
-  if conso_per_day_2:
+  if multialloc:
     yticks.append(conso_per_day_2)
   ax_conso.set_yticks(yticks)
@@ -307,10 +349,4 @@
   ax_theo.tick_params(colors="firebrick")
   ax_theo.yaxis.label.set_color("firebrick")
-
-  ax_conso.axhline(y=conso_per_day, color="blue", alpha=0.5,
-                   label="conso journaliÃšre\nidÃ©ale (heures)")
-
-  if conso_per_day_2:
-    ax_conso.axhline(y=conso_per_day_2, color="blue", alpha=0.5)
 
   for x, d in zip(xcoord, dates):
@@ -319,5 +355,5 @@
                        linewidth=0.5, linestyle=":")
 
-  # 3) Define axes title
+  # 4) Define axes title
   for ax, label in (
     (ax_conso, "heures"),
@@ -327,5 +363,5 @@
     ax.tick_params(axis="y", labelsize="small")
 
-  # 4) Define plot size
+  # 5) Define plot size
   fig.subplots_adjust(
     left=0.08,
@@ -358,4 +394,6 @@
                       type=string_to_date,
                       help="date range: ssaa-mm-jj ssaa-mm-jj")
+  parser.add_argument("--date", action="store",                                                                                                                                                      
+                      help="date to plot: ssaammjj")                                                                                                                                                 
   parser.add_argument("-m", "--max", action="store_true",
                       help="plot with y_max = allocation")
@@ -394,6 +432,9 @@
 
   (file_param, file_utheo, file_data) = \
-      get_input_files(DIR["SAVEDATA"],
-                      [OUT["PARAM"], OUT["UTHEO"], OUT["BILAN"]])
+      get_input_files(
+        DIR["SAVEDATA"],
+        [OUT["PARAM"], OUT["UTHEO"], OUT["BILAN"]],
+        args.date
+      )
 
   img_name = os.path.splitext(
@@ -457,6 +498,6 @@
 
   if projet.project == "gencmip6":
-    alloc1 = 5.e6
-    alloc2 = projet.alloc - alloc1
+    alloc1 = (1 * projet.alloc) / 3
+    alloc2 = (2 * projet.alloc) / 3
     conso_per_day   = 2 * alloc1 / projet.days
     conso_per_day_2 = 2 * alloc2 / projet.days
@@ -520,7 +561,16 @@
   # ... Save figure ...
   # -------------------
-  img_in  = os.path.join(DIR["PLOT"], "{}.pdf".format(img_name))
-  img_out = os.path.join(DIR["SAVEPLOT"],
-                         "{}_{}.pdf".format(img_name, today))
+  if args.date:
+    img_in = os.path.join(
+      DIR["PLOT"], "{}_{}.pdf".format(img_name, today)
+    )
+  else:
+    img_in = os.path.join(
+      DIR["PLOT"], "{}.pdf".format(img_name)
+    )
+  img_out = os.path.join(
+    DIR["SAVEPLOT"],
+    "{}_{}.pdf".format(img_name, today)
+  )
 
   plot_save(img_in, img_out, title, DIR)
Index: /TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py
===================================================================
--- /TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py	(revision 2716)
+++ /TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py	(revision 2717)
@@ -268,8 +268,11 @@
   # 1) Range
   conso_max = np.nanmax(consos)
+  jobs_max = np.nanmax(run_mean)
   if args.max:
-    ymax = conso_max  # + conso_max*.1
+    ymax = conso_max  # * 1.1
+    ymax_jobs = jobs_max  # * 1.1
   else:
     ymax = 3. * max(conso_per_day, conso_per_day_2)
+    ymax_jobs = max(conso_per_day, conso_per_day_2)/24.
 
   if conso_max > ymax:
@@ -295,7 +298,32 @@
   ax_conso.set_xlim(xmin, xmax)
   ax_conso.set_ylim(0., ymax)
+  ax_jobs.set_ylim(0., ymax_jobs)
   ax_theo.set_ylim(0., 100)
 
-  # 2) Ticks labels
+  # 2) Plot ideal daily consumption in hours
+  line_color = "blue"
+  line_alpha = 0.5
+  line_label = "conso journaliÃšre\nidÃ©ale ({})"
+  for ax, y_div, label in (
+    (ax_conso, 1., line_label.format("heures")),
+    (ax_jobs, 24., line_label.format("cÅurs")),
+  ):
+    if conso_per_day_2:
+      list_x = [0, xmax/2, xmax/2, xmax]
+      list_y = np.array(
+        [conso_per_day, conso_per_day, conso_per_day_2, conso_per_day_2],
+        dtype=float
+      )
+      ax.plot(
+        list_x, list_y/y_div,
+        color=line_color, alpha=line_alpha, label=label,
+      )
+    else:
+      ax.axhline(
+        y=conso_per_day/y_div,
+        color=line_color, alpha=line_alpha, label=label,
+      )
+
+  # 3) Ticks labels
   (date_beg, date_end) = (dates[0], dates[-1])
   date_fmt = "{:%d-%m}"
@@ -328,11 +356,7 @@
     yticks.append(y)
     ax.set_yticks(yticks)
-    ax.axhline(y=y, color="blue", alpha=0.5,
-               label="conso journaliÃšre\nidÃ©ale ({})".format(label))
 
   if conso_per_day_2:
     yticks.append(conso_per_day_2)
-    ax_conso.axhline(y=conso_per_day_2, color="blue", alpha=0.5)
-    ax_jobs.axhline(y=conso_per_day_2 / 24., color="blue", alpha=0.5)
 
   ax_theo.spines["right"].set_color("firebrick")
@@ -346,5 +370,5 @@
                    linewidth=0.5, linestyle=":")
 
-  # 3) Define axes title
+  # 4) Define axes title
   for ax, label in (
     (ax_conso, "heures"),
@@ -355,5 +379,5 @@
     ax.tick_params(axis="y", labelsize="small")
 
-  # 4) Define plot size
+  # 5) Define plot size
   fig.subplots_adjust(
     left=0.08,
@@ -488,6 +512,6 @@
 
   if projet.project == "gencmip6":
-    alloc1 = 5.e6
-    alloc2 = projet.alloc - alloc1
+    alloc1 = (1 * projet.alloc) / 3
+    alloc2 = (2 * projet.alloc) / 3
     conso_per_day   = 2 * alloc1 / projet.days
     conso_per_day_2 = 2 * alloc2 / projet.days
Index: /TOOLS/ConsoGENCMIP6/bin/plot_jobs.py
===================================================================
--- /TOOLS/ConsoGENCMIP6/bin/plot_jobs.py	(revision 2716)
+++ /TOOLS/ConsoGENCMIP6/bin/plot_jobs.py	(revision 2717)
@@ -122,5 +122,7 @@
     """
     items = (item for item in self.itervalues()
-                   if item.date.hour == 0)
+                   if item.date >= projet.date_init and
+                      item.date <= projet.deadline  and
+                      item.date.hour == 0)
     items = sorted(items, key=lambda item: item.date)
 
@@ -218,11 +220,55 @@
   from matplotlib.ticker import AutoMinorLocator
 
+  # ... Compute useful stuff ...
+  # ----------------------------
+  multialloc = False
+  if conso_per_day_2:
+    date_inter = projet.date_init + dt.timedelta(days=projet.days//2)
+    if projet.date_init in dates:
+      xi = dates.index(projet.date_init)
+    else:
+      xi = 0
+
+    if projet.deadline in dates:
+      xf = dates.index(projet.deadline)
+    else:
+      xf = len(dates)
+
+    if date_inter in dates:
+      xn = dates.index(date_inter)
+      yi = conso_per_day
+      yf = conso_per_day_2
+      multialloc = True
+    else:
+      if dates[-1] < date_inter:
+        xn = xf
+        yi = conso_per_day
+        yf = conso_per_day
+      elif dates[0] > date_inter:
+        xn = xi
+        yi = conso_per_day_2
+        yf = conso_per_day_2
+
   # ... Config axes ...
   # -------------------
   # 1) Range
   xmin, xmax = xcoord[0]-1, xcoord[-1]+1
+  if multialloc:
+    ymax = 4. * max(yi, yf)
+  else:
+    ymax = 4. * yi
   ax.set_xlim(xmin, xmax)
-
-  # 2) Ticks labels
+  ax.set_ylim(0, ymax)
+
+  # 2) Plot ideal daily consumption
+  line_color = "blue"
+  line_alpha = 0.5
+  line_label = "conso journaliÃšre idÃ©ale"
+  ax.plot(
+    [xi, xn, xn, xf], [yi, yi, yf, yf],
+    color=line_color, alpha=line_alpha, label=line_label,
+  )
+
+  # 3) Ticks labels
   (date_beg, date_end) = (dates[0], dates[-1])
 
@@ -249,13 +295,8 @@
   yticks = list(ax.get_yticks())
   yticks.append(conso_per_day)
-  if conso_per_day_2:
+  if multialloc:
     yticks.append(conso_per_day_2)
   ax.set_yticks(yticks)
 
-  ax.axhline(y=conso_per_day, color="blue", alpha=0.5,
-             label="conso journaliÃšre idÃ©ale")
-
-  if conso_per_day_2:
-    ax.axhline(y=conso_per_day_2, color="blue", alpha=0.5)
 
   for x, d in zip(xcoord, dates):
@@ -263,9 +304,9 @@
       ax.axvline(x=x, color="black", linewidth=1., linestyle=":")
 
-  # 3) Define axes title
+  # 4) Define axes title
   ax.set_ylabel("cÅurs", fontweight="bold")
   ax.tick_params(axis="y", labelsize="small")
 
-  # 4) Define plot size
+  # 5) Define plot size
   fig.subplots_adjust(
     left=0.08,
@@ -420,6 +461,6 @@
 
   if projet.project == "gencmip6":
-    alloc1 = 5.e6
-    alloc2 = projet.alloc - alloc1
+    alloc1 = (1 * projet.alloc) / 3
+    alloc2 = (2 * projet.alloc) / 3
     conso_per_day   = 2 * alloc1 / (projet.days * 24.)
     conso_per_day_2 = 2 * alloc2 / (projet.days * 24.)
Index: /TOOLS/ConsoGENCMIP6/bin/plot_store.py
===================================================================
--- /TOOLS/ConsoGENCMIP6/bin/plot_store.py	(revision 2716)
+++ /TOOLS/ConsoGENCMIP6/bin/plot_store.py	(revision 2717)
@@ -143,5 +143,8 @@
     self.listdir.append(DirVolume(date, login, dirname, dirsize,
                                   date_init, dirsize_init))
-    self.add_to_total(dirsize)
+    if isinstance(dirsize, SizeUnit):
+      self.add_to_total(dirsize)
+    elif args.verbose:
+      print("No size for {}, {}".format(login, dirname))
 
 
