Skip to content

Commit

Permalink
HIMAN-359: Add 3x3 filtering to POT
Browse files Browse the repository at this point in the history
  • Loading branch information
mpartio committed May 7, 2024
1 parent f1e9405 commit 60399ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions himan-plugins/source/pot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ void pot::Calculate(shared_ptr<info<double>> myTargetInfo, unsigned short thread
POT = PoLift * PoThermoDyn * PoColdTop * PoMixedPhase * PoDepth * 100;
}

const himan::matrix<double> filter_kernel(3, 3, 1, MissingDouble(), 1 / 9.);

const auto smooth_pot =
numerical_functions::Filter2D<double>(myTargetInfo->Data(), filter_kernel, itsConfiguration->UseCuda());

myTargetInfo->Base()->data = move(smooth_pot);

myThreadedLogger.Info("[" + deviceType + "] Missing values: " + to_string(myTargetInfo->Data().MissingCount()) +
"/" + to_string(myTargetInfo->Data().Size()));
}

0 comments on commit 60399ca

Please sign in to comment.