Commit 6b15439d authored by Thibault Hallouin's avatar Thibault Hallouin
Browse files

fix bug for AWN: missing "real" lead time dimension

Showing with 6 additions and 3 deletions
+6 -3
......@@ -706,7 +706,7 @@ namespace evalhyd
{
AWN = metrics::calc_AWN(
q_obs, get_AW(), t_msk, b_exp,
n_sit, n_msk, n_exp
n_sit, n_ldt, n_msk, n_exp
);
}
return AWN.value();
......
......@@ -439,6 +439,8 @@ namespace evalhyd
/// shape: (samples, time slice)
/// \param n_sit
/// Number of sites.
/// \param n_ldt
/// Number of lead times.
/// \param n_msk
/// Number of temporal subsets.
/// \param n_exp
......@@ -453,14 +455,15 @@ namespace evalhyd
const xt::xtensor<bool, 4>& t_msk,
const std::vector<xt::xkeep_slice<int>>& b_exp,
std::size_t n_sit,
std::size_t n_ldt,
std::size_t n_msk,
std::size_t n_exp
)
{
// compute "climatology" average width
xt::xtensor<double, 5> mean_obs =
xt::zeros<double>({n_sit, std::size_t {1}, n_msk,
n_exp, std::size_t {1}});
xt::zeros<double>({n_sit, n_ldt, n_msk, n_exp,
std::size_t {1}});
// compute variable one mask at a time to minimise memory imprint
for (std::size_t m = 0; m < n_msk; m++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment