wind roses for tex documentswind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192...

30
WIND ROSES FOR TeX DOCUMENTS Alan Wetmore アラン・ウェットモア [email protected] 1 1 Thursday, October 24, 13

Upload: others

Post on 18-Apr-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

WIND ROSES FOR TeX DOCUMENTS

Alan Wetmoreアラン・ウェットモア

[email protected]

1

1Thursday, October 24, 13

Page 2: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

OUTLINE

Wind and wind data

Wind roses

Using TikZ to draw

Setting the geometry

Building the charts

Still to do

2

2Thursday, October 24, 13

Page 3: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

HOW DO WE QUANTIFY WIND

Wind is a vector quantity

Magnitude (speed) and Direction (direction wind comes from)

When speed is zero; there is no direction

BUT; we also have the case when the speed is non-zero and direction is “Variable”

3

3Thursday, October 24, 13

Page 4: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

SOURCES OF THE DATA

Sources: WMO; World Meteorological Organization

NCDC; National Climate Data Center; Ashville, North Carolina

Formats

METAR; METeorological Aerodrome Report

Formal text format (147 columns) for “Hourly” observations

Direction 27--29; Speed 31--33; Gusts 35--37

4

4Thursday, October 24, 13

Page 5: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

DESCRIPTIONS SURFACE HOURLY ABBREVIATED FORMAT

ONE HEADER RECORD FOLLOWED BY DATA RECORDS:

COLUMN DATA DESCRIPTION

01-06 USAF = AIR FORCE CATALOG STATION NUMBER 08-12 WBAN = NCDC WBAN NUMBER14-25 YR--MODAHRMN = YEAR-MONTH-DAY-HOUR-MINUTE IN GREENWICH MEAN TIME (GMT)27-29 DIR = WIND DIRECTION IN COMPASS DEGREES, 990 = VARIABLE, REPORTED AS '***' WHEN AIR IS CALM (SPD WILL THEN BE 000)31-37 SPD & GUS = WIND SPEED & GUST IN MILES PER HOUR 39-41 CLG = CLOUD CEILING--LOWEST OPAQUE LAYER WITH 5/8 OR GREATER COVERAGE, IN HUNDREDS OF FEET, 722 = UNLIMITED 43-45 SKC = SKY COVER -- CLR-CLEAR, SCT-SCATTERED-1/8 TO 4/8, BKN-BROKEN-5/8 TO 7/8, OVC-OVERCAST, OBS-OBSCURED, POB-PARTIAL OBSCURATION 47-47 L = LOW CLOUD TYPE, SEE BELOW49-49 M = MIDDLE CLOUD TYPE, SEE BELOW51-51 H = HIGH CLOUD TYPE, SEE BELOW 53-56 VSB = VISIBILITY IN STATUTE MILES TO NEAREST TENTH NOTE: FOR SOME STATIONS, VISIBILITY IS REPORTED ONLY UP TO A MAXIMUM OF 7 OR 10 MILES IN METAR OBSERVATIONS, BUT TO HIGHER VALUES IN SYNOPTIC OBSERVATIONS, WHICH CAUSES THE VALUES TO FLUCTUATE FROM ONE DATA RECORD TO THE NEXT. ALSO, VALUES ORIGINALLY REPORTED AS '10' MAY APPEAR AS '10.1' DUE TO DATA BEING ARCHIVED IN METRIC UNITS AND CONVERTED BACK TO ENGLISH.58-68 MW MW MW MW = MANUALLY OBSERVED PRESENT WEATHER--LISTED BELOW IN PRESENT WEATHER TABLE70-80 AW AW AW AW = AUTO-OBSERVED PRESENT WEATHER--LISTED BELOW IN PRESENT WEATHER TABLE82-82 W = PAST WEATHER INDICATOR, SEE BELOW84-92 TEMP & DEWP = TEMPERATURE & DEW POINT IN FAHRENHEIT 94-99 SLP = SEA LEVEL PRESSURE IN MILLIBARS TO NEAREST TENTH 101-105 ALT = ALTIMETER SETTING IN INCHES TO NEAREST HUNDREDTH 107-112 STP = STATION PRESSURE IN MILLIBARS TO NEAREST TENTH114-116 MAX = MAXIMUM TEMPERATURE IN FAHRENHEIT (TIME PERIOD VARIES)118-120 MIN = MINIMUM TEMPERATURE IN FAHRENHEIT (TIME PERIOD VARIES)122-126 PCP01 = 1-HOUR LIQUID PRECIP REPORT IN INCHES AND HUNDREDTHS -- THAT IS, THE PRECIP FOR THE PRECEDING 1 HOUR PERIOD 5

