exoclim / aeolus

Analysis and visualisation of atmospheric model output powered by iris.
https://exoclim.github.io/aeolus
GNU Lesser General Public License v3.0
15 stars 4 forks source link

Bug in averaging of the day and night transmission flux #38

Closed dennissergeev closed 2 years ago

dennissergeev commented 2 years ago

As discussed with @mzamyatina, there's a bug in the calculation of the day-night average of the transmission flux, output by the UM. Currently, the averaging function makes one of the flux arrays (e.g. day) mismatch the other (e.g. night), making the average flux higher than individual (day- or night-only) fluxes.

Possible solutions are either

  1. to not reverse the array after rolling it along the longitude https://github.com/exoclim/aeolus/blob/aa6d791b2764cfda6c6996a436e0edccc1bd5b0c/src/aeolus/synthobs.py#L47
  2. or to adjust the rolling function to roll the array by 1 grid point less https://github.com/exoclim/aeolus/blob/aa6d791b2764cfda6c6996a436e0edccc1bd5b0c/src/aeolus/coord.py#L999
dennissergeev commented 2 years ago

I patched the function using option 1 (a4b28ab1503e4b0dd3f9f1391e931268496898c3). Any comments are welcome, but for now I'm closing the issue.