AOSC 652: Week 6, Day 1 - atmos.umd.edurjs/class/fall2016/week_06/AOSC652_2016_1003.pdfWhy might you...

29
Copyright © 2016 University of Maryland. This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016 1 Numerical Integration Week 6, Day 1 3 Oct 2016 Analysis Methods in Atmospheric and Oceanic Science AOSC 652

Transcript of AOSC 652: Week 6, Day 1 - atmos.umd.edurjs/class/fall2016/week_06/AOSC652_2016_1003.pdfWhy might you...

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

1

Numerical Integration

Week 6, Day 1

3 Oct 2016

Analysis Methods in Atmospheric and Oceanic Science

AOSC 652

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

2

AOSC 652: Analysis Methods in AOSC

OH Column: Units of 1012 molecules cm−2 OR1012 cm−2

How is Trop OH column from a model such as theGoddard “Global Modeling Initiative” (GMI)

Chemical Transport Model (CTM) found ???

Trop: Troposphere

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

3

AOSC 652: Analysis Methods in AOSC

τ CH4 : CH4 Lifetime with respect to loss by reaction w/ tropospheric OH

How found ?!?

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

4

GMIGEOS-Chem

DECCAM-Chem

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

5

Air Quality Model Satellite Data

AOSC 652: Analysis Methods in AOSC

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

6

22 March

NASA Aura MLS ClO490 K pot’l temp

~18 km22 March

2010 2011

ppb ppb

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

7

2 October 2011

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

8

2 October 2011

{ }HIGH

LOW

*3

θ*

3

3

O (θ) is measure

Ozone Deficit = Factor O (θ) O (θ) θ

where

O (θ) is profile withou and t any

d prof

chemi

ile (

cal l

RED

oss (BLUE)

)

d× −∫

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

9

AOSC 652: Analysis Methods in AOSCNumerical Integration

Why else might you need to compute an integral ?

Calculate carbon emissions to compare with change in atmospheric CO2

CO2 emission, 1959 to 2014 = 323.6 Gt C

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

10

AOSC 652: Analysis Methods in AOSCNumerical Integration

Why else might you need to compute an integral ?

Calculate carbon emissions to compare with change in atmospheric CO2

Change in atmospheric CO2, 1959 to 2014 = 82.64 ppm82.64 ppm × 2.18 Gt C / ppm CO2 = 180.16 Gt C

CO2 emission, 1959 to 2014 = 323.6 Gt C

Legacy of Charles Keeling, Scripps Institution of Oceanography, La Jolla, CAhttp://www.esrl.noaa.gov/gmd/ccgg/trends/co2_data_mlo.html

About half of the CO2 released by combustion offossil fuels stays in the atmosphere:

rest taken up by land biosphere and oceans

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

11

AOSC 652: Analysis Methods in AOSCNumerical Integration

Why might you need to compute an integral ?

Heat Balance in Ocean:

( ) /

0

0 −

− − −

=

∫∫ OCEAN WARMING

t

SOLAR IR RADIATION EVAPORATION SENSIBLE HEAT LOSS GAIN

t

Q Q Q Q dt

Q dt

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

12

AOSC 652: Analysis Methods in AOSCNumerical Integration

Why might you need to compute an integral ?

Heat Balance in Ocean:

( ) /

0

0 −

− − −

=

∫∫ OCEAN WARMING

t

SOLAR IR RADIATION EVAPORATION SENSIBLE HEAT LOSS GAIN

t

Q Q Q Q dt

Q dt

This heat then affects temperature in a particular ocean layer via:

T Z

OCEAN WARMING p

tc dzQ dt ρ− ∆= ∫∫ 00

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

13

AOSC 652: Analysis Methods in AOSCNumerical Integration

Also known as “quadrature”

Why might you need to compute an integral ?

Find pressure based on the mass of the overlying atmosphere:

Find dynamic height D of ocean based on specific volume α:

( ) dz

p z g zρ∞

= ∫

2

1

dp

p

D pα= ∫

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

14

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

15

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Analysis Methods for Engineers, Ayyub and McCuen

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

16

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Base of trapezoid

Analysis Methods for Engineers, Ayyub and McCuen

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

17

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫Avg height of end points

Analysis Methods for Engineers, Ayyub and McCuen

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

18

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Analysis Methods for Engineers, Ayyub and McCuen

