Changeset 527 for CMIP6dreqbuild/trunk/src
- Timestamp:
- 12/12/15 18:52:35 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMIP6dreqbuild/trunk/src/workbook/importShDreq2.py
r526 r527 183 183 for d in dil: 184 184 thiss.removeChild(d) 185 kk = ['tables','label','altLabel','description','standardName','title','axis','units','isIndex','coords','bounds','direction','valid Min','validMax','type','positive','value','boundsValues','requested','boundsRequested','tolRequested','isGrid' ]185 kk = ['tables','label','altLabel','description','standardName','title','axis','units','isIndex','coords','bounds','direction','valid_min','valid_max','type','positive','value','boundsValues','requested','boundsRequested','tolRequested','isGrid' ] 186 186 for j in self.cmDims.ss.keys(): 187 187 item = self.doc.createElement( 'item' ) 188 188 for i in range(len(kk)): 189 item.setAttribute( kk[i], str( self.cmDims.ss[j][i] ) ) 189 if kk[i] in ['valid_min','valid_max']: 190 if str( self.cmDims.ss[j][i] ) != '': 191 item.setAttribute( kk[i], str( self.cmDims.ss[j][i] ) ) 192 else: 193 item.setAttribute( kk[i], str( self.cmDims.ss[j][i] ) ) 190 194 uid = 'dim:%s' % str( self.cmDims.ss[j][1] ) 191 195 item.setAttribute( 'uid', uid ) … … 1597 1601 thisl = string.replace( r[k], '_', '' ) 1598 1602 item.setAttribute( n, thisl ) 1603 elif n in ["valid_min","valid_max"]: 1604 if str(r[k]) != "": 1605 item.setAttribute( n, str(r[k]) ) 1599 1606 elif n == "frequency": 1600 1607 fr = freqmap.get( str(r[k]), str(r[k]) )
Note: See TracChangeset
for help on using the changeset viewer.