FV3 Bundle
ioda/src/ioda/random_f.cc
Go to the documentation of this file.
1
/*
2
* (C) Copyright 2017 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
#include "
ioda/random_f.h
"
9
#include <random>
10
11
// -----------------------------------------------------------------------------
12
namespace
qg
{
13
// -----------------------------------------------------------------------------
14
15
void
random_f
(
const
int
& nn,
double
* xx) {
16
static
std::mt19937 generator(7);
17
static
std::normal_distribution<double> distribution(0.0, 1.0);
18
19
for
(
int
jj = 0; jj < nn; ++jj) xx[jj] = distribution(generator);
20
}
21
22
// -----------------------------------------------------------------------------
23
24
}
// namespace qg
qg::random_f
void random_f(const int &nn, double *xx)
Definition:
ioda/src/ioda/random_f.cc:15
random_f.h
qg
The namespace for the qg model.
Definition:
ioda/src/ioda/random_f.cc:12
src
fv3-bundle
ioda
src
ioda
random_f.cc
Generated on Tue Nov 6 2018 11:39:19 for FV3 Bundle by
1.8.14