Changeset 2425 for TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
- Timestamp:
- 03/02/15 15:50:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2421 r2425 274 274 # .. Initialization .. 275 275 # ==================== 276 277 276 # ... Command line arguments ... 278 277 # ------------------------------ 279 278 args = get_arguments() 279 if args.verbose: 280 print(args) 280 281 281 282 # ... Turn interactive mode off ... … … 293 294 # ... Files and directories ... 294 295 # ----------------------------- 295 file_param = get_last_file(DIR["SAVE"], OUT["PARAM"]) 296 file_utheo = get_last_file(DIR["SAVE"], OUT["UTHEO"]) 297 file_bilan = get_last_file(DIR["SAVE"], OUT["BILAN"]) 298 img_name = "bilan.pdf" 296 file_param = get_last_file(DIR["SAVEDATA"], OUT["PARAM"]) 297 file_utheo = get_last_file(DIR["SAVEDATA"], OUT["UTHEO"]) 298 file_bilan = get_last_file(DIR["SAVEDATA"], OUT["BILAN"]) 299 img_name = "bilan" 300 301 today = os.path.basename(file_param).strip(OUT["PARAM"]) 299 302 300 303 if args.verbose: … … 303 306 print(file_bilan) 304 307 print(img_name) 308 print(today) 309 print(DIR) 310 print(OUT) 305 311 306 312 # .. Get project info .. … … 386 392 # ... Save figure ... 387 393 # ------------------- 388 plot_save(os.path.join(DIR["PLOT"], img_name)) 394 # plot_save(os.path.join(DIR["PLOT"], img_name)) 395 img_in = os.path.join(DIR["PLOT"], "{}.pdf".format(img_name)) 396 plot_save(img_in) 397 if os.path.isdir(DIR["SAVEPLOT"]): 398 img_out = os.path.join(DIR["SAVEPLOT"], 399 "{}_{}.pdf".format(img_name, today)) 400 shutil.copy(img_in, img_out) 389 401 390 402 # ... Publish figure on dods ... 391 403 # ------------------------------ 392 404 if args.dods: 393 dods_cp( os.path.join(DIR["PLOT"], img_name))405 dods_cp(img_in) 394 406 395 407 if args.show: 396 408 plt.show() 409 410 exit()
Note: See TracChangeset
for help on using the changeset viewer.