This is a Python program for modeling the joint distribution of wind speed and direction.
The method is based on:
-
Harris, Cook, The parent wind speed distribution: Why Weibull?, http://www.sciencedirect.com/science/article/pii/S0167610514001056
-
Gaussian Mixture Models, http://scikit-learn.org/stable/modules/mixture.html
Left: Empirical PDF, Right: Model PDF
Left: Histogram vs. Model, Middle: Empirical vs. Model CDF, Right: Weibull ECDF Vs. Model CDF
The above results are avaiable at https://cdn.rawgit.com/cqcn1991/Wind-Speed-Analysis/master/output_HTML/marham.html , along with other analysis.
Here is how the method analysis different locations across the world. You can use the code toggle button and sidebar to navigate these reports.
The model I'm using is Gaussian Mixture Model, or simply put, the sum of some normal distributions. The idea is very simple:
1. For a certain wind character, the wind vector (speed and direction) follows the normal distribution:
2. For specific location, its wind speed direction distribution is composed of several such wind characters, and hence the sum of several normal distributions:
fi is the PDF of normal distribution component, pi is its weight.
The chief beauty of this model is its elegance (simplicity). You can use such a simple model (GMM) to describe wind, contrary to previous Weibull combination and others.
For a complete explanation of how GMM fit the joint distribution of wind speed and direction, you can read
Harris, Cook, The parent wind speed distribution: Why Weibull?, http://www.sciencedirect.com/science/article/pii/S0167610514001056
And I'm also working on a paper about it, this is my Master Thesis. And if you have any interest (question, collaboration...) feel free to ask me. I open source the project is meant to help you try it.
Download at https://www.continuum.io/downloads
This repo use Python 3, so you should use the 3 as well.
After installing Anaconda, there are still some additional packages you need to install:
Just run these in your command line to install them
pip install -r requirements.txt
or
pip install seaborn # https://github.com/mwaskom/seaborn/
pip install windrose # https://github.com/scls19fr/windrose
pip install jsmin # https://github.com/tikitu/jsmin
pip install joblib
You may need some datasets to get started. For this reason, I have include some in https://github.com/cqcn1991/Wind-Speed-Analysis/tree/master/data If you want additional data, you can find them at http://www.ncdc.noaa.gov/
If you have any question, you could post it at issue, or mail me at 38306608#qq.com
This work would be impossible without the help from Harris and Cook. Thank you!