OOPS
oops::CostJo< MODEL, OBS > Class Template Reference

Jo Cost Function. More...

#include <CostJo.h>

Inheritance diagram for oops::CostJo< MODEL, OBS >:
Collaboration diagram for oops::CostJo< MODEL, OBS >:

Public Member Functions

 CostJo (const eckit::Configuration &, const eckit::mpi::Comm &, const util::DateTime &, const util::DateTime &, const eckit::mpi::Comm &ctime=oops::mpi::myself())
 Construct \( J_o\) from \( R\) and \( y_{obs}\). More...
 
 CostJo (const eckit::Configuration &, const util::DateTime &, const util::DateTime &, const ObsSpaces_ &)
 Constructor added for generic 1d-var under development in ufo. More...
 
virtual ~CostJo ()
 Destructor. More...
 
std::shared_ptr< PostBase< State_ > > initialize (const CtrlVar_ &, const eckit::Configuration &) override
 Initialize \( J_o\) before starting the integration of the model. More...
 
std::shared_ptr< PostBaseTLAD_initializeTraj (const CtrlVar_ &, const Geometry_ &, const eckit::Configuration &) override
 
double finalize () override
 Finalize \( J_o\) after the integration of the model. More...
 
void finalizeTraj () override
 
std::shared_ptr< PostBaseTLAD_setupTL (const CtrlInc_ &) const override
 Initialize \( J_o\) before starting the TL run. More...
 
std::shared_ptr< PostBaseTLAD_setupAD (std::shared_ptr< const GeneralizedDepartures >, CtrlInc_ &) const override
 Initialize \( J_o\) before starting the AD run. More...
 
std::unique_ptr< GeneralizedDeparturesmultiplyCovar (const GeneralizedDepartures &) const override
 Multiply by \( R\) and \( R^{-1}\). More...
 
std::unique_ptr< GeneralizedDeparturesmultiplyCoInv (const GeneralizedDepartures &) const override
 
std::unique_ptr< GeneralizedDeparturesnewDualVector () const override
 Provide new departure. More...
 
std::unique_ptr< GeneralizedDeparturesnewGradientFG () const override
 Return gradient at first guess ie \( R^{-1} {\cal H}(x^t ) - y\). More...
 
void resetLinearization () override
 Reset obs operator trajectory. More...
 
double printJo (const Departures_ &, const Departures_ &) const
 Print Jo. More...
 
const ObsSpaces_obspaces () const
 
- Public Member Functions inherited from oops::CostTermBase< MODEL, OBS >
virtual ~CostTermBase ()
 Destructor. More...
 

Private Types

typedef ControlVariable< MODEL, OBS > CtrlVar_
 
typedef ControlIncrement< MODEL, OBS > CtrlInc_
 
typedef Departures< OBS > Departures_
 
typedef Observations< OBS > Observations_
 
typedef Geometry< MODEL > Geometry_
 
typedef State< MODEL > State_
 
typedef Increment< MODEL > Increment_
 
typedef ObsErrors< OBS > ObsErrors_
 
typedef ObsSpaces< OBS > ObsSpaces_
 
typedef Observers< MODEL, OBS > Observers_
 
typedef ObserversTLAD< MODEL, OBS > ObserversTLAD_
 
typedef PostBaseTLAD< MODEL > PostBaseTLAD_
 
typedef QCData< OBS > QCData_
 

Private Attributes

eckit::LocalConfiguration obsconf_
 
ObsSpaces_ obspace_
 
Observations_ yobs_
 
std::unique_ptr< ObsErrors_Rmat_
 
std::unique_ptr< eckit::LocalConfiguration > currentConf_
 Configuration for current initialize/finalize pair. More...
 
std::unique_ptr< Departures_gradFG_
 Gradient at first guess : \( R^{-1} (H(x_{fg})-y_{obs}) \). More...
 
std::shared_ptr< Observers_pobs_
 Observers passed by \( J_o\) to the model during integration. More...
 
std::shared_ptr< ObserversTLAD_pobstlad_
 Linearized observation operators. More...
 
QCData_ qc_
 Storage for QC flags and obs error. More...
 

Detailed Description

template<typename MODEL, typename OBS>
class oops::CostJo< MODEL, OBS >

Jo Cost Function.

The CostJo class encapsulates the Jo term of the cost function. The Observers to be called during the model integration is managed inside the CostJo class.

Definition at line 53 of file CostJo.h.

Member Typedef Documentation

◆ CtrlInc_

template<typename MODEL , typename OBS >
typedef ControlIncrement<MODEL, OBS> oops::CostJo< MODEL, OBS >::CtrlInc_
private

Definition at line 56 of file CostJo.h.

◆ CtrlVar_

template<typename MODEL , typename OBS >
typedef ControlVariable<MODEL, OBS> oops::CostJo< MODEL, OBS >::CtrlVar_
private

Definition at line 55 of file CostJo.h.

◆ Departures_

template<typename MODEL , typename OBS >
typedef Departures<OBS> oops::CostJo< MODEL, OBS >::Departures_
private

Definition at line 57 of file CostJo.h.

◆ Geometry_

template<typename MODEL , typename OBS >
typedef Geometry<MODEL> oops::CostJo< MODEL, OBS >::Geometry_
private

Definition at line 59 of file CostJo.h.

◆ Increment_

template<typename MODEL , typename OBS >
typedef Increment<MODEL> oops::CostJo< MODEL, OBS >::Increment_
private

Definition at line 61 of file CostJo.h.

◆ ObsErrors_

template<typename MODEL , typename OBS >
typedef ObsErrors<OBS> oops::CostJo< MODEL, OBS >::ObsErrors_
private

Definition at line 62 of file CostJo.h.

◆ Observations_

template<typename MODEL , typename OBS >
typedef Observations<OBS> oops::CostJo< MODEL, OBS >::Observations_
private

Definition at line 58 of file CostJo.h.

◆ Observers_

template<typename MODEL , typename OBS >
typedef Observers<MODEL, OBS> oops::CostJo< MODEL, OBS >::Observers_
private

Definition at line 64 of file CostJo.h.

◆ ObserversTLAD_

template<typename MODEL , typename OBS >
typedef ObserversTLAD<MODEL, OBS> oops::CostJo< MODEL, OBS >::ObserversTLAD_
private

Definition at line 65 of file CostJo.h.

◆ ObsSpaces_

template<typename MODEL , typename OBS >
typedef ObsSpaces<OBS> oops::CostJo< MODEL, OBS >::ObsSpaces_
private

Definition at line 63 of file CostJo.h.

◆ PostBaseTLAD_

template<typename MODEL , typename OBS >
typedef PostBaseTLAD<MODEL> oops::CostJo< MODEL, OBS >::PostBaseTLAD_
private

Definition at line 66 of file CostJo.h.

◆ QCData_

template<typename MODEL , typename OBS >
typedef QCData<OBS> oops::CostJo< MODEL, OBS >::QCData_
private

Definition at line 67 of file CostJo.h.

◆ State_

template<typename MODEL , typename OBS >
typedef State<MODEL> oops::CostJo< MODEL, OBS >::State_
private

Definition at line 60 of file CostJo.h.

Constructor & Destructor Documentation

◆ CostJo() [1/2]

template<typename MODEL , typename OBS >
oops::CostJo< MODEL, OBS >::CostJo ( const eckit::Configuration &  joConf,
const eckit::mpi::Comm &  comm,
const util::DateTime &  winbgn,
const util::DateTime &  winend,
const eckit::mpi::Comm &  ctime = oops::mpi::myself() 
)

Construct \( J_o\) from \( R\) and \( y_{obs}\).

Definition at line 143 of file CostJo.h.

◆ CostJo() [2/2]

template<typename MODEL , typename OBS >
oops::CostJo< MODEL, OBS >::CostJo ( const eckit::Configuration &  joConf,
const util::DateTime &  winbgn,
const util::DateTime &  winend,
const ObsSpaces_ localobs 
)

Constructor added for generic 1d-var under development in ufo.

Definition at line 157 of file CostJo.h.

◆ ~CostJo()

template<typename MODEL , typename OBS >
virtual oops::CostJo< MODEL, OBS >::~CostJo ( )
inlinevirtual

Destructor.

Definition at line 80 of file CostJo.h.

Member Function Documentation

◆ finalize()

template<typename MODEL , typename OBS >
double oops::CostJo< MODEL, OBS >::finalize
overridevirtual

Finalize \( J_o\) after the integration of the model.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 186 of file CostJo.h.

Here is the call graph for this function:

◆ finalizeTraj()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::finalizeTraj
overridevirtual

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 261 of file CostJo.h.

◆ initialize()

template<typename MODEL , typename OBS >
std::shared_ptr< PostBase< State< MODEL > > > oops::CostJo< MODEL, OBS >::initialize ( const CtrlVar_ xx,
const eckit::Configuration &  conf 
)
overridevirtual

Initialize \( J_o\) before starting the integration of the model.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 172 of file CostJo.h.

Here is the call graph for this function:

