<p>This is an interesting statistics problem.  I would do this for starters.  Take all the years of data and calculate average rainfall amounts for each day of the year.  If you're looking for the rainy <em>season</em>, I would use maybe a 30-day moving average on this, but make sure that the average can wrap around Jan 1.  Once you have these values -- 365 values for each site -- I suggest trying a few things:</p>

<p>1) Try out the standard deviation approach.  It's easy to calculate, so you should be able to play around with the particular number "x" in "x standard deviations above the mean".  If it works for you, there's no reason to make it harder.</p>

<p>2) Using "x standard deviations above the mean" really just means that you're looking for a certain value of the cumulative distribution function (CDF) of rainfall.  Instead of using standard deviation, you could calculate these CDFs for each site from those 365 values, and pick the 75th percentile or something.  I'm still thinking through whether this would guarantee that you get a "season"; it's possible that the top-percentile values of the year are nowhere near each other.</p>

<p>3) Plot out a few distributions for key sites: dry midlatitudes, wet midlatitudes, polar, tropics (monsoon-dominated).  If these PDFs look pretty similar, you might be able to figure out a sensible approach.</p>

<p>I think the key difficulty here isn't going to be that different places have different total rainfall, but that different places can have rainy seasons of different <em>lengths</em>.  If the season was always 30 days, I think this approach would be fine.  I'm really interested in seeing those CDFs just to see how different they are.</p>

<p>Let us know what you come up with!</p>

CC BY-SA 3.0
2015-06-29T13:03:03.697Z
I would be careful using the standard deviation with rainfall, because rainfall typically has extreme events and is therefore far from normally distributed. I would use a more robust alternative such as the median absolute deviation. People at [Stats.SE] might have more rigorous answers on the statistics side of things.
gerrit
CC BY-SA 3.0
2015-07-01T22:51:34.883Z
I think the length of the rainy season is the issue. So you need to consider the correlation to rain in previous and subsequent days. A large rain event in the dry season can occur but can be short-lived. Potentially the amount of rain is less significant - you can have seasons of lots of days with light rain (think Seattle or London). In that sense, monthly data might not be sufficient.
haresfur
CC BY-SA 3.0
2015-07-02T00:16:33.293Z
I agree with @haresfur. I was talking with someone today about this, and they brought up that it might be an ill-posed problem. Does every site even *have* a rainy season? She mentioned her home country of Norway as having precipitation (if not rain) distributed pretty evenly throughout the year.
Jareth Holt
CC BY-SA 3.0
2015-06-29T12:47:52.540Z
2015-06-29T12:47:52.540Z
Jareth Holt
<p>Maybe you can try Fourier Analysis - <a href="https://en.wikipedia.org/wiki/Fourier_analysis" rel="nofollow">https://en.wikipedia.org/wiki/Fourier_analysis</a> to distinguish certain patterns. There are papers on using this method to identify rainfall and pollution periodicity. For example, weekend effect on urban pollution. I can't think of any papers right now, but I am sure you can find something.</p>

CC BY-SA 3.0
2015-06-29T09:40:19.143Z
2015-06-29T13:01:28.350Z
2015-06-29T13:01:28.350Z
luka
<blockquote>
  <p>The approaches, based on the negative binomial model for the
  distribution of duration of the wet periods measured in days, are
  proposed to the definition of extreme precipitation. This model
  demonstrates excellent fit with real data and provides a theoretical
  base for the determination of asymptotic approximations to the
  distributions of the maximum daily precipitation volume within a wet
  period as well as the total precipitation volume over a wet period.
  The first approach to the definition (and determination) of extreme
  precipitation is based on the tempered Snedecor–Fisher distribution of
  the maximum daily precipitation. According to this approach, a daily
  precipitation volume is considered to be extreme, if it exceeds a
  certain (pre-defined) quantile of the tempered Snedecor–Fisher
  distribution. The second approach is based on that the total
  precipitation volume for a wet period has the gamma distribution.
  Hence, the hypothesis that the total precipitation volume during a
  certain wet period is extremely large can be formulated as the
  homogeneity hypothesis of a sample from the gamma distribution. Two
  equivalent tests are proposed for testing this hypothesis. Both of
  these tests deal with the relative contribution of the total
  precipitation volume for a wet period to the considered set (sample)
  of successive wet periods. Within the second approach it is possible
  to introduce the notions of relatively and absolutely extreme
  precipitation volumes. The results of the application of these tests
  to real data are presented yielding the conclusion that the intensity
  of wet periods with extreme large precipitation volume increases.</p>
</blockquote>

<p><a href="https://docsbay.net/statistical-tests-for-extreme-precipitation-volumes" rel="nofollow noreferrer">Statistical tests for extreme precipitation volumes</a> by <em>V. Yu. Korolev1, A. K. Gorshenin2
, K. P. Belyaev3, 29 Nov 2018</em></p>

CC BY-SA 4.0
2019-05-10T01:27:57.777Z
2019-05-10T01:27:57.777Z
aaroncorcino
<p>I have historical precipitation data for hundreds of cities around the world. I would like to algorithmically determine when the rainy season (if exists) is for each location. Are there any algorithms out there that can determine this based on the monthly averages alone?</p>

<p>Some problems that I envision are:</p>