5Thursday, October 24, 13

Page 6: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

THE BEGINNING OF EACH RECORD SURFACE HOURLY ABBREVIATED FORMAT

ONE HEADER RECORD FOLLOWED BY DATA RECORDS:

COLUMN DATA DESCRIPTION

01-06 USAF = AIR FORCE CATALOG STATION NUMBER 08-12 WBAN = NCDC WBAN NUMBER14-25 YR--MODAHRMN = YEAR-MONTH-DAY-HOUR-MINUTE IN GREENWICH MEAN TIME (GMT)27-29 DIR = WIND DIRECTION IN COMPASS DEGREES, 990 = VARIABLE, REPORTED AS '***' WHEN AIR IS CALM (SPD WILL THEN BE 000)31-37 SPD & GUS = WIND SPEED & GUST IN MILES PER HOUR

6

6Thursday, October 24, 13

Page 7: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

SOME SAMPLE DATA USAF WBAN YR--MODAHRMN DIR SPD GUS

725090 14739 201205111200 280 14 ***

725090 14739 201205111254 300 14 24

725090 14739 201205111354 300 16 28

725090 14739 201205111454 300 14 23

725090 14739 201205111500 300 14 ***

725090 14739 201205111554 320 10 22

725090 14739 201205111654 290 18 24

725090 14739 201205111754 270 17 24

725090 14739 201205111800 270 17 ***

725090 14739 201205111854 300 21 33

725090 14739 201205111954 320 10 20

725090 14739 201205112054 *** 0 ***

725090 14739 201205112100 *** 0 ***

725090 14739 201205112154 990 6 ***

725090 14739 201205112254 100 6 ***

725090 14739 201205112354 130 8 ***

725090 14739 201205120000 130 8 *** 7

7Thursday, October 24, 13

Page 8: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

WIND ROSES: WHAT THEY SHOW

Which direction the wind blows

How often from each direction; counting the records

The wind speeds in each direction; speed correlated with direction

We will ignore other more sophisticated uses that deal with other correlations for now.

8

8Thursday, October 24, 13

Page 9: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

COMPASS ROSES

9

9Thursday, October 24, 13

Page 10: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

WHAT NEXT? STRATIFY SPEEDRange of wind speeds forBeaufort Scale (miles per hour)

[0,1) ➤ B0 [1,4) ➤ B1 [4,7) ➤ B2 [7,11) ➤ B3 [11,17) ➤ B4 [17,22) ➤ B5 [22,28) ➤ B6 [28,34) ➤ B7 [34,41) ➤ B8 [41,48) ➤ B9 [48,55) ➤ B10 [55,64) ➤ B11 [64,...) ➤ B12

The Beaufort Scale was designed for sailors who certainly cared about wind more than most.

It is originally designed measuring speeds in nautical miles per hour (knots) but can be adapted to miles per hours (mph) or meters per second (mps)

Since my MET data is stored using mph; it makes sense to avoid too many conversions between units.

As we prepare the statistics of our wind measurements we will group using these bins10

10Thursday, October 24, 13

Page 11: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

SOME EXAMPLES FROM THE WWW

����������

��������������� �������� �� � ���������������������� ����������

��������

��������

������

!� ����

"�!����

��#�"����

$���#����

%%%&

%&

&%&

&

&�&

�&

��&�

���

��

���

�%�

%�

%%�

�'

#'

��'

