11 #include "ioda/ObsDataVector.h"
12 #include "oops/util/missingValues.h"
19 static ObsFunctionMaker<ModelHeightAdjustedAirTemperature>
25 const eckit::LocalConfiguration & conf): invars_() {
42 std::vector<float> t2(
nlocs);
43 std::vector<float> ModelHeight(
nlocs);
44 std::vector<float> StationHeight(
nlocs);
46 in.
get(
Variable(
"air_temperature_at_2m@ObsValue"), t2);
47 in.
get(
Variable(
"surface_altitude@GeoVaLs"), ModelHeight);
53 for (
size_t jj = 0; jj <
nlocs; ++jj) {
57 out[0][jj] = t2[jj] +
Constants::Lclr*(StationHeight[jj] - ModelHeight[jj]);
ModelHeightAdjustedAirTemperature(const eckit::LocalConfiguration &=eckit::LocalConfiguration())
void compute(const ObsFilterData &, ioda::ObsDataVector< float > &) const
compute the result of the function
ModelHeightAdjustedAirTemperatureParameters parameters_
const ufo::Variables & requiredVariables() const
geovals required to compute the function
oops::RequiredParameter< Variable > elevation
Input observation station height to be used.
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< ModelHeightAdjustedAirTemperature > makerModelHeightAdjustedAirTemperature_("ModelHeightAdjustedAirTemperature")
static constexpr double Lclr