Changeset 1014 for trunk/UTIL


Ignore:
Timestamp:
Jul 29, 2013, 10:46:34 AM (11 years ago)
Author:
tnavarro
Message:

there was a bug in computations with meanarea when quadratic mean option was added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py

    r1011 r1014  
    17091709        if self.method_y == "comp":
    17101710            if self.verbose: print "**** OK. Computing over y axis."
    1711             if "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=2)
     1711            if self.compute == "meanarea": self.field = ppcompute.sum(self.field,axis=2)
     1712            elif "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=2)
    17121713            elif self.compute == "min": self.field = ppcompute.min(self.field,axis=2)
    17131714            elif self.compute == "max": self.field = ppcompute.max(self.field,axis=2)
    1714             elif self.compute == "meanarea": self.field = ppcompute.sum(self.field,axis=2)
    17151715            else: print "!! ERROR !! operation not supported." ; exit()
    17161716            ny = 1 ; self.field = np.reshape(self.field,(nt,nz,ny,nx))
     
    17181718        if self.method_x == "comp":
    17191719            if self.verbose: print "**** OK. Computing over x axis."
    1720             if "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=3)
     1720            if self.compute == "meanarea": self.field = ppcompute.sum(self.field,axis=3)
     1721            elif "mean" in self.compute: self.field = ppcompute.mean(self.field,axis=3)
    17211722            elif self.compute == "min": self.field = ppcompute.min(self.field,axis=3)
    17221723            elif self.compute == "max": self.field = ppcompute.max(self.field,axis=3)
    1723             elif self.compute == "meanarea": self.field = ppcompute.sum(self.field,axis=3)
    17241724            else: print "!! ERROR !! operation not supported." ; exit()
    17251725            nx = 1 ; self.field = np.reshape(self.field,(nt,nz,ny,nx))
Note: See TracChangeset for help on using the changeset viewer.