Changeset 2433
- Timestamp:
- 03/05/15 11:55:57 (9 years ago)
- Location:
- TOOLS/ConsoGENCMIP6
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/conso_gencmip6.py
r2426 r2433 391 391 392 392 exit(0) 393 -
TOOLS/ConsoGENCMIP6/bin/gencmip6.py
r2431 r2433 184 184 missing_values="nan", 185 185 ) 186 # print(data)187 # print(type(data))188 # print(data.shape)189 # print(data.size)190 186 dates, utheos = zip(*data) 191 187 … … 207 203 else: 208 204 self.date_init = dt.datetime(self.deadline.year, 1, 1) 205 206 delta = self.deadline - self.date_init 207 self.days = delta.days + 1 209 208 210 209 … … 245 244 if __name__ == '__main__': 246 245 pass 246 -
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2430 r2433 180 180 ax_conso.bar(xcoord, consos, align="center", color="linen", 181 181 linewidth=line_width, label="conso (heures)") 182 # ax_conso.plot(xcoord, conso_per_day, line_style, color="blue", 183 # linewidth=1, markersize=8, alpha=0.5, 184 # # solid_capstyle="round", solid_joinstyle="round", 185 # label="conso journaliÚre idéale (heures)") 186 ax_conso.axhline(y=conso_per_day[0], color="blue", alpha=0.5, 182 ax_conso.axhline(y=conso_per_day, color="blue", alpha=0.5, 187 183 label="conso journaliÚre idéale (heures)") 188 184 … … 365 361 consos = np.array(consos, dtype=float) 366 362 367 conso_per_day = np.array([gencmip6.alloc / nb_items 368 for item in selected_items], dtype=float) 363 conso_per_day = gencmip6.alloc / gencmip6.days 369 364 370 365 theo_uses = np.array([100.*item.theo_use for item in selected_items], … … 418 413 419 414 exit(0) 415 -
TOOLS/ConsoGENCMIP6/bin/plot_jobs.py
r2431 r2433 166 166 167 167 ######################################## 168 def plot_data(ax, xcoord, xlabels, run_jobs, pen_jobs ):168 def plot_data(ax, xcoord, xlabels, run_jobs, pen_jobs, conso_per_day): 169 169 """ 170 170 """ 171 line_width = 0. 171 172 172 173 ax.bar(xcoord, run_jobs, align="center", color="lightgreen", 173 linewidth= 0.1, label="running jobs cores")174 linewidth=line_width, label="jobs running") 174 175 ax.bar(xcoord, pen_jobs, bottom=run_jobs, align="center", 175 color="indianred", linewidth=0.1, label="pending jobs cores") 176 color="indianred", linewidth=line_width, label="jobs pending") 177 178 ax.axhline(y=conso_per_day, color="blue", alpha=0.5, 179 label="conso journaliÚre idéale") 176 180 177 181 … … 192 196 xcoord_maj = [x for x, l in zip(xcoord, xlabels) 193 197 if l.hour == 0 or l.hour == 12] 194 xlabels_maj = ["{:%d-%m -%d%Hh}".format(l) for l in xlabels198 xlabels_maj = ["{:%d-%m %Hh}".format(l) for l in xlabels 195 199 if l.hour == 0 or l.hour == 12] 196 200 ax.set_xticks(xcoord, minor=True) … … 285 289 full_data = np.append(full_data, values=data) 286 290 287 # print(full_data)288 # print(full_data.size)289 290 291 # .. Get project info .. 291 292 # ====================== … … 324 325 325 326 xcoord = np.linspace(1, nb_items, num=nb_items) 326 xlabels = np.array([date for date, run, pen in full_data]) 327 # xlabels = ["{:%d-%m-%d %H:%M}".format(date) 328 # for date, run, pen in full_data] 329 330 run_jobs = np.array([run for date, run, pen in full_data], 331 dtype=int) 332 pen_jobs = np.array([pen for date, run, pen in full_data], 333 dtype=int) 334 335 print(xcoord, xlabels) 336 print(run_jobs) 337 print(pen_jobs) 327 if full_data.size > 1: 328 xlabels = np.array([date for date, run, pen in full_data]) 329 run_jobs = np.array([run for date, run, pen in full_data], 330 dtype=int) 331 pen_jobs = np.array([pen for date, run, pen in full_data], 332 dtype=int) 333 else: 334 xlabels , run_jobs, pen_jobs = full_data.tolist() 335 xlabels = list(xlabels) 336 run_jobs = list(run_jobs ) 337 pen_jobs = list(pen_jobs ) 338 338 339 339 # cumul = np.array([item.conso for item in selected_items], … … 344 344 # consos = np.array(consos, dtype=float) 345 345 346 # conso_per_day = np.array([gencmip6.alloc / nb_items 347 # for item in selected_items], dtype=float) 346 conso_per_day = gencmip6.alloc / (gencmip6.days * 24.) 348 347 349 348 # theo_uses = np.array([100.*item.theo_use for item in selected_items], … … 362 361 # ... Plot data ... 363 362 # ----------------- 364 plot_data(ax, xcoord, xlabels, run_jobs, pen_jobs )363 plot_data(ax, xcoord, xlabels, run_jobs, pen_jobs, conso_per_day) 365 364 366 365 # # ... Tweak figure ... … … 396 395 397 396 exit(0) 397 -
TOOLS/ConsoGENCMIP6/bin/plot_login.py
r2430 r2433 271 271 272 272 exit(0) 273 -
TOOLS/ConsoGENCMIP6/bin/plot_store.py
r2430 r2433 305 305 306 306 exit(0) 307 -
TOOLS/ConsoGENCMIP6/launch_conso.sh
r2429 r2433 73 73 74 74 printf "\nEnd of script OK\n" 75
Note: See TracChangeset
for help on using the changeset viewer.