Replies: 1 comment
-
Hi @P-Burns, thanks for raising this. We'd love a pull request from you with your proposed documentation changes, if you are able 😊 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I wish to clarify a point about partially reducing data dimensions. Under the section
Cube Statistics of the User Guide there are some notes about dealing with (and removing) occurrences of seasonal (3 month) averages computed from not a 3 full months of data. That is the lines
tdelta_3mth = datetime.timedelta(hours=3x28x24.0)
spans_three_months = lambda t: (t.bound[1] - t.bound[0]) > tdelta_3mth
three_months_bound = iris.Constraint(time=spans_three_months)
full_season_means = annual_seasonal_mean.extract(three_months_bound)
I found that, due to nature of the bounds in my data (from MOHC), I had to replace the first line above with
tdelta_3mth = datetime.timedelta(hours=2x28x24.0)
Once I changed the 3 to a 2, any spurious seasonal averages were removed as expected. If I did not make this amendment, then the code returned an empty cube (i.e. did not find any data satisfying the imposed condition). So it could be useful to check and correct this in the User Guide, and perhaps add an additional note about the nature of the bounds data.
Paul Burns
Beta Was this translation helpful? Give feedback.
All reactions