I wanted to see if I could improve on the standard power law coefficient (1.389495) for calculating 100m wind speed from 10m data. The currently available ten years of ERA5 U and V netCDF wind components from CDS were concatenated, then calculated for wind speed using CDO; a handy collection of command-line operators to manipulate and analyse climate and numerical weather prediction data:
|
cdo sqrt -add -sqr 10Uall.nc -sqr 10Vall.nc 10wind.nc |
|
cdo sqrt -add -sqr 100Uall.nc -sqr 100Vall.nc 100wind.nc |
The coefficient dataset was calculated with CDO, by dividing 100m by 10m datasets:
|
cdo div 100wind.nc 10wind.nc coef.nc |
The mean coefficient for the whole domain is 1.448035, slightly higher than the standard coefficient, taking it further away from the newly available ERA5 100m forecast data. The average standard deviation is 0.816657.
The ratio as a function of the geographical location was then plotted in Python, using matplotlib package’s plot.imshow() method.
First load the necessary python packages:
|
<span class="token comment" spellcheck="true"># importing of NetCDF files</span> <span class="token keyword">import</span> netCDF4 <span class="token comment" spellcheck="true"># plotting and data visualisations</span> <span class="token keyword">from</span> matplotlib <span class="token keyword">import</span> pyplot <span class="token keyword">as</span> plt <span class="token comment" spellcheck="true"># n-dimensional arrays</span> <span class="token keyword">import</span> numpy <span class="token keyword">as</span> np <span class="token comment" spellcheck="true"># high level functions for working with NetCDF files</span> <span class="token keyword">import</span> xarray <span class="token keyword">as</span> xr |
Import the pre-calculated coefficient dataset:
|
<span class="token comment" spellcheck="true"># load NetCDF file into variable - using xarray open dataset function</span> coef <span class="token operator">=</span> xr<span class="token punctuation">.</span>open_dataset<span class="token punctuation">(</span><span class="token string">'/Users/user/Documents/ERA5/yearly_complete/allyears/coef.nc'</span><span class="token punctuation">)</span> |
Calculate the mean average using the numpy mean method:
|
<span class="token comment" spellcheck="true"># calculate mean over 10 year dataset</span> t <span class="token operator">=</span> coef<span class="token punctuation">.</span>mean<span class="token punctuation">(</span><span class="token string">'time'</span><span class="token punctuation">)</span> |
Finally, plot the total wind speed average using matplotlib imshow() method, note interpolation is set to ‘none’, this can be changed to apply various smoothing algorithms:
|
<span class="token comment" spellcheck="true"># plot mean average of full 10 years</span> t<span class="token punctuation">.</span>uv100<span class="token punctuation">.</span>plot<span class="token punctuation">.</span>imshow<span class="token punctuation">(</span>figsize<span class="token operator">=</span><span class="token punctuation">(</span><span class="token number">15</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">,</span>interpolation<span class="token operator">=</span><span class="token string">'none'</span><span class="token punctuation">)</span> |

Ratio 100m divided by 10m for ERA5 averaged over the period 2008-2017
Next, check the standard deviation over this time period:
|
<span class="token comment" spellcheck="true"># calculate standard deviation over full 10 years</span> std <span class="token operator">=</span> coef<span class="token punctuation">.</span>std<span class="token punctuation">(</span><span class="token string">'time'</span><span class="token punctuation">)</span> |
For this plot, the colour map (cmap=’terrain’) was adjusted to highlight the variation:
|
<span class="token comment" spellcheck="true"># plot standard deviation of full 10 years</span> std<span class="token punctuation">.</span>uv100<span class="token punctuation">.</span>plot<span class="token punctuation">.</span>imshow<span class="token punctuation">(</span>figsize<span class="token operator">=</span><span class="token punctuation">(</span><span class="token number">15</span><span class="token punctuation">,</span><span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">,</span>interpolation<span class="token operator">=</span><span class="token string">'none'</span><span class="token punctuation">,</span>cmap<span class="token operator">=</span><span class="token string">'terrain'</span><span class="token punctuation">)</span> |

Standard Deviation of the ratio 100m divided by 10m for ERA5 over the period 2008-2017
This indicates that a geographically-dependent coefficient would better reproduce the 100 m wind, when only 10 m is available.
by Luke Sanger (WEMC, 2018)