Changeset 1270
- Timestamp:
- 16/10/18 15:26:28 (3 years ago)
- Location:
- CMIP6dreqbuild/trunk/src/framework/dreqPy
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
CMIP6dreqbuild/trunk/src/framework/dreqPy/dreq.py
r1241 r1270 4 4 2. Index 5 5 """ 6 import xml, string,collections6 import xml, collections 7 7 import xml.dom 8 8 import xml.dom.minidom -
CMIP6dreqbuild/trunk/src/framework/dreqPy/misc_utils.py
r1068 r1270 1 import collections, string ,os, sys1 import collections, os, sys 2 2 import logging 3 3 import time … … 126 126 print ( '%s: %s, %s' % (kk, ic.title, i.title) ) 127 127 kd += 1 128 if string.find( ic.modeling_realm,' ' ) != -1:129 for x in string.split( ic.modeling_realm):130 r.add( string.strip( x) )128 if ic.modeling_realm.find( ' ' ) != -1: 129 for x in ic.modeling_realm.split( ): 130 r.add( x.strip( ) ) 131 131 elif ic.modeling_realm not in ['__unset__','']: 132 132 r.add( ic.modeling_realm ) … … 161 161 for cmv in dq.inx.iref_by_sect[i.uid].a['CMORvar']: 162 162 ic = dq.inx.uid[cmv] 163 if string.find( ic.modeling_realm,' ' ) != -1:164 for x in string.split( ic.modeling_realm):165 r.add( string.strip( x) )163 if ic.modeling_realm.find( ' ' ) != -1: 164 for x in ic.modeling_realm.split( ): 165 r.add( x.strip( ) ) 166 166 elif ic.modeling_realm not in ['__unset__','']: 167 167 r.add( ic.modeling_realm ) … … 364 364 self.exrqi[id].add( i.uid ) 365 365 ks = sorted( list( self.expts.keys() ) ) 366 xx = string.join( ['%s: %s' % (k,len(self.expts[k])) for k in ks], ', ')366 xx = ', '.join( ['%s: %s' % (k,len(self.expts[k])) for k in ks] ) 367 367 print ( '%s:: %s' % (mip,xx) ) 368 368 -
CMIP6dreqbuild/trunk/src/framework/dreqPy/overviewTabs.py
r1257 r1270 1 2 import collections, string, os 1 import collections, os 3 2 import xlsxwriter 4 3 -
CMIP6dreqbuild/trunk/src/framework/dreqPy/scope.py
r1264 r1270 28 28 import dreqPy.misc_utils as misc_utils 29 29 30 import collections, string,operator30 import collections, operator 31 31 import sys, os 32 32 … … 1801 1801 1802 1802 if 'mcfg' in self.adict: 1803 ll = s tring.split( self.adict['mcfg'],',' )1803 ll = self.adict['mcfg'].split( ',' ) 1804 1804 assert len(ll) == 7, 'Length of model configuration argument must be 7 comma separated integers: %s' % self.adict['mcfg'] 1805 1805 lli = [ int(x) for x in ll] -
CMIP6dreqbuild/trunk/src/framework/dreqPy/scope_utils.py
r1261 r1270 1 import collections , string1 import collections 2 2 try: 3 3 import table_utils -
CMIP6dreqbuild/trunk/src/framework/dreqPy/simpleCheck.py
r794 r1270 10 10 ##DOC_DIR = __init__.DOC_DIR 11 11 12 import string, os, sys, collections 12 import os, sys, collections 13 14 usingPython3 = sys.version_info >= (3,0) 13 15 14 16 try: … … 145 147 os.unlink( '.simpleCheck_check2.txt' ) 146 148 149 def _getCmd(self): 150 if self.entryPoint == 'drq': 151 self.cmd = 'drq' 152 else: 153 if usingPython3: 154 self.cmd = 'python3 dreqCmdl.py' 155 else: 156 self.cmd = 'python dreqCmdl.py' 157 158 def _ch05_checkMcfg(self): 159 self._getCmd() 160 thisCmd = '%s -m CMIP -e historical --mcfg 259200,60,64800,40,20,5,100' % self.cmd 161 os.popen( '%s 2> .simpleCheck_check5_err.txt 1>.simpleCheck_check5.txt' % thisCmd ).readlines() 162 163 ii = open( '.simpleCheck_check5_err.txt' ).readlines() 164 if len(ii) > 0: 165 print ( 'WARNING[005]: failed to get volume est. with command line call' ) 166 self.ok = False 167 ##self._clear_ch04() 168 return 169 170 ii = open( '.simpleCheck_check5.txt' ).readlines() 171 if len(ii) < 1: 172 print ( 'WARNING[006]: failed to get get volume est. with command line call' ) 173 self.ok = False 174 ##self._clear_ch04() 175 return 176 177 self.ok = True 178 return 179 147 180 def _ch04_checkCmd(self): 148 181 import os 149 if self.entryPoint == 'drq': 150 cmd = 'drq' 151 else: 152 cmd = 'python dreqCmdl.py' 153 154 os.popen( '%s -v 2> .simpleCheck_check2_err.txt 1>.simpleCheck_check2.txt' % cmd ).readlines() 182 self._getCmd() 183 184 os.popen( '%s -v 2> .simpleCheck_check2_err.txt 1>.simpleCheck_check2.txt' % self.cmd ).readlines() 155 185 156 186 ii = open( '.simpleCheck_check2_err.txt' ).readlines()
Note: See TracChangeset
for help on using the changeset viewer.