Esempio n. 1
0
 def _get_radrain(self,var,bmap):
     indx = self._get_index('rain')
     radrain = get_data(ibits(bmap,ipos=1,ilen=1),indx=indx)        
     good = (radrain == 1)        
     radrain[~good] = self.missing
     intrain = get_data(ibits(bmap,ipos=2,ilen=6),indx=indx)
     nonrain = where(intrain == 0)
     adjrain = where(intrain == 1)
     hasrain = where(intrain > 1)
     intrain[nonrain] = 0.0
     intrain[adjrain] = -1.0
     intrain[hasrain] = 0.5*(intrain[hasrain]-1)
     radrain[good] = intrain[good]
     bad = is_bad(get_data(bmap,indx=0))
     radrain[bad] = self.missing
     return radrain
Esempio n. 2
0
 def _get_scatflag(self,var,bmap):
     indx = self._get_index('rain')
     scatflag = get_data(ibits(bmap,ipos=0,ilen=1),indx=indx)
     bad = is_bad(get_data(bmap,indx=0))
     scatflag[bad] = self.missing
     return scatflag