Ignore:
Timestamp:
24/11/16 15:59:11 (4 years ago)
Author:
mjuckes
Message:

further bugs in spreadsheet generation fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMIP6dreqbuild/trunk/src/framework/dreqPy/scope.py

    r877 r878  
    221221        elif vd[:4] == 'alev': 
    222222          nz = self.mcfg['nla'] 
    223         elif vd in ['slevel','sdepth']: 
     223        elif vd in ['slevel']: 
    224224          nz = self.mcfg['nls'] 
     225        elif vd in ['snowdepth','sdepth']: 
     226          nz = 5 
    225227        elif vd == 'aslevel': 
    226228          nz = self.mcfg['nlas'] 
     
    487489        for iu in self.dq.inx.iref_by_sect[rl.uid].a['requestItem']: 
    488490          i = self.dq.inx.uid[iu] 
    489           if iu in self.rqiExp: 
    490             for e in self.rqiExp[iu][1]: 
    491               if (ex == None or e in ex) and (exBlack == None or e not in exBlack): 
    492                 this = self.rqiExp[iu][1][e] 
    493                 if this != None: 
    494                   thisns = this[-3] 
    495                   thisny = this[-2] 
    496                   thisne = this[-1] 
    497                   ##cc[ (rl.refid,e,grd) ].add( filter1( thisns*thisny*thisne, i.nymax) ) 
    498                   cc[ (rl.refid,e,grd) ].add( thisns*thisny*thisne ) 
    499                   if self.rqiExp[iu][4] != None: 
    500                     ccts[(rl.refid,e)][thisns*thisny*thisne] = self.rqiExp[iu][4] 
     491 
     492## 
     493## apply "treset" filter to request items linked to this group. 
     494## 
     495          if self.tierMax < 0 or 'treset' not in i.__dict__ or i.treset <= self.tierMax: 
     496            if iu in self.rqiExp: 
     497              for e in self.rqiExp[iu][1]: 
     498                if (ex == None or e in ex) and (exBlack == None or e not in exBlack): 
     499                  this = self.rqiExp[iu][1][e] 
     500                  if this != None: 
     501                    thisns = this[-3] 
     502                    thisny = this[-2] 
     503                    thisne = this[-1] 
     504                    ##cc[ (rl.refid,e,grd) ].add( filter1( thisns*thisny*thisne, i.nymax) ) 
     505                    cc[ (rl.refid,e,grd) ].add( thisns*thisny*thisne ) 
     506                    if self.rqiExp[iu][4] != None: 
     507                      ccts[(rl.refid,e)][thisns*thisny*thisne] = self.rqiExp[iu][4] 
     508 
    501509    ee = collections.defaultdict( dict ) 
    502510 
     
    10831091    else: 
    10841092      cmv1, cmvts1 = self.cmvByInvMip(mip,pmax=pmax,includeYears=True,exptFilter=self.exptFilter,exptFilterBlack=self.exptFilterBlack) 
    1085       cmv2, self.cmvts = self.cmvByMip('TOTAL',pmax=pmax,includeYears=True,exptFilter=self.exptFilter,exptFilterBlack=self.exptFilterBlack) 
     1093      cmv2, cmvts2 = self.cmvByMip('TOTAL',pmax=pmax,includeYears=True,exptFilter=self.exptFilter,exptFilterBlack=self.exptFilterBlack) 
    10861094      cmv = self.differenceSelectedCmvDict(  cmv1, cmv2 ) 
    10871095  
Note: See TracChangeset for help on using the changeset viewer.