Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Mathematics for Weather

and Climate Prediction

Hilary Weller

June 2015

Department of
Meteorology

http://www.met.reading.ac.uk/~sws02hs/outreach/
Why do we need Weather and Climate Models?

Climate Models:
I Climate change predictions are based on climate models
I Government policy is based on climate change predictions, eg:
I energy costs
I building power stations
I investment into alternative energy
I emissions regulations
I new reservoirs
I flood defenses
Weather Forecasting Models
I We all make decisions based on the weather forecast
I Many short-term commercial decisions, such as:
I should a supermarket but meat for barbecuing
I when to lay concrete
I alternative energy production forecasts
Contents

I How weather and climate models work (they are the same)
I Using some A-level mathematics to derive formulae used in climate models
I A human forecasting factory
I Some emerging mathematics techniques that may be used in the next
generation of climate models (with the help of some of your students)
What is a Climate Model?

I Solves the fundamental equations of motion in the


atmosphere and ocean
I The temperature, T, changes based on the heat equation:
 
heat from solar radiation
 heat from infra-red radiation 
 wg
∂T ∂T ∂T ∂T 1  −
= −u −v −w +  latent heat of evaporation
∂t ∂x ∂y ∂ z ρ cp   cp
 −latent heat of condensation 
Change in Movement of −radiative cooling to space work
Temperature temperature by wind against
gravity

I Similar equations for wind, pressure, humidity, pollutants


I Very accurate representations of the real world
I But cannot be solved exactly
I Climate and weather forecasting models solve these equations approximately
Approximate Solution of Equtions

I Divide atmosphere, ocean and land


surfaces into grid boxes and assign
one value of
I wind
I pressure
I temperature
I humidity
I each type of pollutant
to each grid box.
Approximate Solution using Finite Differences
I Continuous equation for temperature (ignoring changes with altitude):
∂T ∂T ∂T 1
= −u −v + (heat sources and sinks)
∂t ∂x ∂ y ρ cp

I Derivatives are approximated by differences:

∂T T new − T old

∂t ∆t
∂T Twest − Teast

∂x 2d
∂T Tnorth − Tsouth

∂y 2d
I Substitute into the continuous equation and re-arrange to find T new , the
temperature at the new time-step (ignoring sources and sinks):
T new =
This equation can be solved at every grid point on a parallel computer to
predict the temperature
Lewis Fry Richardson (1881-1953)
dreamed of solving these equations with a
human forecasting factory:
Forecasting Factory Using Students
We would like to predict the temperature at
these places over the next 3 hours

These are the initial


temperatures and the wind

∆t = 1hour = 3600s
Dumfries
Initial conditions temperature T = 17o C Boundary Conditions Tnorth = 15o C
Twest = 17o C
Fixed inputs wind in x direction u = −6 m/s
wind in y direction v = −6 m/s Surroundings Teast = Carlisle
time step ∆t = 3600 s Tsouth = Irish Sea
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

1
Carlisle
Initial conditions temperature T = 17o C Boundary Conditions Tnorth = 15o C

Fixed inputs wind in x direction u = −6 m/s Surroundings Twest = Dumfries


wind in y direction v = −2 m/s Teast = Newcastle
time step ∆t = 3600 s Tsouth = Manchester
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

2
Newcastle
Initial conditions temperature T = 17o C Boundary Conditions Tnorth = 15o C

Fixed inputs wind in x direction u = −6 m/s Surroundings Twest = Carlisle


wind in y direction v = 2 m/s Teast = Dogger
time step ∆t = 3600 s Tsouth = Grimsby
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

3
Dogger
Initial conditions temperature T = 17o C Boundary Conditions Tnorth = 15o C
Teast = 17o C
Fixed inputs wind in x direction u = −6 m/s
wind in y direction v = 6 m/s Surroundings Twest = Newcastle
time step ∆t = 3600 s Tsouth = Humber
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

4
Irish Sea
Initial conditions temperature T = 19o C Boundary Conditions Twest = 19o C

Fixed inputs wind in x direction u = −2 m/s Surroundings Tnorth = Dumfries


wind in y direction v = −6 m/s Teast = Manchester
time step ∆t = 3600 s Tsouth = Snowdon
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

5
Manchester
o
Initial conditions temperature T = 19 C Boundary Conditions

