review of paper - jun, 27th

35
Introduction Standard Forward Recursions Modified Forward Methods Numerical Tests Summary A unified approach to the Clenshaw summation and the recursive computation of very high degree and order normalised associated Legendre functions (Holmes and Featherstone, 2002) Eduardo da Silva Lema Division of Earth and Planetary Sciences Department of Geophysics Geodesy Labo. June 27, 2012 E.S. Lema Geoid Seminar

Upload: dulema

Post on 10-Jan-2017

165 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

A unified approach to the Clenshawsummation and the recursive computation of

very high degree and order normalisedassociated Legendre functions

(Holmes and Featherstone, 2002)

Eduardo da Silva Lema

Division of Earth and Planetary SciencesDepartment of Geophysics

Geodesy Labo.

June 27, 2012E.S. Lema Geoid Seminar

Page 2: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Outline

1 Introduction

2 Standard Forward Recursions

3 Modified Forward Methods

4 Numerical Tests

E.S. Lema Geoid Seminar

Page 3: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Legendre Polynomials

Spherical Harmonics expansion of gravity potentialMaximum degree is increasing

Wenzel (1998), degree 1800EGM2008, degree 2190

High degree SH is important for other disciplines as wellMeteorologyQuantum PhysicsElectronic Engineering

Computation of Legendre Polynomials is the mainchallenge involved

E.S. Lema Geoid Seminar

Page 4: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Spherical Harmonics Expansion

Truncated SH reduce to sums of ALFs or their derivativesIn fact: S(d) = cΣmΩ

(d)m

where: Ω(d)m = Σα=1,2

X (d)mαcosmα, forα = 1

X (d)mαsinmα, forα = 2

and: X (d)mα = ΣnEnmαP(d)

nm (θ)

P(d)nm (θ) are the fully normalized ALF

E.S. Lema Geoid Seminar

Page 5: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

SH expansion of Earth’s Gravity

In general. . .

V (r , θ, λ) = GMr +

GMr Σn

(ar

)nΣm

(

Cnm1cosmλ+ Cnm2sinmλ)

P(d)nm (θ)

Or, alternatively. . .

V (r , θ, λ) = GMr +

GMr Σm

[

cosmλΣn(a

r

)n Cnm1P(d)nm (θ)sinmλΣn

(ar

)n Cnm2P(d)nm (θ)

]

So that:Enmα =

(ar

)n Cnmα, α = 1,2Xmα = Σn

(ar

)n CnmαPnm(θ)

E.S. Lema Geoid Seminar

Page 6: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Numerical considerations

Standard recursions compute ALF directlySimpleWork well for low degrees

Issues for ultra-high degrees (e.g. 2700)∣

∣Pnm(θ)∣

∣ can range over 5000 orders of mag.IEEE standard ranges doesn’t span these values (about620 o. mag.)Underflow, i.e., values so small that are set to zeroOverflow, i.e., values so large that are set to NaN

E.S. Lema Geoid Seminar

Page 7: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Clenshaw’s method

Standard alternative for ultra-high degreesStableComputes both S and S(1)

But. . .

Derivation is based on matrix algebra

Recursions are quite simple to implement

Doesn’t compute individual ALF

E.S. Lema Geoid Seminar

Page 8: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Forward Column

Non-sectoral-values

Pnm(θ) = anmtPn−1,m(θ)− bnmPn−2,m(θ), ∀n > mwhere t = cosθ

Sectoral values, Pmm(θ):

Serve as seed for the above recursion

Are computed by the following recursion:

Pmm(θ) = u√

2m+12m Pm−1,m−1(θ), ∀m > 1

where u = sinθP0,0(θ) = 1P1,1(θ) =

√3u

E.S. Lema Geoid Seminar

Page 9: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Forward Column

Figure: Schematic of forward column recursion

E.S. Lema Geoid Seminar

Page 10: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Forward Row

Non-sectoral-values

Pnm(θ) =1√

j

(

gnmtu Pn,m+1(θ)− hnmPn,m+2(θ)

)

, ∀n > m

where t = cosθ, u = sinθ, j = 2 for m = 0, j = 1 for m > 0

Sectoral values, Pmm(θ)

Serve as seed for the above recursion

Are computed by the following recursion:

Pmm(θ) = u√

2m+12m Pm−1,m−1(θ), ∀m > 1

P0,0(θ) = 1P1,1(θ) =

√3u

E.S. Lema Geoid Seminar

Page 11: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Forward Row

Figure: Schematic of forward row recursion

E.S. Lema Geoid Seminar

Page 12: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

First derivatives

Forward column

P(1)nm(θ) = 1

u

(

ntPnm(θ)− fnmPn−1,m(θ))

, ∀n ≥ m

Forward row

P(1)nm(θ) = m t

u Pnm(θ)− enmPn,m+1(θ), ∀n ≥ m

E.S. Lema Geoid Seminar

Page 13: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Numerical problems with standard forward methods

In double precision standards it underflows wheneverM>190020o ≤ θ ≤ 160o

um → 0 as m increasesStorage capacity of dp is exceeded

Corresponding ALF are masked and don’t influence finalSH

E.S. Lema Geoid Seminar

Page 14: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Modified Forward Row

As in Libbrecht (1985)

Pnm(θ)um = 1√

j

(

gnmt Pn,m+1(θ)

um+1 − hnmu2 Pn,m+2(θ)

um+2

)

, ∀n > m

And the corresponding seeds. . .

Pmm(θ)um =