◆ initializeTraj()

template<typename MODEL , typename OBS >
std::shared_ptr< PostBaseTLAD< MODEL > > oops::CostJo< MODEL, OBS >::initializeTraj ( const CtrlVar_ xx,
const Geometry_ ,
const eckit::Configuration &  conf 
)
overridevirtual

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 250 of file CostJo.h.

Here is the call graph for this function:

◆ multiplyCoInv()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::multiplyCoInv ( const GeneralizedDepartures v1) const
overridevirtual

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 305 of file CostJo.h.

◆ multiplyCovar()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::multiplyCovar ( const GeneralizedDepartures v1) const
overridevirtual

Multiply by \( R\) and \( R^{-1}\).

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 294 of file CostJo.h.

◆ newDualVector()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::newDualVector
overridevirtual

Provide new departure.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 315 of file CostJo.h.

◆ newGradientFG()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::newGradientFG
overridevirtual

Return gradient at first guess ie \( R^{-1} {\cal H}(x^t ) - y\).

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 326 of file CostJo.h.

◆ obspaces()

template<typename MODEL , typename OBS >
const ObsSpaces_& oops::CostJo< MODEL, OBS >::obspaces ( ) const
inline

Definition at line 116 of file CostJo.h.

Here is the caller graph for this function:

◆ printJo()

template<typename MODEL , typename OBS >
double oops::CostJo< MODEL, OBS >::printJo ( const Departures_ dy,
const Departures_ grad 
) const

Print Jo.

Definition at line 342 of file CostJo.h.

Here is the call graph for this function:

◆ resetLinearization()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::resetLinearization
overridevirtual

Reset obs operator trajectory.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 333 of file CostJo.h.

◆ setupAD()

template<typename MODEL , typename OBS >
std::shared_ptr< PostBaseTLAD< MODEL > > oops::CostJo< MODEL, OBS >::setupAD ( std::shared_ptr< const GeneralizedDepartures pv,
CtrlInc_ dx 
) const
overridevirtual

Initialize \( J_o\) before starting the AD run.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 279 of file CostJo.h.

Here is the call graph for this function:

◆ setupTL()

template<typename MODEL , typename OBS >
std::shared_ptr< PostBaseTLAD< MODEL > > oops::CostJo< MODEL, OBS >::setupTL ( const CtrlInc_ dx) const
overridevirtual

Initialize \( J_o\) before starting the TL run.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 268 of file CostJo.h.

Here is the call graph for this function:

Member Data Documentation

◆ currentConf_

template<typename MODEL , typename OBS >
std::unique_ptr<eckit::LocalConfiguration> oops::CostJo< MODEL, OBS >::currentConf_
private

Configuration for current initialize/finalize pair.

Definition at line 125 of file CostJo.h.

◆ gradFG_

template<typename MODEL , typename OBS >
std::unique_ptr<Departures_> oops::CostJo< MODEL, OBS >::gradFG_
private

Gradient at first guess : \( R^{-1} (H(x_{fg})-y_{obs}) \).

Definition at line 128 of file CostJo.h.

◆ obsconf_

template<typename MODEL , typename OBS >
eckit::LocalConfiguration oops::CostJo< MODEL, OBS >::obsconf_
private

Definition at line 119 of file CostJo.h.

◆ obspace_

template<typename MODEL , typename OBS >
ObsSpaces_ oops::CostJo< MODEL, OBS >::obspace_
private

Definition at line 120 of file CostJo.h.

◆ pobs_

template<typename MODEL , typename OBS >
std::shared_ptr<Observers_> oops::CostJo< MODEL, OBS >::pobs_
mutableprivate

Observers passed by \( J_o\) to the model during integration.

Definition at line 131 of file CostJo.h.

◆ pobstlad_

template<typename MODEL , typename OBS >
std::shared_ptr<ObserversTLAD_> oops::CostJo< MODEL, OBS >::pobstlad_
private

Linearized observation operators.

Definition at line 134 of file CostJo.h.

◆ qc_

template<typename MODEL , typename OBS >
QCData_ oops::CostJo< MODEL, OBS >::qc_
private

Storage for QC flags and obs error.

Definition at line 137 of file CostJo.h.

◆ Rmat_

template<typename MODEL , typename OBS >
std::unique_ptr<ObsErrors_> oops::CostJo< MODEL, OBS >::Rmat_
private

Definition at line 122 of file CostJo.h.

◆ yobs_

template<typename MODEL , typename OBS >
Observations_ oops::CostJo< MODEL, OBS >::yobs_
private

Definition at line 121 of file CostJo.h.


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