<ul>
<li>Having a lot of rain is not enough. Many places in south east asia have very heavy rain falls for a couple of minutes a day, but it still is not necessarily considered rainy season.</li>
<li>Is it better to say that if the weather is x standard deviations above the average precipitation that it is rainy season or use a moving average?</li>
<li>Any other ideas, links, etc?</li>
</ul>

<p>I'm brand new to the field so help and an open discussion would be appreciated.</p>

<meteorology><weather-forecasting><rainfall>
Algorithmically Determining the Rainy Season
user2694306
# Algorithmically Determining the Rainy Season

(Asked by: username_0 on 2015-06-29)

I have historical precipitation data for hundreds of cities around the world. I would like to algorithmically determine when the rainy season (if exists) is for each location. Are there any algorithms out there that can determine this based on the monthly averages alone?

Some problems that I envision are:

* Having a lot of rain is not enough. Many places in south east asia have very heavy rain falls for a couple of minutes a day, but it still is not necessarily considered rainy season.
* Is it better to say that if the weather is x standard deviations above the average precipitation that it is rainy season or use a moving average?
* Any other ideas, links, etc?

I'm brand new to the field so help and an open discussion would be appreciated.

**Tags:** meteorology, weather-forecasting, rainfall


---

## 3 answers

### Answer by username_1 on 2015-06-29. Score: 5

This is an interesting statistics problem. I would do this for starters. Take all the years of data and calculate average rainfall amounts for each day of the year. If you're looking for the rainy *season*, I would use maybe a 30-day moving average on this, but make sure that the average can wrap around Jan 1. Once you have these values -- 365 values for each site -- I suggest trying a few things:

1) Try out the standard deviation approach. It's easy to calculate, so you should be able to play around with the particular number "x" in "x standard deviations above the mean". If it works for you, there's no reason to make it harder.

2) Using "x standard deviations above the mean" really just means that you're looking for a certain value of the cumulative distribution function (CDF) of rainfall. Instead of using standard deviation, you could calculate these CDFs for each site from those 365 values, and pick the 75th percentile or something. I'm still thinking through whether this would guarantee that you get a "season"; it's possible that the top-percentile values of the year are nowhere near each other.

3) Plot out a few distributions for key sites: dry midlatitudes, wet midlatitudes, polar, tropics (monsoon-dominated). If these PDFs look pretty similar, you might be able to figure out a sensible approach.

I think the key difficulty here isn't going to be that different places have different total rainfall, but that different places can have rainy seasons of different *lengths*. If the season was always 30 days, I think this approach would be fine. I'm really interested in seeing those CDFs just to see how different they are.

Let us know what you come up with!

> **Comments:**
> **username_2**: I would be careful using the standard deviation with rainfall, because rainfall typically has extreme events and is therefore far from normally distributed. I would use a more robust alternative such as the median absolute deviation. People at [Stats.SE] might have more rigorous answers on the statistics side of things.  
> **username_3**: I think the length of the rainy season is the issue. So you need to consider the correlation to rain in previous and subsequent days. A large rain event in the dry season can occur but can be short-lived. Potentially the amount of rain is less significant - you can have seasons of lots of days with light rain (think Seattle or London). In that sense, monthly data might not be sufficient.  
> **username_1**: I agree with @username_3. I was talking with someone today about this, and they brought up that it might be an ill-posed problem. Does every site even *have* a rainy season? She mentioned her home country of Norway as having precipitation (if not rain) distributed pretty evenly throughout the year.  

---

### Answer by username_4 on 2015-06-29. Score: 4

Maybe you can try Fourier Analysis - <https://en.wikipedia.org/wiki/Fourier_analysis> to distinguish certain patterns. There are papers on using this method to identify rainfall and pollution periodicity. For example, weekend effect on urban pollution. I can't think of any papers right now, but I am sure you can find something.


---

### Answer by username_5 on 2019-05-10. Score: 0

> The approaches, based on the negative binomial model for the
> distribution of duration of the wet periods measured in days, are
> proposed to the definition of extreme precipitation. This model
> demonstrates excellent fit with real data and provides a theoretical
> base for the determination of asymptotic approximations to the
> distributions of the maximum daily precipitation volume within a wet
> period as well as the total precipitation volume over a wet period.
> The first approach to the definition (and determination) of extreme
> precipitation is based on the tempered Snedecor–Fisher distribution of
> the maximum daily precipitation. According to this approach, a daily
> precipitation volume is considered to be extreme, if it exceeds a
> certain (pre-defined) quantile of the tempered Snedecor–Fisher
> distribution. The second approach is based on that the total
> precipitation volume for a wet period has the gamma distribution.
> Hence, the hypothesis that the total precipitation volume during a
> certain wet period is extremely large can be formulated as the
> homogeneity hypothesis of a sample from the gamma distribution. Two
> equivalent tests are proposed for testing this hypothesis. Both of
> these tests deal with the relative contribution of the total
> precipitation volume for a wet period to the considered set (sample)
> of successive wet periods. Within the second approach it is possible
> to introduce the notions of relatively and absolutely extreme
> precipitation volumes. The results of the application of these tests
> to real data are presented yielding the conclusion that the intensity
> of wet periods with extreme large precipitation volume increases.

[Statistical tests for extreme precipitation volumes](https://docsbay.net/statistical-tests-for-extreme-precipitation-volumes) by *V. Yu. Korolev1, A. K. Gorshenin2
, K. P. Belyaev3, 29 Nov 2018*


---

