File vert_slice_diagnostic.hpp
File List > common > src > diagnostics > vert_slice_diagnostic.hpp
Go to the documentation of this file
#ifndef EMULATOR_VERT_SLICE_DIAGNOSTIC_HPP
#define EMULATOR_VERT_SLICE_DIAGNOSTIC_HPP
#include "derived_diagnostic.hpp"
namespace emulator {
class VertSliceDiagnostic : public DerivedDiagnostic {
public:
VertSliceDiagnostic(const std::string &field_name, int level_idx, int nlevs);
std::string name() const override { return m_name; }
std::string source_field() const override { return m_source_field; }
void compute(const FieldDataProvider &fields,
std::vector<double> &output) override;
int output_size(int ncols, int nlevs) const override {
(void)nlevs;
return ncols; // Returns one value per column
}
private:
std::string m_name;
std::string m_source_field;
int m_level_idx;
int m_nlevs;
};
} // namespace emulator
#endif // EMULATOR_VERT_SLICE_DIAGNOSTIC_HPP