11 #include "ioda/ObsDataVector.h"
12 #include "oops/util/missingValues.h"
19 static ObsFunctionMaker<ModelHeightAdjustedEastwardMarineWind>
27 const eckit::LocalConfiguration & conf,
const Variable &windComponent)
28 : invars_(), wind_(windComponent) {
40 std::vector<float> WindComponent(
nlocs);
41 std::vector<float> StationHeight(
nlocs);
44 in.
get(
Variable(
"anemometer_height@MetaData"), StationHeight);
47 const float a = 1.0/0.0016;
48 const float ref_height = std::log(10.0*a);
51 for (
size_t jj = 0; jj <
nlocs; ++jj) {
52 if (StationHeight[jj] ==
missing || WindComponent[jj] ==
missing) {
55 float ScaleFactor = ref_height/std::log(
std::abs(StationHeight[jj])*a);
56 out[0][jj] = WindComponent[jj]*ScaleFactor;
ModelHeightAdjustedMarineWindComponent(const eckit::LocalConfiguration &conf, const Variable &windComponent)
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
const ufo::Variables & requiredVariables() const
geovals required to compute the function
ObsFilterData provides access to all data related to an ObsFilter.
size_t nlocs() const
Returns the number of locations in the associated ObsSpace.
void get(const Variable &varname, std::vector< float > &values) const
Fills a std::vector with values of the specified variable.
integer function nlocs(this)
Return the number of observational locations in this Locations object.
static ObsFunctionMaker< ModelHeightAdjustedEastwardMarineWind > eastwardMaker_("ModelHeightAdjustedEastwardMarineWind")
static ObsFunctionMaker< ModelHeightAdjustedNorthwardMarineWind > northwardMaker_("ModelHeightAdjustedNorthwardMarineWind")
util::Duration abs(const util::Duration &duration)