Fixed inputs wind in x direction u = −2 m/s Surroundings Tnorth = Carlisle


wind in y direction v = −2 m/s Twest = Irish Sea
time step ∆t = 3600 s Tsouth = Birmingham
space step d = 100, 000 m Teast = Grimsby
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

6
Grimsby
Initial conditions temperature T = 19o C Boundary Conditions

Fixed inputs wind in x direction u = −2 m/s Surroundings Tnorth = Newcastle


wind in y direction v = 2 m/s Teast = Humber
time step ∆t = 3600 s Tsouth = Peterborough
space step d = 100, 000 m Twest = Manchester
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

7
Humber
Initial conditions temperature T = 19o C Boundary Conditions Teast = 19o C

Fixed inputs wind in x direction u = −2 m/s Surroundings Tnorth = Dogger


wind in y direction v = 6 m/s Tsouth = Norwich
time step ∆t = 3600 s Twest = Grimsby
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

8
Snowdon
Initial conditions temperature T = 21o C Boundary Conditions Twest = 21o C

Fixed inputs wind in x direction u = 2 m/s Surroundings Tnorth = Irish Sea


wind in y direction v = −6 m/s Teast = Birmingham
time step ∆t = 3600 s Tsouth = Swansea
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

9
Birmingham
o
Initial conditions temperature T = 21 C Boundary Conditions

Fixed inputs wind in x direction u = 2 m/s Surroundings Tnorth = Manchester


wind in y direction v = −2 m/s Teast = Peterborough
time step ∆t = 3600 s Tsouth = Bristol
space step d = 100, 000 m Twest = Snowdon
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

10
Peterborough
o
Initial conditions temperature T = 21 C Boundary Conditions

Fixed inputs wind in x direction u = 2 m/s Surroundings Tnorth = Grimsby


wind in y direction v = 2 m/s Teast = Norwich
time step ∆t = 3600 s Tsouth = London
space step d = 100, 000 m Twest = Birmingham
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

11
Norwich
Initial conditions temperature T = 21o C Boundary Conditions Teast = 21o C

Fixed inputs wind in x direction u = 2 m/s Surroundings Tnorth = Humber


wind in y direction v = 6 m/s Tsouth = Southend
time step ∆t = 3600 s Twest = Peterborough
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

12
Swansea
Initial conditions temperature T = 23o C Boundary Conditions Twest = 23o C
Tsouth = 25o C
Fixed inputs wind in x direction u = 6 m/s
wind in y direction v = −6 m/s Surroundings Tnorth = Snowdon
time step ∆t = 3600 s Teast = Bristol
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

13
Bristol
Initial conditions temperature T = 23o C Boundary Conditions Tsouth = 25o C

Fixed inputs wind in x direction u = 6 m/s Surroundings Tnorth = Birmingham


wind in y direction v = −2 m/s Teast = London
time step ∆t = 3600 s Twest = Swansea
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

14
London
Initial conditions temperature T = 23o C Boundary Conditions Tsouth = 25o C

Fixed inputs wind in x direction u = 6 m/s Surroundings Tnorth = Peterborough


wind in y direction v = 2 m/s Teast = Southend
time step ∆t = 3600 s Twest = Bristol
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

15
Southend
Initial conditions temperature T = 23o C Boundary Conditions Teast = 23o C
Tsouth = 25o C
Fixed inputs wind in x direction u = 6 m/s
wind in y direction v = 6 m/s Surroundings Tnorth = Norwich
time step ∆t = 3600 s Twest = London
space step d = 100, 000 m
 
∆t  
1. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
 
∆t  
2. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d
± Textra = Tnew
 
∆t  
3. Told − u Twest − Teast + v Tnorth − Tsouth = Tnew
2× d

15 15 15 15
17 Dumfries 17 Carlisle 17 Newcastle 17 Dogger 17 17
19 Irish Sea 19 Manchester 19 Grimsby 19 Humber 19 19
All initial conditions:
21 Snowdon 21 Birmingham 21 Peterborough 21 Norwich 21 21
23 Swansea 23 Bristol 23 London 23 Southend 23 23
25 25 25 25

16
Between steps 2 and 3:

Sunshine!

• The sun has come out in the south.


– Add 2◦C to the temperature in Swansea, Bristol and Southend
– Add 5◦C to the temperature in London due to the urban heat island

Mountains!

