Ignore:
Timestamp:
04/02/15 12:12:26 (9 years ago)
Author:
labetoulle
Message:
  • Use an INI config file
  • reaname "gencmip6" variables
Location:
TOOLS/ConsoGENCMIP6/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin

    • Property svn:ignore
      •  

        old new  
        1 gencmip6_path.py 
         1*.pyc 
  • TOOLS/ConsoGENCMIP6/bin/plot_login.py

    r2433 r2460  
    1212 
    1313# Application library imports 
    14 from gencmip6 import * 
    15 from gencmip6_path import * 
     14from libconso import * 
    1615 
    1716 
     
    120119 
    121120 
    122 # ######################################## 
    123 # def plot_save(img_name): 
    124 #   """ 
    125 #   """ 
    126 #   dpi = 200. 
    127  
    128 #   img_in  = os.path.join(DIR["PLOT"], "{}.pdf".format(img_name)) 
    129  
    130 #   with PdfPages(img_in) as pdf: 
    131 #     pdf.savefig(dpi=dpi) 
    132  
    133 #     # pdf file's metadata 
    134 #     d = pdf.infodict() 
    135 #     d["Title"]   = "Conso GENCMIP6 par login" 
    136 #     d["Author"]  = "plot_bilan.py" 
    137 #     # d["Subject"] = "Time spent over specific commands during create_ts \ 
    138 #     #                 jobs at IDRIS and four configurations at TGCC" 
    139 #     # d["Keywords"] = "bench create_ts TGCC IDRIS ncrcat" 
    140 #     # d["CreationDate"] = dt.datetime(2009, 11, 13) 
    141 #     # d["ModDate"] = dt.datetime.today() 
    142  
    143 #   if os.path.isdir(DIR["SAVEPLOT"]): 
    144 #     img_out = os.path.join(DIR["SAVEPLOT"], 
    145 #                            "{}_{}.pdf".format(img_name, today)) 
    146 #     shutil.copy(img_in, img_out) 
    147  
    148  
    149121######################################## 
    150122def get_arguments(): 
     
    188160  # ... Files and directories ... 
    189161  # ----------------------------- 
     162  project_name, DIR, OUT = parse_config("bin/config.ini") 
     163 
    190164  (file_param, file_utheo, file_data) = \ 
    191165      get_input_files(DIR["SAVEDATA"], 
     
    204178  # .. Get project info .. 
    205179  # ====================== 
    206   gencmip6 = Project() 
    207   gencmip6.fill_data(file_param) 
    208   gencmip6.get_date_init(file_utheo) 
     180  projet = Project() 
     181  projet.fill_data(file_param) 
     182  projet.get_date_init(file_utheo) 
    209183 
    210184  # .. Fill in data dict .. 
     
    249223  # -------------------- 
    250224  title = "Consommation {} par login\n{:%d/%m/%Y}".format( 
    251     gencmip6.project.upper(), 
     225    projet.project.upper(), 
    252226    date 
    253227  ) 
     
    260234                         "{}_{}.pdf".format(img_name, today)) 
    261235 
    262   plot_save(img_in, img_out, title) 
     236  plot_save(img_in, img_out, title, DIR) 
    263237 
    264238  # ... Publish figure on dods ... 
    265239  # ------------------------------ 
    266240  if args.dods: 
    267     dods_cp(img_in) 
     241    dods_cp(img_in, DIR) 
    268242 
    269243  if args.show: 
Note: See TracChangeset for help on using the changeset viewer.