16 #include "eckit/config/Configuration.h" 20 #include "oops/util/Logger.h" 30 const eckit::Configuration & config,
32 time_(
util::DateTime(config.getString(
"date"))),
33 sigmab_(config.getDouble(
"standard_deviation")),
34 rscale_(1.0/config.getDouble(
"length_scale"))
39 std::vector<double> structFct(
resol_);
40 for (
unsigned int jj = 0; jj <
resol_; ++jj) {
42 structFct[jj] = std::exp(-0.5*zz*zz);
45 std::vector<std::complex<double> > coefs(
size_);
46 fft_.fwd(coefs, structFct);
49 for (
unsigned int jj = 0; jj <
size_; ++jj) {
50 bcoefs_[jj] = std::real(coefs[jj]);
58 std::vector<std::complex<double> > coefs(
resol_);
60 for (
unsigned int jj = 0; jj <
size_; ++jj) {
70 std::vector<std::complex<double> > coefs(
resol_);
72 for (
unsigned int jj = 0; jj <
size_; ++jj) {
82 std::vector<std::complex<double> > coefs(
resol_);
84 for (
unsigned int jj = 0; jj <
size_; ++jj) {
85 coefs[jj] *= std::sqrt(
bcoefs_[jj]);
92 os <<
"ErrorCovarianceL95: time = " <<
time_ <<
", std dev = " <<
sigmab_ 93 <<
", length scale = " << 1.0/
rscale_ << std::endl;
const util::DateTime time_
Increment Class: Difference between two states.
The namespace for the main oops code.
void inverseMultiply(const IncrementL95 &, IncrementL95 &) const
Eigen::FFT< double > fft_
The namespace for the L95 model.
std::vector< double > & asVector()
void print(std::ostream &) const
void multiply(const IncrementL95 &, IncrementL95 &) const
ErrorCovarianceL95(const Resolution &, const oops::Variables &, const eckit::Configuration &, const StateL95 &, const StateL95 &)
std::vector< double > bcoefs_
void randomize(IncrementL95 &) const