Case where integration using the trapezoidal rule should work well:

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

19

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Analysis Methods for Engineers, Ayyub and McCuen

Case where integration using the trapezoidal rule may not work well:

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

20

AOSC 652: Analysis Methods in AOSCNumerical Integration

Trapezoidal Rule:

1

11

11

( ) + ( )( ) ( ) 2

NNx i i

i ix i

f x f xf x dx x x−

++

=

≈ −Σ∫

Error order d2f/dx2: i.e., second derivative of function evaluated at some placein the interval

Hence, trapezoidal rule is exact for any function whose second derivativeis identically zero.

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

21

AOSC 652: Analysis Methods in AOSCNumerical Integration

Simpson’s Rule:

1

22 2 1

1, 3, 5

( ) + 4 ( ) ( )( ) 2 3

NNx i i i i i

x i

x x f x f x f xf x dx−

+ + +

=

− +≈ Σ∫

What is the basis of this formula?

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

22

AOSC 652: Analysis Methods in AOSCNumerical Integration

Simpson’s Rule:

1

22 2 1

1, 3, 5

( ) + 4 ( ) ( )( ) 2 3

NNx i i i i i

x i

x x f x f x f xf x dx−

+ + +

=

− +≈ Σ∫

What is the basis of this formula? each point fit by “quadratic” Lagrange polynomials

Analysis Methods for Engineers, Ayyub and McCuen

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

23

AOSC 652: Analysis Methods in AOSCNumerical Integration

Simpson’s Rule:

1

22 2 1

1, 3, 5

( ) + 4 ( ) ( )( ) 2 3

NNx i i i i i

x i

x x f x f x f xf x dx−

+ + +

=

− +≈ Σ∫

What is the basis of this formula? each point fit by “quadratic” Lagrange polynomials

Analysis Methods for Engineers, Ayyub and McCuen

See pages 187 to 190 of Numerical Analysis, Burden and Faires,for a derivation of Simpson’s Rule

in terms of Quadratic Lagrange Polynomials

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

24

AOSC 652: Analysis Methods in AOSCNumerical Integration

Simpson’s Rule:

1

22 2 1

1, 3, 5

( ) + 4 ( ) ( )( ) 2 3

NNx i i i i i

x i

x x f x f x f xf x dx−

+ + +

=

− +≈ Σ∫

Error order d4f/dx4: i.e., fourth derivative of function evaluated at some placein the interval

Hence, Simpson’s rule is exact for what order polynomial?

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

25

AOSC 652: Analysis Methods in AOSCNumerical Integration

Boole’s Rule (aka as Bode’s rule):

1

44 4 3 2 1

1, 5, 11, ...

( )

14 ( ) 64 ( ) 24 ( ) + 64 ( ) 14 ( ) 2 45

−+ + + + +

=

− + + +

Σ

Nx

x

Ni i i i i i i

i

f x dx

x x f x f x f x f x f x

Error order d6f(x)/dx6: i.e., sixth derivative of function evaluated at some placein the interval

Hence, Boole’s rule is exact for what order polynomial?

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

26

AOSC 652: Analysis Methods in AOSCNumerical Integration

Gaussian Quadrature:

y1, y2, … yn nodes are not uniformly spacedc1, c2, … cn Gauss coefficients are determined once n is specified

Nice descriptions of theory at http://en.wikipedia.org/wiki/Gaussian_quadratureand http://www.efunda.com/math/num_integration/num_int_gauss.cfm

( )n1

1i=1

1 ( ) = ( ( )) ( ( )) 2

b

i ia

dxf x dx f g y dy b a c f g ydy−

≈ − ∑∫ ∫

Note:

produces exact result for polynomials of degree 3 or less

1

1

3 3( ) 3 3−

−≈ +

∫ f y dy f f

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

27

Numerical Integration: Derivation of Simpson’s rule, page 1

R. L. Burden and J. D. Faires, Numerical Analysis, 8th edition

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

28

Numerical Integration: Derivation of Simpson’s rule, page 2

R. L. Burden and J. D. Faires, Numerical Analysis, 8th edition

Copyright © 2016 University of Maryland.This material may not be reproduced or redistributed, in whole or in part, without written permission from Ross Salawitch. 3 Oct 2016

29

Numerical Integration: Derivation of Simpson’s rule, page 3

R. L. Burden and J. D. Faires, Numerical Analysis, 8th edition