OOPS
LETKFSolverParameters.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 UCAR.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #ifndef OOPS_ASSIMILATION_LETKFSOLVERPARAMETERS_H_
9 #define OOPS_ASSIMILATION_LETKFSOLVERPARAMETERS_H_
10 
11 #include "oops/util/parameters/Parameter.h"
12 #include "oops/util/parameters/Parameters.h"
13 
14 namespace oops {
15 
16 /// Parameters for LETKF inflation
17 class LETKFInflationParameters : public Parameters {
18  OOPS_CONCRETE_PARAMETERS(LETKFInflationParameters, Parameters)
19 
20  public:
21  // multiplicative prior inflation Pf'=mult*Pf
22  Parameter<double> mult{"mult", 1.0, this};
23 
24  // RTPP: Relaxation to prior perturbation.
25  // delta_xa'(iens)=rtppCoeff*delta_xb'(iens)+(1-rtppCoeff)*delta_xa'(iens)
26  //
27  // Zhang, F., C. Snyder, and J. Sun, 2004: Tests of an ensemble
28  // Kalman Filter for convective-scale data assim-imilation:
29  // Impact of initial estimate and observations.
30  // Mon. Wea. Rev., 132, 1238-1253.
31  Parameter<double> rtpp{"rtpp", 0.0, this};
32 
33  // Relaxation to prior spread
34  // delta_xa'(i_grid)=delta_xa(i_grid)*
35  // *{ rtps*( std(Xb(i_grid,:))-std(Xa(i_grid,:)) )/std(Xa(i_grid,:)) + 1 }
36  // where i_grid is the index of grid point
37  // std is ensemble standard deviation for prior (Xb) and posterior (Xa)
38  Parameter<double> rtps{"rtps", 0.0, this};
39 
40  // rtpsInflMin and rtpsInflMax are min and max perturbation inflation
41  // allowed with rtps inflation.
42  double rtpsInflMin() const { return 1.0; }
43  double rtpsInflMax() const { return 1e30; }
44 
45  bool dortpp() const { return rtpp > 0.0 && rtpp <= 1.0; }
46  bool dortps() const { return rtps > 0.0 && rtps <= 1.0; }
47 };
48 
49 /// LETKF parameters
50 class LETKFSolverParameters : public Parameters {
51  OOPS_CONCRETE_PARAMETERS(LETKFSolverParameters, Parameters)
52  public:
53  Parameter<LETKFInflationParameters> infl{"local ensemble DA.inflation", {}, this};
54 };
55 
56 // -----------------------------------------------------------------------------
57 
58 } // namespace oops
59 #endif // OOPS_ASSIMILATION_LETKFSOLVERPARAMETERS_H_
oops::LETKFInflationParameters::dortps
bool dortps() const
Definition: LETKFSolverParameters.h:46
oops
The namespace for the main oops code.
Definition: ErrorCovarianceL95.cc:22
oops::LETKFInflationParameters::dortpp
bool dortpp() const
Definition: LETKFSolverParameters.h:45
oops::LETKFInflationParameters::mult
Parameter< double > mult
Definition: LETKFSolverParameters.h:22
oops::LETKFInflationParameters::rtpsInflMax
double rtpsInflMax() const
Definition: LETKFSolverParameters.h:43
oops::LETKFInflationParameters::rtpp
Parameter< double > rtpp
Definition: LETKFSolverParameters.h:31
oops::LETKFSolverParameters
LETKF parameters.
Definition: LETKFSolverParameters.h:50
oops::LETKFSolverParameters::infl
Parameter< LETKFInflationParameters > infl
Definition: LETKFSolverParameters.h:53
oops::LETKFInflationParameters
Parameters for LETKF inflation.
Definition: LETKFSolverParameters.h:17
oops::LETKFInflationParameters::rtps
Parameter< double > rtps
Definition: LETKFSolverParameters.h:38
oops::LETKFInflationParameters::rtpsInflMin
double rtpsInflMin() const
Definition: LETKFSolverParameters.h:42