Changeset 2170 in lmdz_wrf for trunk/tools
- Timestamp:
- Oct 8, 2018, 3:19:17 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2166 r2170 5616 5616 self.stdv[t]: temporal standard deviation at each grid point 5617 5617 self.anomv[t]: temporal anomaly from the whole mean at each grid point 5618 self.precen[t]: temporal percentiles at each grid point 5618 5619 """ 5619 5620 … … 5633 5634 self.mean2v = None 5634 5635 self.stdv = None 5636 self.percen = None 5635 5637 else: 5636 5638 dimx = vals.shape[2] … … 5638 5640 stats=np.zeros((dimy,dimx,5), dtype=np.float) 5639 5641 absmean = np.mean(vals,axis=0) 5642 pecents = np.zeros((20,dimy,dimx), dtype=np.float) 5640 5643 5641 5644 stats[:,:,0]=np.min(vals, axis=0) … … 5649 5652 stats = np.where(stats is np.inf, fillValue, stats) 5650 5653 stats = np.where(stats is None, fillValue, stats) 5654 5655 for j in range(dimy): 5656 for i in range(dimx): 5657 percents[:,j,i] = Quantiles(vals[:,j,i],20).quantilesv 5651 5658 5652 5659 self.minv=stats[:,:,0] … … 5656 5663 self.stdv=np.sqrt(stats[:,:,3]-stats[:,:,2]*stats[:,:,2]) 5657 5664 self.anomv=stats[:,:,4] 5665 self.percen=percents 5658 5666 5659 5667 return
Note: See TracChangeset
for help on using the changeset viewer.