Skip to content

Commit

Permalink
apps/Radx/RadxRate and RadxPid - Worker threads - fixing censoring of…
Browse files Browse the repository at this point in the history
… non-weather gates
  • Loading branch information
mike-dixon committed Dec 28, 2022
1 parent 08e0285 commit 6d38a83
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
22 changes: 12 additions & 10 deletions codebase/apps/Radx/src/RadxPid/Worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,18 @@ void Worker::_censorNonWeather(RadxField &field)
{

const int *pid = _pid.getPid();
for (size_t ii = 0; ii < _nGates; ii++) {
int ptype = pid[ii];
if (ptype == NcarParticleId::FLYING_INSECTS ||
ptype == NcarParticleId::SECOND_TRIP ||
ptype == NcarParticleId::GROUND_CLUTTER ||
ptype < NcarParticleId::CLOUD ||
ptype > NcarParticleId::SATURATED_SNR) {
field.setGateToMissing(ii);
}
} // ii
for (size_t igate = 0; igate < _nGates; igate++) {
int ptype = pid[igate];
if (ptype <= 0) {
field.setGateToMissing(igate);
} else {
for (int it = 0; it < _params.non_weather_pid_types_n; it++) {
if (ptype == _params._non_weather_pid_types[it]) {
field.setGateToMissing(igate);
}
} // it
} // if (ptype <= 0)
} // igate

}

Expand Down
14 changes: 9 additions & 5 deletions codebase/apps/Radx/src/RadxRate/Worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,15 @@ void Worker::_censorNonWeather(RadxField &field)
const int *pid = _pid.getPid();
for (size_t igate = 0; igate < _nGates; igate++) {
int ptype = pid[igate];
for (int it = 0; it < _params.non_weather_pid_types_n; it++) {
if (ptype == _params._non_weather_pid_types[it]) {
field.setGateToMissing(igate);
}
}
if (ptype <= 0) {
field.setGateToMissing(igate);
} else {
for (int it = 0; it < _params.non_weather_pid_types_n; it++) {
if (ptype == _params._non_weather_pid_types[it]) {
field.setGateToMissing(igate);
}
} // it
} // if (ptype <= 0)
} // igate

}
Expand Down

0 comments on commit 6d38a83

Please sign in to comment.