Changeset 376 for CMIP6dreqbuild
- Timestamp:
- 03/09/15 10:18:48 (7 years ago)
- Location:
- CMIP6dreqbuild/trunk/srcMisc
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CMIP6dreqbuild/trunk/srcMisc/dreqSX.py
r375 r376 2 2 import shelve, string, collections 3 3 from utils_wb import workbook, uniCleanFunc 4 import cmip5so 5 from sets import Set 4 6 5 7 vdate = "20150827" … … 110 112 ee_byvar[ ee_mip[k][-3] ].append( k ) 111 113 114 ## check cmip5 vs. standard output 115 s1 = Set() 116 for k in ee_miptables_vars_old.keys(): 117 if k[:6] == 'CMIP5_': 118 s2 = Set( ee_miptables_vars_old[k] ) 119 kk = k[6:] 120 s1.add( kk ) 121 assert cmip5so.so.has_key(kk ), 'Table %s not found in standard output' % kk 122 lnf = [] 123 for v in ee_miptables_vars_old[k]: 124 if not cmip5so.so[kk].a.has_key(v): 125 lnf.append(v) 126 if len(lnf) > 0: 127 print 'ERROR.010.0001: Variables not found in %s:: %s' % (kk,str(lnf)) 128 129 lnf = [] 130 for v in cmip5so.so[kk].a.keys(): 131 if not v in s2: 132 lnf.append(v) 133 if len(lnf) > 0: 134 print 'ERROR.010.0002: SO Variables not found in %s:: %s' % (kk,str(lnf)) 135 136 for s in cmip5so.so.keys(): 137 if not s in s1: 138 print 'ERROR.010.0002: Table %s not in old mip tables' % s 139 112 140 for s in shlist: 113 141 s.close() -
CMIP6dreqbuild/trunk/srcMisc/sx2.py
r375 r376 480 480 ## need to identify what is meant by group labels in "Request Scoping" -- now in eervg.keys() 481 481 ## 482 ## 29th July: loosin some links for groups of revised table items ....482 ## 29th July: loosing some links for groups of revised table items .... 483 483 ## 484 484 shb = shelve.open( 'dreq_consol_tables_reviewed_b_v20150708', 'r' ) 485 485 revisedTabKeys = shb.keys() 486 revisedTabKeys.sort() 487 revisedTabKeysff = [] 488 for 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 486 511 shb.close() 487 gpids = gpids + revisedTabKeys 512 gpids = gpids + revisedTabKeysff 488 513 ks = eervg.keys() 489 514 ks.sort()
Note: See TracChangeset
for help on using the changeset viewer.