Changeset 285 in lmdz_wrf
- Timestamp:
- Feb 25, 2015, 2:52:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r284 r285 10584 10584 # box stats values 10585 10585 maskedvals = ma.masked_values (varvalst, fillValue) 10586 statvarvals[it,:,0] = varvalst[box2,box2]10587 statvarvals[it,:,1] = maskedvals.min()10588 statvarvals[it,:,2] = maskedvals.max()10589 statvarvals[it,:,3] = maskedvals.mean()10590 10586 maskedvals2 = maskedvals*maskedvals 10591 statvarvals[it,:,4] = maskedvals2.mean() 10592 statvarvals[it,:,5] = np.sqrt(statvarvals[it,:,4] - \ 10593 statvarvals[it,:,3]*statvarvals[it,:,3]) 10594 10587 for iz in range(dimz): 10588 statvarvals[it,iz,0] = varvalst[iz,box2,box2] 10589 statvarvals[it,iz,1] = np.min(varvalst[iz,:,:]) 10590 statvarvals[it,iz,2] = np.max(varvalst[iz,:,:]) 10591 statvarvals[it,iz,3] = np.mean(varvalst[iz,:,:]) 10592 statvarvals[it,iz,4] = maskedvals2[iz,:,:].mean() 10593 statvarvals[it,iz,5] = np.sqrt(statvarvals[it,iz,4] - \ 10594 statvarvals[it,iz,3]*statvarvals[it,iz,3]) 10595 10595 else: 10596 10596 slicev.append(slice(0,dimz)) … … 10616 10616 10617 10617 # box stats values 10618 statvarvals[it,:,0] = varvalst[:,box2,box2]10619 10618 for iz in range(dimz): 10619 statvarvals[it,:,0] = varvalst[:,box2,box2] 10620 10620 statvarvals[it,iz,1] = np.min(varvalst[iz,:,:]) 10621 10621 statvarvals[it,iz,2] = np.max(varvalst[iz,:,:]) 10622 10622 statvarvals[it,iz,3] = np.mean(varvalst[iz,:,:]) 10623 statvarvals[it,iz,4] = np.mean(varvalst*varvalst[iz,:,:]) 10623 statvarvals[it,iz,4] = np.mean(varvalst[iz,:,:]* \ 10624 varvalst[iz,:,:]) 10624 10625 statvarvals[it,iz,5] = np.sqrt(statvarvals[it,iz,4] - \ 10625 10626 statvarvals[it,iz,3]*statvarvals[it,iz,3]) … … 10652 10653 maskedvals = ma.masked_values (rvarvalst, fillValue) 10653 10654 maskedvals2 = maskedvals*maskedvals 10654 rtatvarvals[it,:,0] = varvalst[:,box2,box2]10655 10655 for iz in range(dimz): 10656 rtatvarvals[it,:,0] = varvalst[:,box2,box2] 10656 10657 rtatvarvals[it,iz,1] = np.min(varvalst[iz,:,:]) 10657 10658 rtatvarvals[it,iz,2] = np.max(varvalst[iz,:,:]) … … 10685 10686 # circle stats values 10686 10687 maskedvals = ma.masked_values (rvarvalst, fillValue) 10687 rstatvarvals[it,:,0] = rvarvalst[Nrad,Nrad]10688 rstatvarvals[it,:,1] = maskedvals.min()10689 rstatvarvals[it,:,2] = maskedvals.max()10690 rstatvarvals[it,:,3] = maskedvals.mean()10691 10688 maskedvals2 = maskedvals*maskedvals 10692 rstatvarvals[it,:,4] = maskedvals2.mean() 10693 rstatvarvals[it,:,5] = np.sqrt(rstatvarvals[it,:,4] - \ 10694 rstatvarvals[it,:,3]*rstatvarvals[it,:,3]) 10689 for iz in range(dimz): 10690 rstatvarvals[it,iz,0] = rvarvalst[iz,Nrad,Nrad] 10691 rstatvarvals[it,iz,1] = maskedvals.min() 10692 rstatvarvals[it,iz,2] = maskedvals.max() 10693 rstatvarvals[it,iz,3] = maskedvals.mean() 10694 rstatvarvals[it,iz,4] = maskedvals2[iz,:,:].mean() 10695 rstatvarvals[it,iz,5] = np.sqrt(rstatvarvals[it,iz,4] - \ 10696 rstatvarvals[it,iz,3]*rstatvarvals[it,:,3]) 10695 10697 10696 10698 # print 'statistics:',rstatvarvals[it,:]
Note: See TracChangeset
for help on using the changeset viewer.