(������� �����11

11Thursday, October 24, 13

Page 12: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

SOME EXAMPLES FROM THE WWW

12

12Thursday, October 24, 13

Page 13: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

BOSTON EXAMPLES

0%

5%

10%

15%

20%

25%

N

NE

EW

NW

Wind�RoseBoston�1918

31�ч�B7�<��39��ͲͲ 0.3%

25�ч�B6�<��31��ͲͲ 0.3%

18�ч�B5�<��25��ͲͲ 5.9%

13�ч�B4�<��18��ͲͲ 14.4%

8�ч�B3�<��13��ͲͲ 44.5%

4�ч�B2�<��8��ͲͲ 28.4%

SE

S

SW

1�ч�B1�<��4��ͲͲ 6.3%

B0�<��1��ͲͲ 0.0%

0%

1%

2%

3%

4%

5%

6%

010

20

30

40

50

60

70

80

90

100260

270

280

290

300

310

320

330

340350 Wind�Rose

Boston�2012

31�ч�B7�<��39��ͲͲ 0.2%

25�ч�B6�<��31��ͲͲ 1.2%

18�ч�B5�<��25��ͲͲ 5.9%

13�ч�B4�<��18��ͲͲ 22.2%

8�ч�B3�<��13��ͲͲ 38.8%

4�ч�B2�<��8��ͲͲ 21.5%

1�ч�B1�<��4��ͲͲ 4.5%

B0�<��1��ͲͲ 4.7%

13�ч�v4�<��18��ͲͲ 0.1%100

110

120

130

140

150

160170

180190

200

210

220

230

240

250

260

8�ч�v3�<��13��ͲͲ 0.2%

4�ч�v2�<��8��ͲͲ 0.4%

1�ч�v1�<��4��ͲͲ 0.2%

•1918: Babe Ruth’s last year with

the Red Sox; 8 Directions

recorded twice a day (731)

• 2012: Automated Data; 36

directions recorded hourly

(8699)13

13Thursday, October 24, 13

Page 14: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

\documentclass{standalone}

\usepackage{tikz}

\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}[rotate=90, scale=0.35,

every node/.style={scale=0.6}]

\coordinate (c1) at (0,0);

\draw (c1) circle(45 mm);

\foreach \direction/\label in {%

0/N, 45/NE, 90/E, 135/SE,

180/S, 225/SW, 270/W, 315/NW}%

{\node[fill=green!10] at ( -\direction : 45mm) {\label}; }

\end{tikzpicture}

\end{document}

A WIND ROSE USING: TikZ

N

E

S

W

N

NE

E

SE

S

SW

W

NW

0�

30�

60�

90�

120�

150�

180�210�

240�

270�

300�

330�

NNNE

NE

ENE

E

ESE

SE

SSES

SSW

SW

WSW

W

WNW

NW

NNW

0� 10�20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�170�180�190�

200�210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�340�

350�

14

14Thursday, October 24, 13

Page 15: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

WHAT ANGLES MIGHT WE NEED TO USE?

15

N

E

S

W

0�

72�

144�216�

288�

0�

60�

120�

180�

240�

300�

N

NE

E

SE

S

SW

W

NW

0�

40�

80�

120�

160�200�

240�

280�

320�

0�

36�

72�

108�

144�

180�

216�

252�

288�

324�

0�

30�

60�

90�

120�

150�

180�210�

240�

270�

300�

330�

0�

24�

48�

72�

96�

120�

144�

168�192�

216�

240�

264�

288�

312�

336�

NNNE

NE

ENE

E

ESE

SE

SSES

SSW

SW

WSW

W

WNW

NW

NNW

0�

20�

40�

60�

80�

100�

120�

140�

160�

180�200�

220�

240�

260�

280�

300�

320�

340�

0�

18�

36�

54�

72�

90�

108�

126�

144�

162�

180�198�

216�

234�

252�

270�

288�

306�

324�

342�

0�15�

30�

45�

60�

75�

90�

105�

120�

135�

150�

165�180�

195�

210�

225�

240�

255�

270�

285�

300�

315�

330�

345�

0�12�

24�

36�

48�

60�

72�

84�

96�

108�

120�

132�

144�

156�

168�180�

192�204�

216�

228�

240�

252�

264�

276�

288�

300�

312�

324�

336�348�

N N by E

NNE

NE by N

NE

NE by E

ENE

E by N

E

E by S

ESE

SE by E

SE

SE by S

SSE

S by ES

S by W

SSW

SW by S

SW

SW by W

WSW

W by S

W

W by N

WNW

NW by W

NW

NW by N

NNW

N by W

0� 10�

20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�

170�180�190�200�

210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�

340�350�

0� 9�

18�

27�

36�

45�

54�

63�

72�

81�

90�

99�

108�

117�

126�

135�

144�

153�

162�

171�180�189�198�

207�

216�

225�

234�

243�

252�

261�

270�

279�

288�

297�

306�

315�

324�

333�

342�351�

0� 8�

16�

24�

32�

40�

48�

56�

64�

72�

80�

88�

96�

104�

112�

120�

128�

136�

144�

152�

160�

168�176�184�

192�200�

208�

216�

224�

232�

240�

248�

256�

264�

272�

280�

288�

296�

304�

312�

320�

328�

336�

344�352�

0� 6�12�

18�

24�

30�

36�

42�

48�

54�

60�

66�

72�

78�

84�

90�

96�

102�

108�

114�

120�

126�

132�

138�

144�

150�

156�

162�

168�174�180�186�

192�198�

204�

210�

216�

222�

228�

234�

240�

246�

252�

258�

264�

270�

276�

282�

288�

294�

300�

306�

312�

318�

324�

330�

336�342�

348�354�

0� 5� 10�15�

20�

25�

30�

35�

40�

45�

50�

55�

60�

65�

70�

75�

80�

85�

90�

95�

100�

105�

110�

115�

120�

125�

130�

135�

140�

145�

150�

155�

160�

165�170�175�180�185�190�

195�200�

205�210�

215�

220�

225�

230�

235�

240�

245�

250�

255�

260�

265�

270�

275�

280�

285�

290�

295�

300�

305�

310�

315�

320�

325�

330�335�

340�345�

350� 355�

0� 4� 8� 12�16�

20�

24�

28�

32�

36�

40�

44�

48�

52�

56�

60�

64�

68�

72�

76�

80�

84�

88�

92�

96�

100�

104�

108�

112�

116�

120�

124�

128�

132�

136�

140�

144�

148�

152�

156�

160�164�

168�172�176�180�184�188�192�196�

200�204�

208�212�

216�

220�

224�

228�

232�

236�

240�

244�

248�

252�

256�

260�

264�

268�

272�

276�

280�

284�

288�

292�

296�

300�

304�

308�

312�

316�

320�

324�328�

332�336�

340�344�

348� 352� 356�

15Thursday, October 24, 13

Page 16: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

\begin{tikzpicture}[scale=0.5] \coordinate (c1) at (0,0); \draw[fill=blue!50] % Calm winds ( (c1) + (0:25mm) ) arc (0:360:25mm);

\draw[fill=green!60] % South winds; slow % initial=247.5, final=292.5 ( (c1) + (247.5:25mm) ) arc (247.5:292.5:25mm) -- % reversed ( (c1) + (292.5:50mm) ) arc (292.5:247.5:50mm) -- cycle;

\draw[fill=yellow!80] % South winds faster ( (c1) + (247.5:50mm) ) arc (247.5:292.5:50mm) -- ( (c1) + (292.5:75mm) ) arc (292.5:247.5:75mm) -- cycle

\draw[fill=yellow!80] % North winds faster % initial=22.5, final=112.5 ( (c1) + (67.5:25mm) ) arc (67.5:112.5:25mm) -- ( (c1) + (112.5:50mm) ) arc (112.5:67.5:50mm) -- cycle; \foreach \pcent in {10,20,...,100}{ \draw (0,0) circle (\pcent mm); % Label radii \draw (0,\pcent mm) node[left,fill=white] {\pcent};}\end{tikzpicture}

CONTINUING A WIND ROSE

10

20

30

40

50

60

70

80

90

100

16

16Thursday, October 24, 13

Page 17: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

LABELS AND RINGS AND RADII

\begin{tikzpicture}[rotate=90, scale=0.55] % center c1 \coordinate (c1) at (0,0);

\draw[fill=blue!50] % radius=25mm, initial=0, final=360 %([shift={(0:3mm)}]c1) arc (0:90:3mm) ($(c1) + (0:25mm)$) arc (0:360:25mm);

\draw[fill=green!60] % initial=247.5, final=292.5 ! That’s West! ($(c1) + (247.5:25mm)$) arc (247.5:292.5:25mm) -- % reversed ($(c1) + (292.5:50mm)$) arc (292.5:247.5:50mm) -- cycle;

\draw[fill=yellow!80]Notice that the angles are centered on 270 ($(c1) + (247.5:50mm)$) arc (247.5:292.5:50mm) -- % , reversed ($(c1) + (292.5:75mm)$) arc (292.5:247.5:75mm) -- cycle;

