Ignore:
Timestamp:
03/09/15 10:18:48 (4 years ago)
Author:
mjuckes
Message:

import of cmip5 standard output for priorities

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/srcMisc/sx2.py

    r375 r376  
    480480## need to identify what is meant by group labels in "Request Scoping" -- now in eervg.keys() 
    481481## 
    482 ## 29th July: loosin some links for groups of revised table items .... 
     482## 29th July: loosing some links for groups of revised table items .... 
    483483## 
    484484shb = shelve.open( 'dreq_consol_tables_reviewed_b_v20150708', 'r' ) 
    485485revisedTabKeys = shb.keys() 
     486revisedTabKeys.sort() 
     487revisedTabKeysff = [] 
     488for r in revisedTabKeys: 
     489  if string.find( r, '.' ) != -1: 
     490    mip,tab = string.split(r, '.' ) 
     491    assert sx.cmip5so.so.has_key(tab), 'FATAL.001.0001: revised table not found in original: %s' % tab 
     492    lnf = [] 
     493    lpe = [] 
     494    lmod = [] 
     495    for v in shb[r].keys(): 
     496      v1 = string.strip(v) 
     497      if not sx.cmip5so.so[tab].a.has_key(v1): 
     498        lnf.append(v) 
     499      else: 
     500        if shb[r][v][1] == sx.cmip5so.so[tab].a[v1][0]: 
     501          lpe.append(v) 
     502        else: 
     503          lmod.append(v) 
     504    if len(lnf) > 0: 
     505      print 'ERROR.008.0001: Revised variables not in original: %s %s' % (r,str(lnf) ) 
     506    if len(lmod) == 0: 
     507      print 'INFO.008.0001: No modfications in %s' % r 
     508    else: 
     509      revisedTabKeysff.append( r ) 
     510       
    486511shb.close() 
    487 gpids = gpids + revisedTabKeys 
     512gpids = gpids + revisedTabKeysff 
    488513ks = eervg.keys() 
    489514ks.sort() 
Note: See TracChangeset for help on using the changeset viewer.