diff --git a/met/src/basic/vx_util/data_plane.cc b/met/src/basic/vx_util/data_plane.cc index 994c988029..618627dd63 100644 --- a/met/src/basic/vx_util/data_plane.cc +++ b/met/src/basic/vx_util/data_plane.cc @@ -406,23 +406,71 @@ void DataPlane::censor(const ThreshArray &censor_thresh, /////////////////////////////////////////////////////////////////////////////// +void DataPlane::anomaly(const DataPlane &mn) { + + // Check dimensions + if(Nxy != mn.Nxy) { + mlog << Error << "\nDataPlane::anomaly() -> " + << "the data dimensions do not match: (" + << Nx << ", " << Ny << ") != (" + << mn.Nx << ", " << mn.Ny << ")!\n\n"; + exit(1); + } -void DataPlane::replace_bad_data(const double value) + // Subtract the mean + for(int i=0; i " + << "the data dimensions do not match: (" + << Nx << ", " << Ny << ") != (" + << mn.Nx << ", " << mn.Ny << ") != (" + << sd.Nx << ", " << sd.Ny << ")!\n\n"; + exit(1); + } - if ( is_bad_data(Data[j]) ) Data[j] = value; + // Subtract the mean and divide by the standard deviation + for(int i=0; i