\foreach \pcent in {10,20,...,100}{%\draw (c1) arc[radius = \pcent mm, start angle= 0, end angle= 0]

\draw (c1) circle (\pcent mm); \draw (\pcent mm, 0) node[left,fill=green!20] {\pcent};} \draw (c1) circle(100 mm);\foreach \direction/\label in {% 0/N, 45/NE, 90/E, 135/SE, 180/S, 225/SW, 270/W, 315/NW}% {\node[fill=green!10] at ( -\direction : 100mm) {\label}; }

\end{tikzpicture}

N

NE

E

SE

S

SW

W

NW

10

20

30

40

50

60

70

80

90

100

17

17Thursday, October 24, 13

Page 18: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

LABELS AND RINGS AND RADII

8 Directions

Three wind speed bins

18

N

NE

E

SE

S

SW

W

NW

10

20

30

40

50

60

70

80

90

100

18Thursday, October 24, 13

Page 19: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

THE CNETER

Rings ( % )

Central Beaufort Zero

36 Wind Directions

Beaufort One

0.1

0.2

0.3

0.4

0.5

19

19Thursday, October 24, 13

Page 20: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

EXAMPLE: BEGINNING

20

\pgfmathsetmacro{\MaxRad}{0.5}\pgfmathsetmacro{\HalfAngle}{5}

\begin{tikzpicture}[rotate=90, scale=50.5] \coordinate (c1) at (0,0); % center c1\def\Bzero_N{0.16} \draw[fill=blue!50] % Beaufort Zero ($(c1) + (0:\Bzero_N mm)$) arc (0:360:\Bzero_N mm);

\draw (c1) circle(\MaxRad mm);\pgfmathsetmacro{\lastradius}{\Bzero_N}% Beaufort 1\def\BiN{0.30} \def\BiNi{0.31} \def\BiNii{0.27} \def\BiNiii{0.26} \def\BiNiv{0.32} \def\BiNv{0.28} \def\BiNvi{0.29} \def\BiNvii{0.22} \def\BiNviii{0.38} \def\BiNix{0.31} \def\BiNx{0.30} \def\BiNxi{0.24} \def\BiNxii{0.32} \def\BiNxiii{0.30} \def\BiNxiv{0.40} \def\BiNxv{0.34} \def\BiNxvi{0.29} \def\BiNxvii{0.28} \def\BiNxviii{0.27} \def\BiNxix{0.29} \def\BiNxx{0.28} \def\BiNxxi{0.44} \def\BiNxxii{0.28} \def\BiNxxiii{0.23} \def\BiNxxiv{0.25} \def\BiNxxv{0.23} \def\BiNxxvi{0.21} \def\BiNxxvii{0.19} \def\BiNxxviii{0.22} \def\BiNxxix{0.23} \def\BiNxxx{0.24} \def\BiNxxxi{0.21} \def\BiNxxxii{0.23} \def\BiNxxxiii{0.30} \def\BiNxxxiv{0.32} \def\BiNxxxv{0.32} \def\BiNxxxvi{0.29}

\foreach \direction/\thisradius in { 0/\BiN, 10/\BiNi, 20/\BiNii, 30/\BiNiii, 40/\BiNiv, 50/\BiNv, 60/\BiNvi, 70/\BiNvii, 80/\BiNviii, 90/\BiNix, 100/\BiNx, 110/\BiNxi, 120/\BiNxii, 130/\BiNxiii, 140/\BiNxiv, 150/\BiNxv, 160/\BiNxvi, 170/\BiNxvii, 180/\BiNxviii, 190/\BiNxix, 200/\BiNxx, 210/\BiNxxi, 220/\BiNxxii, 230/\BiNxxiii, 240/\BiNxxiv, 250/\BiNxxv, 260/\BiNxxvi, 270/\BiNxxvii, 280/\BiNxxviii, 290/\BiNxxix, 300/\BiNxxx, 310/\BiNxxxi, 320/\BiNxxxii, 330/\BiNxxxiii,340/\BiNxxxiv, 350/\BiNxxxv}{%

\draw[fill=green!60] $(c1) + (-\direction-\HalfAngle:\lastradius mm)$) arc (-\direction -\HalfAngle: -\direction +\HalfAngle:\lastradius mm) -- % reversed ($(c1) + (-\direction +\HalfAngle:\thisradius mm)$) arc (-\direction +\HalfAngle:-\direction -\HalfAngle:\thisradius mm) -- cycle;}

\foreach \pcent in {0.1,0.2,0.3,0.4,0.5}{ %Draw the percent rings, labels \draw [color=darkgray] (c1) circle (\pcent mm); \draw (\pcent mm, 0) node[left,fill=green!20] {\pcent}; } %end foreach

\end{tikzpicture}

20Thursday, October 24, 13

Page 21: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

0.25

0.5

0.75

1.0

1.25

1.5

ADDING BEAUFORT 2 DATA

21

0� 10�

20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�

170�180�190�200�

210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�

340�350�

0.25%

0.5%

0.75%

1.0%

1.25%

1.5%

1.75%

21Thursday, October 24, 13

Page 22: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

LABELS AND RADII AND RINGS, OH MY!

\foreach \direction in {%%\foreach \direction/\label in {% 0,10,...,350}{% % 0/N, 45/NE, 90/E, 135/SE, 180/S, 225/SW, 270/W, 315/NW}{% \draw[rotate=-\direction,color=lightgray] (0,0.5mm) -- (0,\MaxRad mm); \node[fill=green!10] at ( -\direction : \MaxRad mm) {\direction ${}^\circ$};% \node[fill=green!10] at ( -\direction : \MaxRad mm) {\label};

}

%Draw the percent rings and label

\foreach \pcent in {0.25,0.5,0.75,1.0,1.25,1.5,1.75}{ \draw [color=darkgray] (c1) circle (\pcent mm); \draw (\pcent mm, 0) node[left,fill=green!20] {\pcent \%};}\end{tikzpicture}

22

22Thursday, October 24, 13

Page 23: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

Degree labels

Second Ring of winds

Radial Direction lines

0� 10�

20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�

170�180�190�200�

210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�

340�350�

0.25%

0.5%

0.75%

1.0%

1.25%

1.5%

1.75%

23

23Thursday, October 24, 13

Page 24: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

% Beaufort 2\def\BiiN{0.80} \def\BiiNi{0.76} \def\BiiNii{0.70} \def\BiiNiii{0.59} \def\BiiNiv{0.81} \def\BiiNv{0.72} \def\BiiNvi{0.63} \def\BiiNvii{0.74} \def\BiiNviii{1.15} \def\BiiNix{0.94} \def\BiiNx{0.72} \def\BiiNxi{0.69} \def\BiiNxii{0.96} \def\BiiNxiii{1.08} \def\BiiNxiv{1.13} \def\BiiNxv{0.91} \def\BiiNxvi{0.71} \def\BiiNxvii{0.81} \def\BiiNxviii{1.20} \def\BiiNxix{1.52} \def\BiiNxx{1.51} \def\BiiNxxi{1.46} \def\BiiNxxii{1.18} \def\BiiNxxiii{1.06} \def\BiiNxxiv{0.72} \def\BiiNxxv{0.65} \def\BiiNxxvi{0.61} \def\BiiNxxvii{0.55} \def\BiiNxxviii{0.78} \def\BiiNxxix{0.77} \def\BiiNxxx{0.91} \def\BiiNxxxi{0.57} \def\BiiNxxxii{0.65} \def\BiiNxxxiii{0.74} \def\BiiNxxxiv{0.95} \def\BiiNxxxv{0.94}

\foreach \direction/\thisradius\lastradius in {%

0/\BiiN/\BiN, 10/\BiiNi/\BiNi, 20/\BiiNi/\BiNii, 30/\BiiNiii/\BiNiii, 40/\BiiNiv/\BiNiv, 50/\BiiNv/\BiNv, 60/\BiiNvi/\BiNvi, 70/\BiiNvii/\BiNvii, 80/\BiiNviii/\BiNviii, 90/\BiiNix/\BiNix, 100/\BiiNx/\BiNx, 110/\BiiNxi/\BiNxi, 120/\BiiNxii/\BiNxii, 130/\BiiNxiii/\BiNxiii, 140/\BiiNxiv/\BiNxiv, 150/\BiiNxv/\BiNxv, 160/\BiiNxvi/\BiNxvi, 170/\BiiNxvii/\BiNxvii, 180/\BiiNxviii/\BiNxviii, 190/\BiiNxix/\BiNxix, 200/\BiiNxx/\BiNxx, 210/\BiiNxxi/\BiNxxi, 220/\BiiNxxii/\BiNxxii, 230/\BiiNxxiii/\BiNxxiii, 240/\BiiNxxiv/\BiNxxiv, 250/\BiiNxxv/\BiNxxv, 260/\BiiNxxvi/\BiNxxvi, 270/\BiiNxxvii/\BiNxxvii, 280/\BiiNxxviii/\BiNxxviii, 290/\BiiNxxix/\BiNxxix, 300/\BiiNxxx/\BiNxxx, 310/\BiiNxxxi/\BiNxxxi, 320/\BiiNxxxii/\BiNxxxii, 330/\BiiNxxxiii/\BiNxxx, 340/\BiiNxxxiv/\BiNxxxiv, 350/\BiiNxxxv/\BiNxxxv}{%

\draw[fill=blue!40] ($(c1) + (-\direction-\HalfAngle:\lastradius mm)$) arc (-\direction -\HalfAngle: -\direction +\HalfAngle:\lastradius mm) -- % reversed ($(c1) + (-\direction +\HalfAngle:\thisradius mm)$) arc (-\direction +\HalfAngle:-\direction -\HalfAngle:\thisradius mm) -- cycle; }

24

24Thursday, October 24, 13

Page 25: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

BEAUFORT 3; VARIABLE WINDS

Adding Beaufort 3, 4, 5, and 6 will be just like adding Beaufort 2

We added the variable winds that were coded as 990 (the red dot in the center)

0� 10�

20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�

170�180�190�200�

210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�

340�350�

0.25%

0.5%

0.75%

1.0%

1.25%

1.5%

1.75%

25

25Thursday, October 24, 13

Page 26: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

DRAWING THE VARIABLE WINDS THE BEAUFORT ZERO WINDS

26

\def\Bzero_N{0.03} \draw[fill=red!50] % Variable winds 990 ($(c1) + (0:\Bzero_N mm)$) arc (0:360:\Bzero_N mm);

\pgfmathsetmacro{\minlastradius}{\Bzero_N}\def\Bzero_N{0.16}

\draw[fill=blue!40] ($(c1) + (0:\minlastradius mm)$) arc (0:360:\minlastradius mm) -- % reversed ($(c1) + (360:\Bzero_N mm)$) arc (360:0:\Bzero_N mm) -- cycle;

26Thursday, October 24, 13

Page 27: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

BOSTON 2012

Here is the data from 2012 in Boston

Need some better colors

Still need a legend or key

0� 10�

20�

30�

40�

50�

60�

70�

80�

90�

100�

110�

120�

130�

140�

150�

160�

170�180�190�200�

210�

220�

230�

240�

250�

260�

270�

280�

290�

300�

310�

320�

330�

340�350�

0.5%

1.0%

1.5%

2%

2.5%

3%

3.5%

4%

4.5%

5%

5.5%

27

27Thursday, October 24, 13

Page 28: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

GETTING CLOSEWe are almost complete.

We have our wind statistics reasonably displayed on a polar plot; everything is in the “right” order

But; the scale; rings, and arcs are obscured; let’s draw them last!

N

NE

E

SE

S

SW

W

NW

5

10

15

20

25

28

28Thursday, October 24, 13

Page 29: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

PUTTING THE LINES ON THE “TOP”

N

NE

E

SE

S

SW

W

NW

5

10

15

20

25

N

NE

E

SE

S

SW

W

NW

5

10

15

20

25

29

29Thursday, October 24, 13

Page 30: WIND ROSES FOR TeX DOCUMENTSwind roses for tex documents ... 0 140 150 0 0 0 0 0 0 0 0 0 250 ... 192 168 216 240 264 288 312 336 n nne ne ene e ese se sse s ssw sw wsw w wnw nw nnw

CLOSER YET?Still to do

We need a legend

Generalize a bit more; reusable macros

Is it robust? How can we break it?

Automate data ingest

csvsimple ?

N

NE

E

SE

S

SW

W

NW

5

10

15

20

25

30

30Thursday, October 24, 13