UFO
ufo::InterpolateDataFromFile Class Reference

A predictor returning values produced by the DrawValueFromFile ObsFunction. More...

#include <InterpolateDataFromFile.h>

Inheritance diagram for ufo::InterpolateDataFromFile:
Collaboration diagram for ufo::InterpolateDataFromFile:

Public Types

typedef InterpolateDataFromFileParameters Parameters_
 

Public Member Functions

 InterpolateDataFromFile (const Parameters_ &, const oops::Variables &)
 
void compute (const ioda::ObsSpace &, const GeoVaLs &, const ObsDiagnostics &, ioda::ObsVector &) const override
 compute the predictor More...
 
- Public Member Functions inherited from ufo::PredictorBase
 PredictorBase (const PredictorParametersBase &, const oops::Variables &)
 
virtual ~PredictorBase ()=default
 
const oops::Variables & requiredGeovars () const
 geovars names required to compute the predictor More...
 
const oops::Variables & requiredHdiagnostics () const
 hdiags names required to compute the predictor More...
 
std::string & name ()
 predictor name More...
 
const std::string & name () const
 

Private Attributes

std::map< std::string, std::unique_ptr< DrawValueFromFile< float > > > obsFunctions_
 

Additional Inherited Members

- Protected Attributes inherited from ufo::PredictorBase
oops::Variables vars_
 variables that will be bias-corrected using this predictor More...
 
oops::Variables geovars_
 required GeoVaLs More...
 
oops::Variables hdiags_
 required ObsDiagnostics More...
 

Detailed Description

A predictor returning values produced by the DrawValueFromFile ObsFunction.

Let's start with a simple example. Suppose this predictor is configured with the following YAML snippet:

name: interpolate_data_from_file
options:
corrected variables:
- name: air_temperature
file: Data/ufo/testinput_tier_1/air_temperature_bias.nc4
interpolation:
- name: station_id@MetaData
method: exact

and the air_temperature_bias.nc4 file contains a 1D array air_temperature@ObsBias indexed by a station_id@MetaData coordinate. The DrawValueFromFile ObsFunction will then load this file and for each location produce the element of the air_temperature@ObsBias array corresponding to the element of the station_id@MetaData array matching the value of the station_id@MetaData ObsSpace variable at that location. This will also be the value produced by this predictor.

The predictor will produce zeros for all bias-corrected variables missing from the corrected variables list.

It is possible to make the bias correction dependent on more than one ObsSpace variable and to use a different matching method than exact. For more details, see the documentation of DrawValueFromFile and DataExtractor.

Definition at line 74 of file InterpolateDataFromFile.h.

Member Typedef Documentation

◆ Parameters_

The type of parameters accepted by the constructor of this predictor. This typedef is used by the PredictorFactory.

Definition at line 78 of file InterpolateDataFromFile.h.

Constructor & Destructor Documentation

◆ InterpolateDataFromFile()

ufo::InterpolateDataFromFile::InterpolateDataFromFile ( const Parameters_ parameters,
const oops::Variables &  vars 
)

Definition at line 59 of file InterpolateDataFromFile.cc.

Here is the call graph for this function:

Member Function Documentation

◆ compute()

void ufo::InterpolateDataFromFile::compute ( const ioda::ObsSpace &  ,
const GeoVaLs ,
const ObsDiagnostics ,
ioda::ObsVector &   
) const
overridevirtual

compute the predictor

Implements ufo::PredictorBase.

Definition at line 81 of file InterpolateDataFromFile.cc.

Here is the call graph for this function:

Member Data Documentation

◆ obsFunctions_

std::map<std::string, std::unique_ptr<DrawValueFromFile<float> > > ufo::InterpolateDataFromFile::obsFunctions_
private

obsFunctions_[varName] is the ObsFunction that will calculate the predictions for variable varName.

Definition at line 93 of file InterpolateDataFromFile.h.


The documentation for this class was generated from the following files: