[Met_help] [rt.rap.ucar.edu #57618] History for Wind direction errors (UNCLASSIFIED)
Tressa Fowler via RT
met_help at ucar.edu
Thu Aug 9 14:20:26 MDT 2012
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Classification: UNCLASSIFIED
Caveats: NONE
I want to manually calculate the wind direction errors from point wind
profiles produced by a high resolution wind model. I have direction and
speed at several levels in the vertical from the model and from the wind
profiler located at the same point for which the model output was produced.
All the data is all at the same levels AGL. For speed I have a spreadsheet
which computes the model-observation differences, absolute value of the
differences and the square of the differences at each level (for each F-O
pair) and from that I calculate the ME, MAE and RMSE.
I want to do the same thing for direction, but I'm running into instances
where the direction difference exceeds 180 degrees. How can you get around
this problem since it doesn't seem right to include such differences in the
statistics?
Thanks.
R/
John
Mr John W. Raby, Meteorologist
U.S. Army Research Laboratory
White Sands Missile Range, NM 88002
(575) 678-2004 DSN 258-2004
FAX (575) 678-1230 DSN 258-1230
Email: john.w.raby2.civ at mail.mil
Classification: UNCLASSIFIED
Caveats: NONE
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Wind direction errors (UNCLASSIFIED)
From: Tressa Fowler
Time: Fri Jul 27 14:32:31 2012
Hi John,
Wind directions errors are a bit tricky to calculate. I am going to
have Randy get back to you next week when he is back in the office.
Tressa
On Thu Jul 26 15:49:19 2012, john.w.raby2.civ at mail.mil wrote:
> Classification: UNCLASSIFIED
> Caveats: NONE
>
> I want to manually calculate the wind direction errors from point
wind
> profiles produced by a high resolution wind model. I have direction
and
> speed at several levels in the vertical from the model and from the
wind
> profiler located at the same point for which the model output was
produced.
> All the data is all at the same levels AGL. For speed I have a
spreadsheet
> which computes the model-observation differences, absolute value of
the
> differences and the square of the differences at each level (for
each F-O
> pair) and from that I calculate the ME, MAE and RMSE.
>
> I want to do the same thing for direction, but I'm running into
instances
> where the direction difference exceeds 180 degrees. How can you get
around
> this problem since it doesn't seem right to include such differences
in the
> statistics?
>
> Thanks.
>
> R/
> John
>
> Mr John W. Raby, Meteorologist
> U.S. Army Research Laboratory
> White Sands Missile Range, NM 88002
> (575) 678-2004 DSN 258-2004
> FAX (575) 678-1230 DSN 258-1230
> Email: john.w.raby2.civ at mail.mil
>
>
> Classification: UNCLASSIFIED
> Caveats: NONE
>
>
------------------------------------------------
Subject: Wind direction errors (UNCLASSIFIED)
From: Raby, John W USA CIV
Time: Fri Jul 27 14:49:50 2012
Classification: UNCLASSIFIED
Caveats: NONE
Thanks, Tressa.
-----Original Message-----
From: Tressa Fowler via RT [mailto:met_help at ucar.edu]
Sent: Friday, July 27, 2012 2:33 PM
To: Raby, John W CIV (US)
Subject: [rt.rap.ucar.edu #57618] Wind direction errors (UNCLASSIFIED)
Hi John,
Wind directions errors are a bit tricky to calculate. I am going to
have Randy
get back to you next week when he is back in the office.
Tressa
On Thu Jul 26 15:49:19 2012, john.w.raby2.civ at mail.mil wrote:
> Classification: UNCLASSIFIED
> Caveats: NONE
>
> I want to manually calculate the wind direction errors from point
wind
> profiles produced by a high resolution wind model. I have direction
> and speed at several levels in the vertical from the model and from
> the wind profiler located at the same point for which the model
output was
> produced.
> All the data is all at the same levels AGL. For speed I have a
> spreadsheet which computes the model-observation differences,
absolute
> value of the differences and the square of the differences at each
> level (for each F-O
> pair) and from that I calculate the ME, MAE and RMSE.
>
> I want to do the same thing for direction, but I'm running into
> instances where the direction difference exceeds 180 degrees. How
can
> you get around this problem since it doesn't seem right to include
> such differences in the statistics?
>
> Thanks.
>
> R/
> John
>
> Mr John W. Raby, Meteorologist
> U.S. Army Research Laboratory
> White Sands Missile Range, NM 88002
> (575) 678-2004 DSN 258-2004
> FAX (575) 678-1230 DSN 258-1230
> Email: john.w.raby2.civ at mail.mil
>
>
> Classification: UNCLASSIFIED
> Caveats: NONE
>
>
Classification: UNCLASSIFIED
Caveats: NONE
------------------------------------------------
Subject: Re: Fwd: [rt.rap.ucar.edu #57618] Wind direction errors (UNCLASSIFIED)
From: Randy Bullock
Time: Wed Aug 08 10:56:02 2012
Hello -
Tressa Fowler forwarded me your question about wind direction
errors. Unfortunately, it got buried under some stuff on my
desk, and I just noticed it again yesterday. Sorry for the
delay.
Regarding wind directions, there are two things that need some
care in order to be handled correctly: the quadrant and the
sense of the angle.
As you probably know, the xy-plane is divided into four quadrants.
So, for example, if I know the tangent of an angle is 1, I can't
automatically conclude that the angle is 45 degrees --- it might
also be 225 degrees. The tangent function is positive in both
the first and third quadrants. All the trigonometric functions
have some such quadrantal ambiguity to them, and it's a
continual nuisance to deal with this when you're writing code.
In some cases, quadrant doesn't matter. For example, the MODE
axis angles are unoriented, and thus take values only in a
180-degree range, not a 360-degree range. (We take the range
to be -90 to 90, but you could just as well take the range to
be 0 to 180.) So for MODE axis angles, only the first and fourth
quadrants are meaningful. An axis angle of 45 degrees means
the same thing as an axis angle of 225 degrees. When the quadrant
of an angle doesn't matter, then angles (and angle differences)
only make sense in a 180 degree range.
By the "sense" of an angle, I mean whether the angle is
clockwise or counter-clockwise. This is usually indicated
by calling one direction "positive" and the other direction
"negative".
Sometimes this matters, sometimes it doesn't. Sometimes all
we care about is that two directions make an angle of (say) 30
degrees ... other times it's important to know whether the
angle difference should be considered to be +30 or -30.
So ... for what you're doing you need to ask two questions:
(1) do I care about the quadrant of an angle (eg, do I want to
distinguish between 45 degrees and 225 degrees), and
(2) do I care about the sense of an angle (eg, do I only care
that an two wind vectors make an angle 30 degrees between them,
or to I need to distinguish between an clockwise angle difference
and a counterclockwise angle difference).
The two most common situations in practice are to answer yes
to both questions or to answer no to both.
If you answer no to both questions, then the formula for the
angle between two vectors using the dot product is the way
to go. It's hard to write math formulas in plain ascii text,
but I'll give it a try:
cos theta = (A . B)/ (|A| |B|)
where A and B are the two vectors, "A . B" is the dot product
of A and B, and "|V|" is the length of the vector V.
The inverse cosine will hand you back an angle in the range
0 to 180 degrees (actually, 0 to pi radians). This is what
you want if quadrant and angle sense don't matter.
If you answer yes to both questions, then you should consider
the two (two-dimensional) vectors as complex numbers, and
take the argument (ie, complex angle) of the quotient A/B.
The math library function "atan2" is useful for this, but be
careful of the order of the two arguments this function takes:
the "sin" term comes first and the "cos" term is second ... I've
always considered that a little counterintuitive. The atan2
function will hand you an angle in a 360-degree range, and
it will resolve both the quadrant and the sense of an angle
correctly.
Please note that no matter how you answered the two questions,
simple program code such as
angle_diff = angle_fcst - angle_obs
will **NOT** work. It correctly gets the sense but not the
quadrant of the angle. I'm guessing that's why you said you
were seeing angle differences of more than 180 degrees.
===================
I hope this (admittedly rather lengthy) explanation was useful to you.
Let me know if you have any other questions.
Randy Bullock
On Fri, Jul 27, 2012 at 01:16:58PM -0600, Tressa Fowler wrote:
> Hi Randy,
>
> Here's John Raby's question about wind direction errors.
>
> Tressa
>
> Begin forwarded message:
>
> > From: pgoldenb <pgoldenb at rap.ucar.edu>
> > Date: July 26, 2012 6:45:27 PM MDT
> > To: <tressa at ucar.edu>, <johnhg at ucar.edu>
> > Subject: Re: [rt.rap.ucar.edu #57618] Wind direction errors
(UNCLASSIFIED)
> >
> > Tressa,
> >
> > Do you have a good answer for John's question about how to
calculate the wind direction error? It seems to me that the error
range should be (-180,180], but I am not familiar with the state of
the wind verification art.
> >
> > Thanks,
> >
> > Paul
> >
> >
> > On 2012-07-26 15:49, Raby, John W USA CIV via RT wrote:
> >> Thu Jul 26 15:49:19 2012: Request 57618 was acted upon.
> >> Transaction: Ticket created by john.w.raby2.civ at mail.mil
> >> Queue: met_help
> >> Subject: Wind direction errors (UNCLASSIFIED)
> >> Owner: Nobody
> >> Requestors: john.w.raby2.civ at mail.mil
> >> Status: new
> >> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57618 >
> >>
> >>
> >> Classification: UNCLASSIFIED
> >> Caveats: NONE
> >>
> >> I want to manually calculate the wind direction errors from point
wind
> >> profiles produced by a high resolution wind model. I have
direction and
> >> speed at several levels in the vertical from the model and from
the wind
> >> profiler located at the same point for which the model output was
produced.
> >> All the data is all at the same levels AGL. For speed I have a
spreadsheet
> >> which computes the model-observation differences, absolute value
of the
> >> differences and the square of the differences at each level (for
each F-O
> >> pair) and from that I calculate the ME, MAE and RMSE.
> >>
> >> I want to do the same thing for direction, but I'm running into
instances
> >> where the direction difference exceeds 180 degrees. How can you
get around
> >> this problem since it doesn't seem right to include such
differences in the
> >> statistics?
> >>
> >> Thanks.
> >>
> >> R/
> >> John
> >>
> >> Mr John W. Raby, Meteorologist
> >> U.S. Army Research Laboratory
> >> White Sands Missile Range, NM 88002
> >> (575) 678-2004 DSN 258-2004
> >> FAX (575) 678-1230 DSN 258-1230
> >> Email: john.w.raby2.civ at mail.mil
> >>
> >>
> >> Classification: UNCLASSIFIED
> >> Caveats: NONE
>
------------------------------------------------
Subject: Wind direction errors (UNCLASSIFIED)
From: Raby, John W USA CIV
Time: Wed Aug 08 12:40:50 2012
Classification: UNCLASSIFIED
Caveats: NONE
Randy -
Thanks for your detailed response. I still thinking about what you
said about
defining exactly what we want to get out of the validation of wind
direction.
This information will be very useful to us as we refine the way we
approach
direction validation.
R/
John
-----Original Message-----
From: Randy Bullock via RT [mailto:met_help at ucar.edu]
Sent: Wednesday, August 08, 2012 10:56 AM
To: Raby, John W CIV (US)
Subject: Re: Fwd: [rt.rap.ucar.edu #57618] Wind direction errors
(UNCLASSIFIED)
Hello -
Tressa Fowler forwarded me your question about wind direction errors.
Unfortunately, it got buried under some stuff on my desk, and I just
noticed
it again yesterday. Sorry for the delay.
Regarding wind directions, there are two things that need some care in
order
to be handled correctly: the quadrant and the sense of the angle.
As you probably know, the xy-plane is divided into four quadrants.
So, for example, if I know the tangent of an angle is 1, I can't
automatically
conclude that the angle is 45 degrees --- it might also be 225
degrees. The
tangent function is positive in both the first and third quadrants.
All the
trigonometric functions have some such quadrantal ambiguity to them,
and it's
a continual nuisance to deal with this when you're writing code.
In some cases, quadrant doesn't matter. For example, the MODE axis
angles are
unoriented, and thus take values only in a 180-degree range, not a
360-degree
range. (We take the range to be -90 to 90, but you could just as well
take
the range to be 0 to 180.) So for MODE axis angles, only the first and
fourth
quadrants are meaningful. An axis angle of 45 degrees means the same
thing as
an axis angle of 225 degrees. When the quadrant of an angle doesn't
matter,
then angles (and angle differences) only make sense in a 180 degree
range.
By the "sense" of an angle, I mean whether the angle is clockwise or
counter-clockwise. This is usually indicated by calling one direction
"positive" and the other direction "negative".
Sometimes this matters, sometimes it doesn't. Sometimes all we care
about is
that two directions make an angle of (say) 30 degrees ... other
times it's
important to know whether the angle difference should be considered to
be +30
or -30.
So ... for what you're doing you need to ask two questions:
(1) do I care about the quadrant of an angle (eg, do I want to
distinguish
between 45 degrees and 225 degrees), and
(2) do I care about the sense of an angle (eg, do I only care that an
two wind
vectors make an angle 30 degrees between them, or to I need to
distinguish
between an clockwise angle difference and a counterclockwise angle
difference).
The two most common situations in practice are to answer yes to both
questions
or to answer no to both.
If you answer no to both questions, then the formula for the angle
between two
vectors using the dot product is the way to go. It's hard to write
math
formulas in plain ascii text, but I'll give it a try:
cos theta = (A . B)/ (|A| |B|)
where A and B are the two vectors, "A . B" is the dot product of A and
B, and
"|V|" is the length of the vector V.
The inverse cosine will hand you back an angle in the range
0 to 180 degrees (actually, 0 to pi radians). This is what you want
if
quadrant and angle sense don't matter.
If you answer yes to both questions, then you should consider the two
(two-dimensional) vectors as complex numbers, and take the argument
(ie,
complex angle) of the quotient A/B.
The math library function "atan2" is useful for this, but be careful
of the
order of the two arguments this function takes:
the "sin" term comes first and the "cos" term is second ... I've
always
considered that a little counterintuitive. The atan2 function will
hand you
an angle in a 360-degree range, and it will resolve both the quadrant
and the
sense of an angle correctly.
Please note that no matter how you answered the two questions, simple
program
code such as
angle_diff = angle_fcst - angle_obs
will **NOT** work. It correctly gets the sense but not the quadrant
of the
angle. I'm guessing that's why you said you were seeing angle
differences of
more than 180 degrees.
===================
I hope this (admittedly rather lengthy) explanation was useful to you.
Let me know if you have any other questions.
Randy Bullock
On Fri, Jul 27, 2012 at 01:16:58PM -0600, Tressa Fowler wrote:
> Hi Randy,
>
> Here's John Raby's question about wind direction errors.
>
> Tressa
>
> Begin forwarded message:
>
> > From: pgoldenb <pgoldenb at rap.ucar.edu>
> > Date: July 26, 2012 6:45:27 PM MDT
> > To: <tressa at ucar.edu>, <johnhg at ucar.edu>
> > Subject: Re: [rt.rap.ucar.edu #57618] Wind direction errors
> > (UNCLASSIFIED)
> >
> > Tressa,
> >
> > Do you have a good answer for John's question about how to
calculate the
> > wind direction error? It seems to me that the error range should
be
> > (-180,180], but I am not familiar with the state of the wind
verification
> > art.
> >
> > Thanks,
> >
> > Paul
> >
> >
> > On 2012-07-26 15:49, Raby, John W USA CIV via RT wrote:
> >> Thu Jul 26 15:49:19 2012: Request 57618 was acted upon.
> >> Transaction: Ticket created by john.w.raby2.civ at mail.mil
> >> Queue: met_help
> >> Subject: Wind direction errors (UNCLASSIFIED)
> >> Owner: Nobody
> >> Requestors: john.w.raby2.civ at mail.mil
> >> Status: new
> >> Ticket <URL:
> >> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=57618 >
> >>
> >>
> >> Classification: UNCLASSIFIED
> >> Caveats: NONE
> >>
> >> I want to manually calculate the wind direction errors from point
> >> wind profiles produced by a high resolution wind model. I have
> >> direction and speed at several levels in the vertical from the
> >> model and from the wind profiler located at the same point for
which the
> >> model output was produced.
> >> All the data is all at the same levels AGL. For speed I have a
> >> spreadsheet which computes the model-observation differences,
> >> absolute value of the differences and the square of the
differences
> >> at each level (for each F-O
> >> pair) and from that I calculate the ME, MAE and RMSE.
> >>
> >> I want to do the same thing for direction, but I'm running into
> >> instances where the direction difference exceeds 180 degrees. How
> >> can you get around this problem since it doesn't seem right to
> >> include such differences in the statistics?
> >>
> >> Thanks.
> >>
> >> R/
> >> John
> >>
> >> Mr John W. Raby, Meteorologist
> >> U.S. Army Research Laboratory
> >> White Sands Missile Range, NM 88002
> >> (575) 678-2004 DSN 258-2004
> >> FAX (575) 678-1230 DSN 258-1230
> >> Email: john.w.raby2.civ at mail.mil
> >>
> >>
> >> Classification: UNCLASSIFIED
> >> Caveats: NONE
>
Classification: UNCLASSIFIED
Caveats: NONE
------------------------------------------------
More information about the Met_help
mailing list