Ignore:
Timestamp:
15/02/17 12:02:45 (3 years ago)
Author:
mjuckes
Message:

updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/workbook/importWbMods.py

    r939 r947  
    11from utils_wb import workbook 
    2 import string, collections, uuid 
     2import string, collections, uuid, shelve 
    33import xlrd 
    44import importWbRef 
     
    6363 
    6464    wb = xlrd.open_workbook( 'inputs/structRef.xls' ) 
     65    sh = shelve.open( '../framework/inSh/structRef', 'r' ) 
     66    self.uidByLab = {} 
     67    for k in sh.keys(): 
     68      if k[0] != '_': 
     69        u,l = sh[k][7:9] 
     70        self.uidByLab[l] = u 
     71 
    6572    ii = open( 'inputs/strUidMap.txt' ) 
    66     self.uidByLab = {} 
    6773    for l in ii.readlines(): 
    6874      k,v = l.strip().split() 
    69       self.uidByLab[k] = v 
     75      if k not in self.uidByLab: 
     76        self.uidByLab[k] = v 
     77     
    7078 
    7179    self.lookupinfo = {'cols':['temp. shape','spat. shape','odims','coords','cmeth','cmea','flags']} 
Note: See TracChangeset for help on using the changeset viewer.