• The air is rising over the mountains.


– Subtract 4◦C from the temperature in Snowdon

9
15 15 15 15
17 Dumfries 16.6 Carlisle 16.9 Newcastle 17.1 Dogger 17.4 17
19 Irish Sea 18.6 Manchester 18.9 Grimsby 19.1 Humber 19.4 19
After step 1
21 Snowdon 20.6 Birmingham 20.9 Peterborough 21.1 Norwich 21.4 21
23 Swansea 22.6 Bristol 22.9 London 23.1 Southend 23.4 23
25 25 25 25

15 15 15 15
17 Dumfries 16.2 Carlisle 16.8 Newcastle 17.3 Dogger 17.9 17
19 Irish Sea 18.2 Manchester 18.8 Grimsby 19.3 Humber 19.8 19
After step 2
21 Snowdon 16.2 Birmingham 20.7 Peterborough 21.2 Norwich 21.8 21
23 Swansea 24.1 Bristol 24.7 London 28.2 Southend 25.8 23
25 25 25 25

15 15 15 15
17 Dumfries 15.8 Carlisle 16.8 Newcastle 17.6 Dogger 18.4 17
19 Irish Sea 18.2 Manchester 18.7 Grimsby 19.5 Humber 20.2 19
After step 3
21 Snowdon 15.6 Birmingham 20.3 Peterborough 21.5 Norwich 22.5 21
23 Swansea 23 Bristol 24.1 London 28.2 Southend 26.7 23
25 25 25 25

10
11
12
13
14
Resources for Schools and School Visits

Hilary Weller presentation including the forecast factory is at:


http://www.met.reading.ac.uk/~sws02hs/outreach/

Other resources from The Meteorology Department at Reading


http://www.met.reading.ac.uk/~swrhgnrj/schools/
http://www.met.reading.ac.uk/outreach/richardson_fancy.pdf
A more mathematically challenging problem

I Can we make the solution


I more accurate?
I more realistic?
I Information should only come form upwind, not downwind
I Can we do better than a linear estimate of the gradient?
Finite Difference Gradients Using Taylor Series
Consider the concentration of a noxious gas, F, at location xj and at
locations xj−1 and xj−2 upstream:

Find the gradient, Fj0 at position xj


F
from Fj , Fj−1 and Fj−2 :
Fj
Write down the first 3 terms of the
Taylor series approximations for Fj−1 Fj−1
and Fj−2 about Fj : Fj−2

d2 00
Fj−1 = Fj − d Fj0 + F +···
2! j
Fj−2 = Fj − +··· xj−2
dx x
j−1 xj

We want to find Fj0 , we know Fj , Fj−1 and Fj−2 , so we must eliminate the
unknown, Fj00
This leads to the linear upwind, finite difference formula for Fj0

Fj0 =
Three Linear Advection Schemes
1. Centred time, centred space:
u∆t  mid 
Fjnew = Fjold − mid
Fj+1 − Fj−1
d
2. Forward time, backward space:
u∆t
Fjnew = Fj −

Fj − Fj−1
d
3. Linear upwind in space, backward in time:
u∆t
Fjnew = Fj −

3Fj − 4Fj−1 + Fj−2
2d
Let us simulate the release and spread of a noxious gas
I Please sit in rows of 4, 5 or 6 people
I Each group will simulate the release using a different scheme
I Form groups and copy down the advection scheme for your group
Instructions for Simulating Linear Advection
1. The group should sit in a line
2. The person the furthest left is number j = 1, then j = 2, 3, ... Write down
your number
3. Write down your advection scheme for your specific j number
4. Your initial conditions are zero unless I tell you that you have created a
release of noxious gas. So set:

Fj = 0 , Fjold = 0 , Fjmid = 0

for your grid box (write these down)


5. Use u = 1m/s, ∆t =1s, d =1m
6. If you are next to a boundary (at either end) you can assume that F0 = 0 for
all time or Fj+1 = 0 for all time
7. If I designate you as having created a release of noxious gas, set:

Fj = 10 , Fjold = 10 , Fjmid = 10

for your initial conditions


8. Calculate the distribution of the noxious gas after 3 seconds (3 time-steps)
Plot your solution after 3 seconds on this graph

F
10

0
0 1 2 3 4 5 6 j
Emerging Numerical Methods
Emerging Numerical Methods

You might also like