UFO
|
Assigns specified values to elements of specified variables selected by the where statement. More...
#include <VariableAssignment.h>
Public Types | |
typedef VariableAssignmentParameters | Parameters_ |
Public Member Functions | |
VariableAssignment (ioda::ObsSpace &obsdb, const Parameters_ ¶meters, std::shared_ptr< ioda::ObsDataVector< int > > flags, std::shared_ptr< ioda::ObsDataVector< float > > obserr) | |
![]() | |
ObsProcessorBase (ioda::ObsSpace &, bool deferToPost, std::shared_ptr< ioda::ObsDataVector< int > >, std::shared_ptr< ioda::ObsDataVector< float > >) | |
~ObsProcessorBase () | |
void | preProcess () override |
void | priorFilter (const GeoVaLs &) override |
void | postFilter (const ioda::ObsVector &, const ioda::ObsVector &, const ObsDiagnostics &) override |
oops::Variables | requiredVars () const override |
oops::Variables | requiredHdiagnostics () const override |
Static Public Member Functions | |
static const std::string | classname () |
Private Member Functions | |
void | print (std::ostream &) const override |
void | doFilter () const override |
Private Attributes | |
Parameters_ | parameters_ |
Additional Inherited Members | |
![]() | |
ioda::ObsSpace & | obsdb_ |
std::shared_ptr< ioda::ObsDataVector< int > > | flags_ |
std::shared_ptr< ioda::ObsDataVector< float > > | obserr_ |
ufo::Variables | allvars_ |
ObsFilterData | data_ |
Assigns specified values to elements of specified variables selected by the where statement.
The values can be constants or vectors generated by ObsFunctions. If the variables don't exist yet, they will be created; in this case elements not selected by the where clause will be initialized with the missing value markers.
If the modified variable belongs to the DerivedObsValue
group and is a simulated variable, QC flags previously set to missing
are reset to pass
at locations where a valid obs value has been assigned. Conversely, QC flags previously set to pass
are reset to missing
at locations where the obs value has been set to missing.
Example 1: Create new variables air_temperature@GrossErrorProbability
and relative_humidity@GrossErrorProbability
and set them to 0.1 at all locations.
filter: Variable Assignment assignments: - name: air_temperature@GrossErrorProbability type: float # type must be specified if the variable doesn't already exist value: 0.1 - name: relative_humidity@GrossErrorProbability type: float value: 0.1
Example 2: Set air_temperature@GrossErrorProbability
to 0.05 at all locations in the tropics.
filter: Variable Assignment where: - variable: name: latitude@MetaData minvalue: -30 maxvalue: 30 assignments: - name: air_temperature@GrossErrorProbability value: 0.05
Example 3: Set relative_humidity@GrossErrorProbability
to values computed by an ObsFunction (0.1 in the southern extratropics and 0.05 in the northern extratropics, with a linear transition in between).
filter: Variable Assignment assignments: - name: relative_humidity@GrossErrorProbability function: name: ObsErrorModelRamp@ObsFunction options: xvar: name: latitude@MetaData x0: [-30] x1: [30] err0: [0.1] err1: [0.05]
Definition at line 141 of file VariableAssignment.h.
The type of parameters accepted by the constructor of this filter. This typedef is used by the FilterFactory.
Definition at line 146 of file VariableAssignment.h.
ufo::VariableAssignment::VariableAssignment | ( | ioda::ObsSpace & | obsdb, |
const Parameters_ & | parameters, | ||
std::shared_ptr< ioda::ObsDataVector< int > > | flags, | ||
std::shared_ptr< ioda::ObsDataVector< float > > | obserr | ||
) |
|
inlinestatic |
Definition at line 148 of file VariableAssignment.h.
|
overrideprivatevirtual |
Implements ufo::ObsProcessorBase.
Definition at line 386 of file VariableAssignment.cc.
|
overrideprivate |
Definition at line 402 of file VariableAssignment.cc.
|
private |
Definition at line 158 of file VariableAssignment.h.