# [Met_help] [rt.rap.ucar.edu #92472] History for MET-TC Questions

John Halley Gotway via RT met_help at ucar.edu
Fri Oct 11 16:21:01 MDT 2019

```----------------------------------------------------------------
Initial Request
----------------------------------------------------------------

I hope this email finds you well.
It's me again Alvin from PAGASA (PHILIPPINES).

I am trying to calculate the Along Track (AT) and Cross Track (CT) error in Excel.
I know that these statistics are in the MET package, but I am trying to figure out how it was being calculated.

Currently, I adopt the method below.

1. First, calculate the angle due north between the previous observation (OB1) and the verifying observation (OB2), call it Angle O.
2. Second, calculate the angle due north between the verifying observation (OB2) and the model forecast position (FC), call this angle P.
3. I subtract Angle P to Angle O to get the internal angle of the 90 degree-triangle  ( call this angle Q).
4. Since I have the DPE (great circle distance formula), I calculate the CT and AT using the sine and cosine function.

AT = DPE * cos (angle P)
CT = DPE * sin (angle P)

I compared my result, but it seems the value I calculated is different as well as the sign.
I  check the code in the MET package and I think it has a different approach in calculating the AT and CT.
I attached the excel and the text file (sample product of other verification packages) in which I compared my result.

Alvin

----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------

Subject: MET-TC Questions
From: John Halley Gotway
Time: Mon Oct 07 09:51:07 2019

Hi Alvin,

I moved your question over to the MET-Help queue.  In the future,
please direct questions about MET to met_help at ucar.edu.  That way, you
should get a timely answer from one of our support staff, and we can
better track the support we provide.

I see that you have a question about how MET is computing along and
cross track errors in the tc-pairs tool.  The MET-TC tools (tc_dland,
tc_pairs, and tc_stat) started as a re-implementation of the
verification tools used at the United States National Hurricane
Center.  While we ported most of the logic over from FORTRAN to C++,
we did leave some code in FORTRAN.  And that includes the computation
of the along and cross-track errors.  They are computed in the
function named "acerr" in this file:

src/tools/tc_utils/tc_pairs/acerr.f

Please take a look at the notes included at the top of that file for a
description of the logic.

Hope that helps.

Thanks,
John Halley Gotway

------------------------------------------------
Subject: MET-TC Questions
From: Alvin Pura
Time: Mon Oct 07 20:23:26 2019

Hi,

I checked the *acerr.f file*. I think i figured out how the dx and dy
were
calculated.
But I have some clarifications about how the *head(n)* in the equation
below were calculated.
Is it the bearing angle from the previous observation and the
verifying
observation?

Thank you.

Regards
--

* Alvin G. Pura*
Weather Specialist I - Numerical Modeling Section,
Research and Development & Training Division,
Philippine Atmospheric Geophysical and Astronomical Services
phone: +639668759459
emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph>*
*alvingpura at gmail.com <alvingpura at gmail.com>*

------------------------------------------------
Subject: MET-TC Questions
From: John Halley Gotway
Time: Tue Oct 08 09:30:50 2019

Alvin,

The "head" is the heading of the storm, and that's computed in the
sthcal()
subroutine.  In that subroutine, the heading for the current point is
computed using the lat/lon from the current point and the lat/lon from
the
previous point:

301       do n=nfirst+1,nlast
302       rlat2 = blat(n  )
303       rlat1 = blat(n-1)
304       rlon2 = blon(n  )
305       rlon1 = blon(n-1)

Using the previous and current lat/lon, it computes the storm's
direction
of travel.  And here's a comment about how the heading is defined:

294 c     This routine calculates the storm heading measured CCW
295 c     in degrees CCW relative to the +x axis (east).

Hope that helps clarify.

Thanks,
John

On Mon, Oct 7, 2019 at 8:23 PM Alvin Pura via RT <met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92472 >
>
> Hi,
>
> I checked the *acerr.f file*. I think i figured out how the dx and
dy were
> calculated.
> But I have some clarifications about how the *head(n)* in the
equation
> below were calculated.
> Is it the bearing angle from the previous observation and the
verifying
> observation?
>
>
> Thank you.
>
> Regards
> --
>
> * Alvin G. Pura*
>  Weather Specialist I - Numerical Modeling Section,
>  Research and Development & Training Division,
>  Philippine Atmospheric Geophysical and Astronomical Services