Changeset 51


Ignore:
Timestamp:
18/07/13 10:24:33 (6 years ago)
Author:
mjuckes
Message:

corrected time period check for 3hr,6hr; removed potential mis-handling of bad file names

Location:
FCC2/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • FCC2/trunk/source/fcc_utils.py

    r49 r51  
    197197###### 
    198198###### 
    199       qfns = self.qcc.fileNameSegments 
    200       ns = {} 
    201       for k in range(len(fbits)):  
     199      else: 
     200       qfns = self.qcc.fileNameSegments 
     201       ns = {} 
     202       for k in range(len(fbits)):  
    202203         ns['fn_%s' % qfns.segments[k][1]] = fbits[k] 
    203204         if qfns.segments[k][0] == 'vocabulary': 
     
    291292           raise 'segment test id %s not recognised' % qfns.segments[k][0] 
    292293################################## 
    293       versionned = False 
    294       if not versionned: 
     294       versionned = False 
     295       if not versionned: 
    295296        for k in self.qcc.datasets.keys(): 
    296297          if self.qcc.datasets[k].datasetIdArg == 'fileNameBits': 
     
    663664                       tt = None 
    664665                     v = string.strip( v, "'" ) 
    665                      cr0.append( (re.compile( v % self.gc ),v % self.gc,tt) ) 
     666                     try: 
     667                       cr0.append( (re.compile( v % self.gc ),v % self.gc,tt) ) 
     668                     except: 
     669                       print 'Error trying to compile: ', v % self.gc 
     670                       print 'Pattern: ',v 
     671                       raise 
    666672                     ## print 'compiled ' +  v % self.gc, tt 
    667673                 cr.append( (cc,cr0) ) 
  • FCC2/trunk/work/cordex_vocabs/cordex_time_constraints.txt

    r50 r51  
    22sem: '(?P<d>[0-9]{3})012-(?P<e>[0-9]{3})011' '(?P<startyear>[0-9]{4})(12|03|06|09)-(?P<e>[0-9]{3}0)11'  '(?P<d>[0-9]{3})012-(?P<endyear>[0-9]{4})(11|02|05|08)' 
    33day: {$e==$d+1}'(?P<d>[0-9]{3})60101-(?P<e>[0-9]{3})012%(enddec)s' {$e==$d}'(?P<d>[0-9]{3})10101-(?P<e>[0-9]{3})512%(enddec)s' {$e<=$startyear+4}'(?P<startyear>[0-9]{4})(?P<d1>[0-9]{4})-(?P<e>[0-9]{3}(0|5))12%(enddec)s' {$d1<=$startyear+4}'(?P<startyear>[0-9]{4})(?P<d1>[0-9]{4})-(?P<e>[0-9]{3}(0|5))12%(enddec)s'  {$endyear<=$d+5}'(?P<d>[0-9]{3}(1|6))0101-(?P<endyear>[0-9]{4})(?P<d1>[0-9]{4})' 
    4 3hr,6hr: '(?P<d>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})12%(enddec)s(?P<h2>[0-9]{2})' {$s=$startyear}'(?P<startyear>[0-9]{4})(?P<h1>[0-9]{6})-(?P<s>[0-9]{4})12%(enddec)s(?P<h2>[0-9]{2})' {$e==$endyear}'(?P<endyear>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})(?P<h2>[0-9]{6})' 
     43hr,6hr: {$e==$d}'(?P<d>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})12%(enddec)s(?P<h2>[0-9]{2})' {$e==$d+1}'(?P<d>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})010100' {$s==$startyear}'(?P<startyear>[0-9]{4})(?P<h1>[0-9]{6})-(?P<s>[0-9]{4})12%(enddec)s(?P<h2>[0-9]{2})' {$e==$endyear}'(?P<endyear>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})(?P<h2>[0-9]{6})' {$e==$startyear+1}'(?P<startyear>[0-9]{4})(?P<h1>[0-9]{6})-(?P<e>[0-9]{4})010100' {$e==$endyear+1}'(?P<endyear>[0-9]{4})0101(?P<h1>[0-9]{2})-(?P<e>[0-9]{4})010100' 
Note: See TracChangeset for help on using the changeset viewer.