@@ -13,16 +13,6 @@ namespace scream {
13
13
14
14
class ZonalAvgDiag : public AtmosphereDiagnostic {
15
15
16
- // Utility to compute the contraction of a field along its column dimension.
17
- // This is equivalent to f_out = einsum('i,i...k->...k', weight, f_in).
18
- // The implementation is such that:
19
- // - all Field objects must be allocated
20
- // - the first dimension for field, weight, and lat is for the columns (COL)
21
- // - the first dimension for result is for the zonal bins (CMP,"bin")
22
- // - field and result must be the same dimension, up to 3
23
- static void compute_zonal_sum (const Field &result, const Field &field, const Field &weight,
24
- const Field &lat, const ekat::Comm *comm = nullptr );
25
-
26
16
public:
27
17
// Constructors
28
18
ZonalAvgDiag (const ekat::Comm &comm, const ekat::ParameterList ¶ms);
@@ -37,11 +27,19 @@ class ZonalAvgDiag : public AtmosphereDiagnostic {
37
27
#ifdef KOKKOS_ENABLE_CUDA
38
28
public:
39
29
#endif
30
+ void initialize_impl (const RunType /* run_type*/ );
40
31
void compute_diagnostic_impl ();
32
+ // Utility to compute the contraction of a field along its column dimension.
33
+ // This is equivalent to f_out = einsum('i,i...k->...k', weight, f_in).
34
+ // The implementation is such that:
35
+ // - all Field objects must be allocated
36
+ // - the first dimension for field, weight, and lat is for the columns (COL)
37
+ // - the first dimension for result is for the zonal bins (CMP,"bin")
38
+ // - field and result must be the same dimension, up to 3
39
+ static void compute_zonal_sum (const Field &result, const Field &field, const Field &weight,
40
+ const Field &lat, const ekat::Comm *comm = nullptr );
41
41
42
42
protected:
43
- void initialize_impl (const RunType /* run_type*/ );
44
-
45
43
std::string m_diag_name;
46
44
int m_num_zonal_bins;
47
45
0 commit comments