Changeset 2450


Ignore:
Timestamp:
03/27/15 12:19:27 (10 years ago)
Author:
labetoulle
Message:

plot_jobs : default is now to plot the last three weeks instead of everything

Location:
TOOLS/ConsoGENCMIP6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin/plot_jobs.py

    r2449 r2450  
    291291  # ------------------------------ 
    292292  args = get_arguments() 
    293   if args.verbose: 
    294     print(args) 
     293 
     294  # ... Constants ... 
     295  # ----------------- 
     296  WEEK_NB = 3 
    295297 
    296298  # ... Turn interactive mode off ... 
     
    315317 
    316318  img_name = "jobs" 
    317   today = os.path.basename(file_param).strip(OUT["PARAM"]) 
    318   weeknum = string_to_date(today, fmt="%Y%m%d").isocalendar()[1] 
     319 
     320  today   = dt.datetime.today() 
     321  weeknum = today.isocalendar()[1] 
    319322 
    320323  if args.verbose: 
    321     print(file_param) 
    322     print(file_utheo) 
    323     print(file_list) 
    324     print(img_name) 
    325     print(today) 
     324    fmt_str = "{:10s} : {}" 
     325    print(fmt_str.format("args", args)) 
     326    print(fmt_str.format("today", today)) 
     327    print(fmt_str.format("file_param", file_param)) 
     328    print(fmt_str.format("file_utheo", file_utheo)) 
     329    print(fmt_str.format("file_list", file_list)) 
     330    print(fmt_str.format("img_name", img_name)) 
    326331 
    327332  # .. Get project info .. 
     
    355360    ) 
    356361  else: 
    357     selected_items = bilan.get_items(args.inc) 
     362    # selected_items = bilan.get_items(args.inc) 
     363    range_end   = today 
     364    range_start = range_end + dt.timedelta(weeks=-WEEK_NB) - dt.timedelta(days=1) 
     365    selected_items = bilan.get_items_in_range( 
     366      range_start, range_end, args.inc 
     367    ) 
    358368 
    359369  # .. Compute data to be plotted .. 
  • TOOLS/ConsoGENCMIP6/save/data

    • Property svn:ignore
      •  

        old new  
        11OUT_* 
        2 ccc_myproject.dat 
         2ccc_myproject.dat_* 
Note: See TracChangeset for help on using the changeset viewer.