Skip to content

Instantly share code, notes, and snippets.

@denis-bz
Last active February 20, 2026 16:57
Show Gist options
  • Select an option

  • Save denis-bz/7ce8831333dd7b8bc5409dadbebefb79 to your computer and use it in GitHub Desktop.

Select an option

Save denis-bz/7ce8831333dd7b8bc5409dadbebefb79 to your computer and use it in GitHub Desktop.
Windspeeds at 175m in Germany, COSMO-REA6 and NEWA 20 Feb 2026

Windspeeds at 175m in Germany, COSMO-REA6 and NEWA

Keywords: wind-speed COSMO-REA6 NEWA Germany neweuropeanwindatlas reanalysis open-data python

I'm interested in windspeeds at 175m, the turbine height of many new wind turbines in Germany, Two sources of windspeed data in EUrope are

  1. https://opendata.DWD.de/.../COSMO_REA6: hourly, 1995 to 2018, 6 x 6 km grid
  2. NEWA, the New European Wind Atlas, 3 x 3 km grid.

What are good places to compare the two ? There are 8000-odd new windmills in Germany, running since 2024 or planned, under Marktstammdatenregister Gesamtdatenexport_20260101. Comparing at these sites is more interesting than looking everywhere -- importance weighting.

Plot NEWA vs. COSMO-REA6

20feb-DE-cosmo-newa-Laender

So what ?

Experts will probably say "of course, dummy, everybody knows that". Is there a 0-order explanation ? Spotchecks of measured windspeeds at ~ 175m would be useful.

Notes, TL;DR

If anyone's interested, I can supply .csv file with NEWA and COSMO-REA7 windspeedslike this:

Newawind175 Cosmowind175 Cosmocap175 State     Lat     Lon  AGS                  Lkr     Place
       9.73        10.58        67.6    SH 54.4777 8.42394 1054        Nordfriesland Galmsbüll
	   ...
       5.02         3.57        13.2    BW 48.0106 7.90246 8311 Freiburg_im_Breisgau  Freiburg

Here Newawind175 is just the average of NEWA average windspeeds at 150m and 200m.

Wind data is extracted with homemade Python code (which is not to everyone's taste). I found it useful to

  • subset big .nc files early (numpy .npz is good)
  • map sites ──> the nearest Cosmo and NEWA grid points with KDtree
  • little functions with print statements and type / shape annotations
  • avoid software towers:

xkcd-dependency

Comments welcome

cheers
— denis-bz-py t-online.de 2026-02-20 Feb

The purpose of computing is insight, not numbers.

#!/bin/bash
# newa-wind.sh [area=BY height=100-200]
# download a bbox from neweuropeanwindatlas area= height= scale=
# or go to https://wps.neweuropeanwindatlas.eu/api/mesoscale-atlas/v1/docs
# get-data-bbox, click "try it", fill in S N W E ..., execute, wait, click download
# 23jan
trap exit INT QUIT TERM
type bold > /dev/null 2> /dev/null ||
alias bold=echo
# default args --
area=DE # -> S N W S in the table below
height=100-150-200 # meso 50 75 100 150 200 250 500 micro 50 100 200
scale=meso # meso 3 km / micro 50m
case $1 in
*=* ) export "$@" ;; # area= etc.
?* ) exec bold "? $0 area=$area height=$height scale=$scale" # -help
esac
set -o errexit -o nounset
#...............................................................................
# add your area S N W E here --
case $area in
DE ) S=47.5 N=55 W=5.9 E=15.1 ;;
BY ) S=47.5 N=50.5 W=9 E=13.5 ;; # (113, 113)
BYne ) S=49.7 N=49.9 W=12.35 E=12.55 ;; # max ws
* ) exec bold "Error: add your area to $0"
esac
case $scale in
meso ) var=wind_speed_mean ;;
micro ) var=wind_speed
bold "micro: check for 0 in values"
;;
* ) exec bold "Error: $0 scale=$scale"
esac
H="` echo $height |
sed 's - \&height= g' `" # 100-200 -> 100&height=200
#...............................................................................
out=$area-newa-$scale-${height}m.nc
bold "curl > $out"
# download
# curl progress on terminal: stays 0
gnutime \
\curl --output $out --remote-time --show-error \
-H 'accept: application/x-netcdf' \
"https://wps.neweuropeanwindatlas.eu/api/${scale}scale-atlas/v1/get-data-bbox?\
southBoundLatitude=$S&\
northBoundLatitude=$N&\
westBoundLongitude=$W&\
eastBoundLongitude=$E&\
height=$H&\
variable=$var"
bold `file $out` # "data" or ASCIi with eg "Bad Gateway"
# ncinfo $out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment