Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aggregation of maximum and minimum climdex variables #81

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

corviday
Copy link
Contributor

@corviday corviday commented Aug 22, 2019

Previously (#61), the generate_climos script was updated to correctly handle variables that count the number of times something happens in a specific time period, like fdETCCDI (frost days), which counts the number of days where the temperature goes below zero. The number of frost days in a year is the sum of the number of frost days in each month of that year. In order to calculate the average number of frost days per year over a 30-year period, we:

  1. calculate the number per year by adding all the per-month values for that year together
  2. calculate the long term average by taking the mean of all the yearly values

This PR expands that framework to also handle variables that measure the minimum or maximum of something, like tnnETCCDI, which measure the lowest temperature recorded each month. The yearly value for tnnETCCDI should be the lowest temperature recorded for that year. rx1dayETCCDI measures the maximum amount of precipitation that falls in a single day in each month; the value of rx1dayETCCDI for a year should the be maximum precipitation that falls in one day of that year.

Copy link
Contributor

@nikola-rados nikola-rados left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comments other than keep up the great documentation!

# cdo command, then calculate climatologies - disallowing further
# aggregation - from them.
aggregations = generate_counted_aggregates(temporal_subset, input_file)
# For these variables, the value of a year is *not* the mean of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great documentation as always!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants