[wxqc] Text to Degrees
Norm Shea
Norm.Shea at kiawah-owners.org
Sun Apr 8 23:18:18 CDT 2007
I guess I should have provided a little more information. Here is a portion
of the data I'm getting from our weather station.
Date Time Direction
06/22/2006 00:00 E
06/22/2006 00:15 ESE
06/22/2006 00:30 ENE
06/22/2006 00:45 SW
06/22/2006 01:00 S
06/22/2006 01:15 SSE
06/22/2006 01:30 SW
06/22/2006 01:45 S
06/22/2006 02:00 S
06/22/2006 02:15 SSE
06/22/2006 02:30 S
06/22/2006 02:45 S
06/22/2006 03:00 SSE
06/22/2006 03:15 S
06/22/2006 03:30 S
06/22/2006 03:45 SSE
06/22/2006 04:00 SSW
06/22/2006 04:15 SSE
06/22/2006 04:30 SE
06/22/2006 04:45 S
06/22/2006 05:00 S
06/22/2006 05:15 S
06/22/2006 05:30 S
I guess this discussion has raised another issue that I will have to address
(which is, how are the quarter hour directions determined? But I'm going to
push forward on my original question right now). So, I've used a macro to
change the text to degrees using the format I mentioned
N 0
NNE 23
NE 45
ENE 68
E 90
ESE 113
SE 135
SSE 158
S 180
SSW 203
SW 225
WSW 248
W 270
WNW 293
NW 315
NNW 338
and created this
Date Time Direction
06/22/2006 00:00 90
06/22/2006 00:15 113
06/22/2006 00:30 68
06/22/2006 00:45 225
06/22/2006 01:00 180
06/22/2006 01:15 158
06/22/2006 01:30 225
06/22/2006 01:45 180
06/22/2006 02:00 180
06/22/2006 02:15 158
06/22/2006 02:30 180
06/22/2006 02:45 180
06/22/2006 03:00 158
06/22/2006 03:15 180
06/22/2006 03:30 180
06/22/2006 03:45 158
06/22/2006 04:00 203
06/22/2006 04:15 158
06/22/2006 04:30 135
06/22/2006 04:45 180
06/22/2006 05:00 180
06/22/2006 05:15 180
06/22/2006 05:30 180
I have this data going back to 2000 in Excel spreadsheets and I'm interested
in determining the predominant wind direction for each month and each year
at our site. I'm not necessarily interested in a running predominant
direction, just historical information.
I initially just averaged the data per month and per year. Out of
curiosity, for N, I substituted 360 for 0 and got completely different (not
surprisingly now that I think about it) monthly and yearly "average wind
directions." This told me I was not doing something right but I thought
there must be a way that historical predominant wind direction is
determined. Assuming that each year's spreadsheet has about 35000 rows of
readings, I'm hoping to not have to do a lot of actual manipulation of the
data. I could always sort the data by "text" wind direction without
converting it, then sort it by date and count how many rows per month and
per year there is for each direction but I was hoping there would be a less
labor-intensive way. I'm particularly interested in a macro if anyone has
one or any suggestions.
Thanks,
Norm
Norm Shea
Director, Lakes Management
Kiawah Island Community Association Inc
20 Kestrel Court, Kiawah Island, SC 29455
Phone 843-768-2315 x 255 Fax 843-768-0298 Mobile 843-708-3608
Norm.Shea at kiawah-owners.org --- www.kiawah-owners.org
-----Original Message-----
From: wxqc-bounces at lists.gladstonefamily.net
[mailto:wxqc-bounces at lists.gladstonefamily.net] On Behalf Of Keith Miller
Sent: Sunday, 08 Apr 2007 22:13
To: 'Discussion of weather data quality issues'
Subject: Re: [wxqc] Text to Degrees
> -----Original Message-----
> From: wxqc-bounces at lists.gladstonefamily.net
[mailto:wxqc-bounces at lists.gladstonefamily.net]On Behalf Of Steve Hatchett
> Sent: Sunday, April 08, 2007 9:52 PM
> To: 'Discussion of weather data quality issues'
> Subject: Re: [wxqc] Text to Degrees
>
>
> For converting degrees to text, I like the following:
> http://www.tnetweather.com/nb-0002.php
>
> which is basically a two line function $windlabel = array ("N","NNE",
> "NE", "ENE", "E", "ESE", "SE", "SSE",
"S",
> "SSW","SW", "WSW", "W", "WNN", "NW", "NNW"); $dir = $windlabel[
> fmod((($winddir + 11) / 22.5),16) ];
>
Gee, that looks more complicated than mine:
function Deg2Card($degrees)
{
$cardinal = array('N','NNE', 'NE',
'ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','
N');
return $cardinal[round(($degrees / 22.5), 0)]; }
Keith
--
CW5250 => http://weather.stadhaugh.com
_______________________________________________
wxqc mailing list
Post messages to wxqc at lists.gladstonefamily.net To unsubcribe or change
delivery options, please go to:
http://server.gladstonefamily.net/mailman/listinfo/wxqc
The contents of this message are the responsibility of the author.
More information about the wxqc
mailing list