Skip to content

Commit

Permalink
make hera compiler happy
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryMartin-NOAA committed Aug 9, 2023
1 parent 34aa28b commit f899e05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/ioda_example/gdas_meanioda.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <iostream>
#include <numeric>
#include "eckit/config/LocalConfiguration.h"
#include "ioda/Group.h"
#include "ioda/ObsSpace.h"
Expand Down Expand Up @@ -66,7 +67,7 @@ namespace gdasapp {
}

// the below line computes the mean, aka sum divided by count
const float mean = std::reduce(buffer.begin(), buffer.end()) / float(nlocs);
const float mean = std::accumulate(buffer.begin(), buffer.end(), 0) / float(nlocs);

// write the mean out to the stdout
oops::Log::info() << "mean value for " << group << "/" << variable << "=" << mean << std::endl;
Expand Down

0 comments on commit f899e05

Please sign in to comment.