Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
iconfalse

Only the coefficients for m ≥ 0 are stored.  The coefficients for m < 0 are the complex conjugates of the corresponding coefficient with m > 0X(n,-m)= X* (n,m)

The spherical harmonic (n, m) wave number space is shown in the figure.


Image Added

The figure depicts the spherical harmonic (n, m) wave number space for a triangular truncation,  T.

Only the coefficients for m and n represented by the filled red dots are stored in the GRIB Binary Data Section.  

When the complex coefficients are extracted as the ecCodes values array, they are returned as real and imaginary pairs, starting from m=0, n=0 (i.e., at the apex of the inverted triangle) and moving upwards in direction of increasing n until n=T.  It then moves to the next value of m and continues in this way, reading from the n = m line, upwards in the direction of increasing n until the final pair with n = m = T is reached.

To extract the real and imaginary pairs of the coefficients from the values array returned by ecCodes needs the following two steps:

...