20 static TransformMaker<Cal_WindSpeedAndDirection>
32 oops::Log::trace() <<
" --> Retrieve wind speed and direction"
34 oops::Log::trace() <<
" --> method: " <<
method() << std::endl;
35 oops::Log::trace() <<
" --> obsName: " <<
obsName() << std::endl;
39 std::vector<float> u, v;
45 if (!oops::allVectorsSameNonZeroSize(u, v)) {
46 oops::Log::warning() <<
"Vector sizes: "
47 << oops::listOfVectorSizes(u, v)
49 throw eckit::BadValue(
"At least one vector is the wrong size or empty out of "
53 std::vector<float> windSpeed(
nlocs), windFromDirection(
nlocs);
58 for (
size_t jobs = 0; jobs <
nlocs; ++jobs) {
60 if (!apply[jobs])
continue;
88 oops::Log::trace() <<
" --> Retrieve wind component"
90 oops::Log::trace() <<
" --> method: " <<
method() << std::endl;
91 oops::Log::trace() <<
" --> obsName: " <<
obsName() << std::endl;
95 std::vector<float> windSpeed, windFromDirection;
99 windFromDirection,
true);
101 if (!oops::allVectorsSameNonZeroSize(windSpeed, windFromDirection)) {
102 oops::Log::warning() <<
"Vector sizes: "
103 << oops::listOfVectorSizes(windSpeed, windFromDirection)
105 throw eckit::BadValue(
"At least one vector is the wrong size or empty out of "
106 "wind speed, and direction", Here());
114 for (
size_t jobs = 0; jobs <
nlocs; ++jobs) {
116 if (!apply[jobs])
continue;
void runTransform(const std::vector< bool > &apply) override
Run variable conversion.
Cal_WindComponents(const VariableTransformsParameters &options, const ObsFilterData &data, const std::shared_ptr< ioda::ObsDataVector< int >> &flags)
Cal_WindSpeedAndDirection(const VariableTransformsParameters &options, const ObsFilterData &data, const std::shared_ptr< ioda::ObsDataVector< int >> &flags)
void runTransform(const std::vector< bool > &apply) override
Run variable conversion.
ObsFilterData provides access to all data related to an ObsFilter.
integer function nlocs(this)
Return the number of observational locations in this Locations object.
static TransformMaker< Cal_WindSpeedAndDirection > makerCal_WindSpeedAndDirection_("WindSpeedAndDirection")
static TransformMaker< Cal_WindComponents > makerCal_WindComponents_("WindComponents")