2m+12m

Pm−1,m−1(θ)

um−1 , ∀m > 1

and P1,1(θ)

u1 =√

3

First derivatives

P(1)nm (θ)um = m t

uPnm(θ)

um − enmu Pn,m+1(θ)

um+1 , ∀n ≥ m

E.S. Lema Geoid Seminar

Page 15: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Modified Forward Row

The entries X (d)mα

um and Ω(d)mα

um are used to compute SH

To avoid underflow, Horner’s scheme is used to factorizeSH

Horner’s scheme

S(d) = cΩ(d)0 + cΣM≥m≥2

(

Ω(d)m

um u +Ω

(d)m−1

um−1

)

u

E.S. Lema Geoid Seminar

Page 16: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

First Modified Forward Column

Pnm(θ)um = anmt Pn−1,m(θ)

um − bnmPn−2,m(θ)

um , ∀n > m

P(1)nm (θ)um = 1

u

(

nt Pn−1,m(θ)um − fnm

Pn−2,m(θ)um

)

, ∀n ≥ m

E.S. Lema Geoid Seminar

Page 17: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Second Modified Forward Column

Pnm(θ)

Pmm(θ)= anmt Pn−1,m(θ)

Pmm(θ)− bnm

Pn−2,m(θ)

Pmm(θ), ∀n > m

P(1)nm (θ)

Pmm(θ)= 1

u

(

nt Pn−1,m(θ)

Pmm(θ)− fnm

Pn−2,m(θ)

Pmm(θ)

)

, ∀n ≥ m

E.S. Lema Geoid Seminar

Page 18: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Overflow in modified forward methods

Underflow is avoided byModifying algorithms as Libbrecht (1985)Computing SH using Horner’s scheme

In light of double precision standardsOverflow is still unavoidable for ultra-high degreesA global scale factor equaling 10−280 must be applied toALF

SH is obtained by multiplying S(d) by 10280

E.S. Lema Geoid Seminar

Page 19: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Overview

3 proposed methods are compared with standardClenshaw’s methods

MFC-1, MFC-2 and MFR vs RC, CLEN-1, CLEN-2

In the Tests they took M=2700 and evaluatedRelative numerical precisionNumerical efficiencyAccuracy

E.S. Lema Geoid Seminar

Page 20: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

It is defined as: RP =∣

s(d)(double)−s(d)(extended)s(d)(extended)

s(d) = Σm,nP(d)nm (θ)

Control values ares(d)(extended)Computed using CLEN-2Extended double precision

In the end, it is always < 10−9

E.S. Lema Geoid Seminar

Page 21: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of CLEN-1 and CLEN-2 for d=0

E.S. Lema Geoid Seminar

Page 22: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of MFC and CLEN-2 for d=0

E.S. Lema Geoid Seminar

Page 23: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of RC and CLEN-2 for d=0

E.S. Lema Geoid Seminar

Page 24: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of MFR and CLEN-2 for d=0

E.S. Lema Geoid Seminar

Page 25: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of CLEN-1 and CLEN-2 for d=1

E.S. Lema Geoid Seminar

Page 26: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of MFC and CLEN-2 for d=1

E.S. Lema Geoid Seminar

Page 27: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of RC and CLEN-2 for d=1

E.S. Lema Geoid Seminar

Page 28: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Relative numerical precision

Figure: Relative Precision of MFR and CLEN-2 for d=1

E.S. Lema Geoid Seminar

Page 29: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Numerical efficiency

Evaluated by computing the elapsed CPU times ofs = Σm,nPnm(θ)

s and s(1) = Σm,nP(1)nm (θ)

M=2700, θ

E.S. Lema Geoid Seminar

Page 30: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Numerical efficiency

Figure: CPU time for M=2700

E.S. Lema Geoid Seminar

Page 31: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Accuracy

Evaluated based on the identitiesΣM = Σ0≤m≤n≤M

(

Pnm(θ))2

= (M + 1)2, ∀θ

ΣM∗ = Σ0≤m≤n≤M

(

P(1)nm(θ)

)2= M(M+1)2(M+1)

4 , ∀0 < θ <

180o

whereΣ2700 = 7,295,401Σ2700∗ = 13,305,717,113,850

E.S. Lema Geoid Seminar

Page 32: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Accuracy

Thus, defined as followsNA =

Σ2700(comp)−7,295,4017,295,401

NA∗ =∣

Σ2700∗(comp)−13,305,717,113,85013,305,717,113,850

Computed value is never equal to real one due touncertainties

On the other hand they never exceeded 10−11

E.S. Lema Geoid Seminar

Page 33: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Accuracy

Figure: Accuracy of MFR and MFC for d=0

E.S. Lema Geoid Seminar

Page 34: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Accuracy

Figure: Accuracy of MFR and MFC for d=1

E.S. Lema Geoid Seminar

Page 35: Review of paper - jun, 27th

IntroductionStandard Forward Recursions

Modified Forward MethodsNumerical Tests

Summary

Summary

We need SH and its maximum degree is increasing.Standard methods to compute ALF don’t work forultra-high degrees.

Underflow and Overflow.

Standard Clenshaw’s methods have a more complicatedformulation and don’t give ALF.

OutlookProposed MFR makes use of CLEN’s Horner’s schemewhile keeping it as simple as Libbrecht (1985).MFR outperformed all in Num. eff and all but CLEN-2 in RP.Its uncertainty is < 10−12.

E.S. Lema Geoid Seminar