Changeset 2420
- Timestamp:
- 03/02/15 11:47:26 (9 years ago)
- Location:
- TOOLS/ConsoGENCMIP6/bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/gencmip6.py
r2417 r2420 111 111 missing_values="nan", 112 112 ) 113 print(data)114 print(type(data))115 print(data.shape)116 print(data.size)113 # print(data) 114 # print(type(data)) 115 # print(data.shape) 116 # print(data.size) 117 117 dates, utheos = zip(*data) 118 118 -
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2417 r2420 164 164 ######################################## 165 165 def plot_data(ax_conso, ax_theo, xcoord, xlabels, 166 consos, theo_uses, real_uses, theo_equs):166 consos, conso_per_day, theo_uses, real_uses, theo_equs): 167 167 """ 168 168 """ … … 176 176 ax_conso.bar(xcoord, consos, align="center", color="linen", 177 177 linewidth=line_width, label="conso (heures)") 178 # ax_conso.plot(xcoord, conso_per_day, line_style, color="blue", 179 # linewidth=1, markersize=8, alpha=0.5, 180 # # solid_capstyle="round", solid_joinstyle="round", 181 # label="conso journaliÚre idéale (heures)") 182 ax_conso.axhline(y=conso_per_day[0], color="blue", alpha=0.5, 183 label="conso journaliÚre idéale (heures)") 178 184 179 185 ax_theo.plot(xcoord, theo_equs, "--", … … 320 326 xlabels = ["{:%d-%m}".format(item.date) 321 327 for item in selected_items] 322 c onsos= np.array([item.conso for item in selected_items],328 cumul = np.array([item.conso for item in selected_items], 323 329 dtype=float) 330 consos = [] 331 consos.append(cumul[0]) 332 consos[1:nb_items] = cumul[1:nb_items] - cumul[0:nb_items-1] 333 consos = np.array(consos, dtype=float) 334 335 conso_per_day = np.array([gencmip6.alloc / nb_items 336 for item in selected_items], dtype=float) 337 324 338 theo_uses = np.array([100.*item.theo_use for item in selected_items], 325 339 dtype=float) … … 338 352 # ----------------- 339 353 plot_data(ax_conso, ax_theo, xcoord, xlabels, 340 consos, theo_uses, real_uses, theo_equs)354 consos, conso_per_day, theo_uses, real_uses, theo_equs) 341 355 342 356 # ... Tweak figure ...
Note: See TracChangeset
for help on using the changeset viewer.