nm0877: so today we carry on yeah last week we was a bit waffly went into the i went into the introduction and some early history of numerical modelling of weather and er atmospheric modelling today er we get into more nitty gritty of this and more of the numerics so we're going to get into dynamical equations in this lecture and then in the after lunch there in the old Meteorology building we're going to go across and start doing some time discretization now the next week as well we do horizontal discretization vertical discretization a lot of this some of this stuff you've covered already in the last term in namex's course but you go into a bit of a deeper level with this in this one so this'll be a bit like a review for some of the things you'll be reviewing a bit but we will do a bit more some new things as well and that'll get a bit more that'll be further than namex took it and this'll go a bit further as well so before we do that the first thing is well what are the equations what you know we're trying to solve numerically trying to simulate the atmosphere numerically er which equations do we use yeah and er it's not obvious so the layout the format for this morning's going to be dynamical equations i'm going to go through the we don't have just one meteorological model we have many different models er so i'm going to go through some of the different hierarchy of models the the whole range of models that we can use in meteorology and explain why sometimes it's useful to use a hierarchy of models it's good to use not if you're going to use a model it's better to use a couple of models rather than just one all the time er it's a bit like a map if you had a trying to find your way around you'd have a map of the world but you'd also have a map of namex as well you'd use a couple of things to more than one model is always a good idea er so i'll talk about models and their complexity then i'm going to talk about some of the waves in the atmosphere this is a bit of a review of some of the fluid dynamics that you probably did last term in the fluid dynamics course er the speed of these waves is very important for how you solve the equations so if you have very fast waves it makes it very hard to solve the equation so knowing which waves you're trying to simulate is very important do some basic equations just as a review of that and then i'll i'll try and present some ideas from sort of dynamical systems theory there's a branch of mathematics called dynamical systems theory er that was started about the beginning of the twentieth century some of the ideas from dynamical systems theory are very relevant for understanding the atmosphere and climate so i'll give you a little a very very brief introduction into that er so that's the plan for today and if there's any questions please interrupt or er feel free to ask any questions you like yeah so this hierarchies and models er some people this isn't in your notes you might want to copy this down this is a this in an extra this is from an article by Hoskins Brian Hoskins in nineteen-eighty- three Q-J-R-M-S er volume one-o-nine pages one to twenty-one Brian Hoskins said well this is the wrong way to look at it some people look at it this way so they say oh there's some observations they get fed into our big complex numerical models er we have some theoretical models which are completely detached from this these are just sort of mathematicians amusing themselves er no connection to er these other models and then there's some basic ideas you know some theories of what simple ideas and concepts that we use and these sort of feed in now this is completely the wrong way to this is not a helpful way to look at models a better way er tell me if i'm if i take this off too quickly let me know yeah the better way to look at it is well there's observations they're getting used in a range of dynamical models from complex ones medium complexity ones to very simple ones so you have a nice range of models so you can understand things and you have evolving conceptual models that sort of feed into understanding how you should observe which things you should observe and how you develop the models so it's more there's a whole range of hierarchy model and there's more er connection between these things there's no separate theoretical model as a separate thing yeah everything is you think of it as a continuum of different types of models it's dangerous people see a very realistic climate model a big one and then they think oh that's the only model all the others are wrong and that's a wrong view of it it's more all models are sort of wrong er what you need is a range of them you need a good range of models so that's a better way to look at the whole modelling exercise yeah did you get that down is that you're still [laughter] go fast [laughter] okay i'll give you a few seconds to get that st-, if i write that on the board it takes me longer so these overheads are dangerous 'cause you put things up too quickly yeah well the two differences on these is that the these are very static and don't change the ideas stay the same these are actually by looking at these models your concepts can change things are evolving it's also there's a hierarchy all you don't see it as two separate boxes here you see it as a whole range of models yeah that's the two differences so okay you nearly there er so you might say er well why don't we le-, well we're going start i'm going make a hierarchy of models and we'll think of the different hierarchy whoops my hands are cold so at the top of the we're going to start with the most complex and we go down to the most sim-, simple now just because it's complex or simple doesn't mean it's better or worse sometimes complex models sometimes simple models are you believe them more er very simple models if you get a result from that you can have more confidence in the result if it's a very complicated model er you have less confidence sometimes now the first way you might say well why don't you just simulate if you could the atmosphere is made up of molecules why don't you just simulate the motion of all the molecules you know we could use Navier we could use Newton's laws of motion and we could simulate all the molecule molecular dynamics so we know we know Newton's laws controls the motion of each molecule er we work out in the future where each molecule's going to go well that's obviously stupid er because there are ten-to- the-forty-five molecules in the atmosphere er now that's these these are in your notes these this this is on a a that sheet's been photocopied there but there are ten-to ten-to-the-forty-five molecules and you don't really need to know if you want to know what the weather's going to do tomorrow you don't need to know where each each molecule's going to be you're more interested in big things you're not really interested in each molecule so it's a bit you'd be it'd be you'd have to do a lot of calculation there it would be impossible to do that calculation actually computers er there's too many molecules and it's also would give you too much information you don't need all that information you're not really interested in each molecule so next thing you do is you could say well i don't want to consider the atmosphere as individual molecules i can assume it's a continuum a fluid we know it's not a really a fluid it's full of little molecules but you make an assumption called the continuum approximation so this called the continuum this is used in all the fluid mechanics 'cause all fluids are made of molecules in the end so what you do is you say well it's not individual molecules it's a sort of fluid a continuous fluid it's a big ajum-, big assumption er doesn't work in outer space when you get into the upper air upper atmosphere up near where the space stations are this continuum approximation is is not right because there's so few molecules you can't treat it as a continuous fluid er so the next thing you could do then is use Navier-Stokes Navier-Stokes equations for fluids and use those to solve the atmosphere so now you're treating in as a fluid so a lot of people who don't know anything about meteorology or oceanography say well why you don't you just u-, they just use Navier-Stokes equations you know people who do aircraft simulation think we use Navier-Stokes and they're always a bit surprised when we say no we don't er now the problem is with Navier-Stokes equations it it involves it includes lots of waves or possible waves it includes er sound waves er gravity waves er we're going to come back to waves again er it kind of includes inertial waves these are the sort of different types of waves you tend to get in the atmosphere so whoops Rossby waves [cough] oh there's also Kelvin waves along edges th-, Kelvin waves will go along edges mainly so they're a bit strange so in the atmosphere or in a in a fluid in general in in the in the compressible fluid in the atmosphere there are sound waves there are gravity waves there are inertial waves there are Rossby waves and there are Kelvin waves those are all the waves you need to know about to understand the atmosphere now you've probably noticed that well of all these waves these ones are very fast sound waves move at about three-hundred metres a second so if i scream i can't get to the li-, i can't run out of the room and you know er move very quickly er sound er now the point is sound waves don't really interact very much with the atmosphere if you go outside and scream you can't affect the weather you know you can't by producing a lo-, even a big rock concert doesn't produce cyclones or anything you know there's not much interaction these waves the sound waves don't really interact with the other waves so to do a weather forecast in the early days in the beginning of the twentieth century people said well we should include sound waves because that's all part of the fluid then they realized oh really the sound waves don't do anything to the atmosphere so they're not really relevant the pad-, problem with including sound waves is you have to use a very small timestep you have you you've come across this er Courant- Friedrich-Levy condition yeah have you seen have you heard that from namex's there's a a condition for numerical stability called Courant- Friedrich- Levy so we just call it C-F-L C-F-L says that er your timestep of your model has got to be less than the grid spacing divided by the speed the maximum speed of propogation so if i have a hundred kilometre hundred kilometre grid we could work this out if you work this out suppose delta-X i'm trying to simulate a hundred kilometre resolution suppose i've got a sound wave in there going at three-hundred metres a second yeah now i don't know what that comes out as if you work that out let's work that out hundred hundred-thousand divided by three-hundred yeah so that's er cross those off that gives you a thousand if i ri-, that gives you about three-hundred three-hundred second that's not right that's right er yeah i've got that right haven't i think yeah got three-hundred seconds so three-hundred seconds is like five five minutes so if i wanted to simulate this sound wave on a thousand kilometre grid horizontal se-, this is a hos-, horizontal sound wave i would need a a timestep of five minutes in the model but it's worse than that because the sound waves can go vertical as well when i when i scream sound goes upwards as well er the spacing in the models can be a hundred metres in the vertical you want to resolve the troposphere nicely so really that distance shouldn't be a hundred kilometres should be a hundred metres really divided by three-hundred metres a second you get a third of a second so if you wanted to include er ti-, sound waves in your model you'd have to timestep the model every third of a second that would be the maximum timestep you could use so you have to really do lots of simulation you know and you're not really interested in them anyway you know you say well i don't really need them anyway for meteorology so you know ho-, why how stupid you going to have to timestep all the time er very quickly just so i can simulate these stupid sound waves and then they don't not useful anyway so er so what you can do then is filter them out you know so [cough] so the next set of equations have got no sound waves in them er the Euler equations now the Euler equations er you make an assumption of er anelastic yeah so you make the approximation to go here is anelastic so you assume er before in the density equation y-, in the full one you'd have D-rho-by-D-T plus divergence of rho- U equals zero now if you have that that can produce sou-, that that's responsible that equation's necessary to get the sound waves you need the compressibility to get sound waves it it's compression in density so if you get rid of this equation and sort of say well okay approximate that one by div- rho- U equals zero yes then you get rid of sound waves and that approximation is called an anelastic approximation now nearly every well every meteorological model i've seen even the very cloud resolving ones or small models all make this approximation 'cause they don't want sound waves in there nobody wants sound waves in their meteorological model so i-, it's important to know which approximation so if i i do them in [cough] so the first approximation we use was a continu-, ooh was a continuum approximation and the next approximation we use is an anelastic one now now the problem with that is if you still have that they're still not very good because the next wave that moves very quickly are these gravity waves so if you've been on a near a mountain you can see this on mountains i saw this this last week er the weekend i was near the Alps and you could see a beautiful mountain wave if you're ever near a big mountain you you have a big mountain like this say if there's air coming across the mountain like this what the air does it goes up over the mountain and then it does little oscillations at the back of the mountain yeah and sometimes you can see clouds develop in the in this area these these little stripes so if you see you see the top of the mountain you see these little bands of white cloud have you ever seen tho-, has anybody seen these sometimes you see them roll clouds even without mountains but quite often near mountains you see these roll clouds now this thing behind me is a gravity wave yeah so it's created because air had to bob up here and then it's it's trying to relax again it's the er conservation of mass that's creating this gravity wave now some of the gravity waves can actually they don't just go horizontal some of them can shoot off u-, upwards as well they go vertically so mountains produce ver-, vertically propagating gravity waves just they're big mountains now the vertically propagating gravity waves also are pretty fast and the spacing's pretty small here so you'd have something like a hundred metres a sec-, hundred metres divided by say fifty metres a second yeah so you'd still need a timestep of two seconds if you had the vertically propagating ground w-, gravity waves and they're not important for the big weather systems they're not important for cyclones and those sort of things you can live without vertically propagating gravity waves so the next step to go down is to filter out the vertically progagating gravity waves and the way you do that is the hydrostatic approximation you probably wondered why you keep se-, did you see in the fluid course you saw all these approximations like hydrostatic approximation geostrophic and all these well there's a reason for why you want to approximate them the hydrostatic approximation if you're interested in things longer than say ten seconds or something a bit longer timescale than that you don't really care about vertical gravity wa-, vertica-, bob-, you don't care about little air bobbing behind the back of mountains like this very quickly er you don't need to have you don't need to have vertical gravity you can make this approximation er D D-P-by-D-Z equals minus-rho-G if you make that approximation vertically propagating gravity waves disappear from the equations and you end up with these set of equations which everybody likes using in meteorology it's called the primitive equations so okay so it's a series of sort of approximations go down and this is very pop-, these are very popular yeah these these equations are the ones that are used in most of the atmosphere models the weather forecasting models the ocean models as well use the primitive equations these are a good set of equations for fluids on the sphere er now yeah and in these equations you still have you've got rid of sound waves you've got rid of vertically propagating gravity waves but you still have horizontal gravity waves you still have inertial waves you still have Rossby waves and you still have Kelvin waves so and the storm systems tend to be Rossby waves so er things like storms are mid-latitude storms are basically instable Rossby waves so you can still simulate all those storm systems you do-, you didn't need all these sound waves and vertical propagation well those equations are still pretty foul to to solve them er i'm going to show you er i'll show well i'll show you the equation act-, yeah you see them these are good ones to understand because they're ones we use all the time in meteorology so [sneeze] so these are some basic equations here er so [cough] check i'm to switch that thing off so i've just written down a few of these equations here but the these are the primitive equations there are five equations so there's equation these are written in vector form but there's the two components of the wind er U and V er there's a D-U-by-D-T that includes the advection term as well it's the material derivative Coriolis force and a pressure gradient yeah so there's basically a pressure gradient some Coriolis force and a bit of advection yeah that's all there is in the that bit er this D-phi-by-D-P plus R-T-over-P is a different way of writing hydrostatic balance hydrostatic approximation this is a bit like if you like is a is a a modified version of the W equation normally Navier-Stokes should have three equations should have one for U one for V and one for W but because we made this hydrostatic approximation we really made a mess of the W equation the hydrostatic balance is a bit like a er you can look at that as a sort of modified double equation for W yeah er mass is conserved so we made this anelastic approximation here this is this conservation what flows in must flow up basically so if a-, if air comes into a region it has to go up you notice we got rid of all the compression all the D-rho-by-D-T disappeared from this equation so so that's sort of an anelastic version of the conservation of mass and then this is the heat equation er the this is the conservation of potential temperature or temperature er this telling how the atmosphere is heated which is very important for the er that heating is extremely important for the atmosphere without heating there'd be no no winds it's all to do with heating that caused the wind so those are the five equations so the basic conservation this is conservation of horizontal momentum this is sort of conservation of vertical momentum this conservation of mass and this is conservation of energy so there are five those are the basic laws er that we use is that okay so far are you happy with that er sm0878: what you said about it nm0877: pardon sm0878: what you call the F-K nm0877: oh F-K that's the Coriolis term that's the thing if you er few years ago there was a discussion in er in the Guardian about er if you were near the North Pole and you tried to shoot a polar bear er which eye would you shoot if you want to hit it between the eyes yeah 'cause that's the best way to kill a polar bear er if you do that which eye do you aim at because there's a Coriolis force when you fire something on the sphere then it bends so basically you aim for the left eye i think it is on the North Pole so if you see a polar bear you shou-, shoot at the left eye and then the bullet sort of turns a bit and so this swerving of the air mass air is the is the Coriolis another example of that a nice one is the er if you look at the whole planet [cough] normally air is hot it's hot here in the equator and it's cold at the pole so air would normally if there was no Coriolis this air here would you'd be air that came out of the Hadley cell at the top would would flow towards the pole but because of the Coriolis force it it it swerves that way and produces the westerly jet so the westerly jets that we get in mid-latitudes are because of the Coriolis force causing this air to swerve to the right so this is the same reason if you were to shoot a polar bear its have its two eyes would be there you'd fire at that eye and then the thing would swerve a bit and [laughter] always remember this if you're shooting polar bears [laughter] and it's all t-, well you'd have to be a long way away from the polar you can work it out actually i think in the the newspaper article people starting working out how far away the polar bear would be and you know how many mi-, millimetres it would move needs to be a long way away to see the effect of the thousand kilometres or something so er okay so that's the those are pressure pressure grade normally most fluids people who do just regular fluid dynamics don't have Coriolis forces so we have that in geophysical fluids but er on on the rotating earth so this is normally it's just pressure gradient causes the movement of air or er the the velocity we're a bit different 'cause we have this rotation term so that's the primitive equations er yep er now now i know it's a bit tricky to understand sometimes 'cause the it's still the solution to these equations they don't look too nasty mathematically but the solution is very non-linear and it's very complicated to try and solve those things on a sphere and things yeah so people have made a lot of progress using things like shallow water [cough] now shallow water equations what you do there is you say if you look at these equations here there's a lot of vertical structure so this works for a three- dimensional atmosphere this is this has got all these er D-do D-omega-by-D-Ps and things so things vary in the vertical complicated er sometimes it's not as bad as that some some waves you see in the atmosphere have got pretty much the same structure all the way up or they have the same they'll have a certain vertical structure which stays the same it's just the horizontal bit that changes er these waves that propagate on the tropical Pacific for El Niño the Kelvin waves and the Rossby waves the equatorial ones er they do-, you don't really need the primitive equation to understand why they're there you you don't need the vertical structure they're not very they're not varying a lot vertically in time so the the shallow water equations is a ve-, they're a very nice set of equations actually er you can't use them for everything but the they're good for testing numerical schemes and they work at the equator which is quite nice so what you have is basically a er you have the something think of the ocean if you like you can think of this as the atmosphere or the ocean imagine there's two types of fluid so er they originally started for a-, oceans so you'd say if this was air and this was er water yeah and then there's a certain height a certain depth of the fluid yeah now you want to understand how it's a bit like your water in the bath you know how does it move around basically there's no vertical structure as such there's only two types of fluid really here er you can use these equations even in just the ocean or the atmosphere you just say the the things in the in the tropical Pacific what they do is they say oh well this is like er this is warm ocean so the ocean above the thermocline for the ocean normally this is the thermocline below this certain gradient in the ocean there's a very cold ocean water at four degrees celsius so that's deep ocean so if you go down deep in the ocean you find water at four degrees celsius it's not at zero so you can say there's cold deep dense water underneath and then there's this nice warm stuff and this thermocline in the tropical Pacific is about from about a hundred to three-hundred metres in depth so you only have one interface you only have this sort of line in between you you don't care about all the vertical detail and so you have one one h-, instead of having Ws and things you ha-, just have a H in this shallow water equations you have conservation of er conservation of U er of the zonal wind conservation of the meridional wind those two equations are very similar to are almost identical actually to these equations up there and then you have er conservation of mass really here this was sort of a mixture of this one er yep it's a bit like a mixture of this and this together produce this third equation here this is basically just saying the convergence of fluid i-, if a lot of fluid converges on a particular point the w-, the the height would have to go up at that point so in this thing here the reason that's a big blob up there is because fluid converged in at that point so there's a very simple set of equations er i've got an exercise for you if you'd like to try this which is quite a good one to do is here the equations for U and here's an equation for V now what i would like you to do is try and find out er er try and find out an equation for the vorticity and for the er divergence so the exercise oh exercise a bit like this just remind you this is useful to understand where things come from so the the er relative relative vorticity is defined as er D this horrible Greek symbol i can never pronounce right D this will be bad for your linguistics one that's your V the D no it's x- , xi in Greek it's X-I actually you might be able to help me how do you pronounce it om0880: [xi] nm0877: [xi] om0880: nm0877: is that right [xi] om0880: nm0877: okay xi er this is relative vorcity xi yeah er it's always a bit tricky to pronounce so D D-xi- by-D-X minus D- xi- by- D- Y that's the definition of relative vorticity yeah the the and oh sorry what am i doing no it's not the definition i'm f-, getting con-, confused no relative vorticity is is is r-, is xi and it's equal to D- V-by-D-X minus D-U-by-D-Y so if you like is the spin of the fluid mm it's how much the s-, flu-, fluid is s-, spinning around or swirling there's also the divergence which is a lot easier to say in Greek er divergence usually use the symbol delta and delta is defined as D-U-by-D-X plus D-V- by-D-Y yeah so the difference there both of them involve Us and Vs and X and Ys but they're mixed up yeah so one's like that and one's got a minus sign in now the point is i i've given you an equation er D-U-by-D-T equals nananana and i've given you an equation D-V-by-D-T equals dadadada now what i would like which is what you solve normally you don't solve these equations with vectors in in the in the big models you solve equations for the vorticity and the divergence so if you work out now i'll just set you off on the right track if you write down D- xi- by-D-T that's going to be D-by-D-T er you plug in that definition D-V-by-D-X minus D-U-by-D-Y and then you can switch the derivatives so the D-by-D-T and the D-by-D-X you can change the order of them yeah you know can you see that okay from there the so this thing you can then write as D- by- D-X D-V-by-D-T minus D- by-D-Y D-U-by-D-T okay now you've got the equation i gave you the equations for D-U-by-D-T and D-V-by-D-T you've got them written down so you just plug those equations in now substitute in there and then sort out all the D-Xs and D-Ys and you get you'll end up with two nice little equations you'll have one for D-xi-by-D-T and you'll have another one that's for D-delta-by-D-T okay so if try that exercise you know go away it doesn't take you that long to do it probably takes about fifteen minutes or so but it's quite nice 'cause you've then derived a vorticity equation by yourself because sometimes you don't really care about the divergence sometimes you're more interested just in vorticity yeah Rossby waves are more interested in vorticity than they are in divergence so Rossby wave dynamics is all vorticity stuff so this sort of separating of the two fingers is nice and and you can recast those equations in terms of vorticity and divergence so it's a good little exercise to try shouldn't tax you too much hopefully er and you can also in this one er er so this one you can er now if you set once you've solved the you'll have three equations then one for D-xi-by- D-T one for D-delta-by-D-T and one for D-phi-by-D-T you can see here this is already delta isn't it D-U-by-D-X plus D-V-by-D-Y is delta so the only coupling between is a vorticity equation a diverged one and a and a height phi is a sort of height er the height is only coupled to the divergence equation it's not coupled to the vorticity one and and if you set the er if you set the phi to z-, steady phi so D-phi-by-D-T is zero the dele-, divergence is then zero and then you'll get a just a vorticity equation yeah which comes to my next set of simple things which is vorticity equations so if you say i don't care about divergence so basically you said delta is equal to zero then you get sort of divergence eq-, i mean vorticity equations and you can get a vorticity equation from this quite nicely if you do this thing over there and then just set delta to zero you'll end up with a nice little vorticity equation and your vorticity equation that you'll get is called if you do that you'll get the er barotropic vorticity equation which is the one you're going to be using in the exercise in the n-, practical assignment when we do the numeri-, the computer practical there are quite a few different vorticity equations there's a barotropic one which is what you're going to have [cough] er there's also you you've seen ones probably er yeah so that's sometimes called the barotropic so we call that B-V-E the baratropic vorticity equation er you can also have ones which have bit more complicated stuff quasi- geostrophic vorticity equation but you have different equations for the spin basically of the fluid yeah and those are quite useful for understanding things like cyclones and instabilities things we consider cyclones to be things in vorticity really rather than we're not really that interested in divergence usually er right the next set of models er again kind of takes a while this these are all three-dimensional sort of things this well this was these were if you look at this this was three-D this was a three-D model this was a three-D model three-D er these are now two dimension be-, really because we've only got we only had a height equation we got rid of a lot of the vertical we only had one height everything was a function of either in in these equations here everything was a function of X Y and T there was no Z in there there was no height even height the variable H is just a function of where you are so the the the these we've made a big step from going from here to here we went from three-dimensional set of equations down to two-dimensional flow these are two-D sort of things er now what you can do is you can average equations so sometimes people er they do zonal mean models or zonal mean another type of two-D equation is zonal mean so they're interested in say the Hadley cell or the the general they want to look at just the cross section they don't want to get into details about longtitude they just want latitude and height er now they make sometimes they make these zonally average models where they've been averaged everything in the longtitude direction and er to get those models they use those another type of model that's used quite a lot is a very useful type of model actually is a one-D model sometimes these are sort of like functions the th-, the thing will be a for instance could be U as a function of er X and Z and T oh sorry Y Z T they're not interested in X they're not interested in longtitude so it's just a cross section in er goes from the pole to the other pole to the equator or something like that and up and down it d-, they don't care about where you are in longtitude one-D models sometimes people are interested in just models that vary er use the function of height and the function of time er for instance when you s-, fire off a radiosonde in the atmosphere er when you do the radiosonde you just get this sort of measurement with height and time you don't know about you don't really know about X and Y much and the models people use here quite often the nice ones are these radiative convective models if you like those are the models people use to er you can look at a particular point on the planet so you say well i'm interested in namex i'd like to know what how much radiation comes down to hits the ground and how much convection goes on at this point over namex i just assume there's no horizontal mixing at all i just ignore all horizontal flow and i'm just looking at each point individually and oceanographers do that sometimes they have one-dimensional models of the ocean at particular points yeah so they're quite handy things to have and the final sort of model is a zero-dimensional model so it doesn't have any any space or time variation in it any space version er the nice example of that is these energy balance models so when people talk about climate change they sometimes use an energy balance model and they'll get a they'll get an equation for instance you can look at the whole Earth you can say here's here's planet Earth it receives so much solar radiation comes in we only get a quarter of that because it hits just one side of the planet er but then we lose infra-red radiation out of the all sides so the amount of stuff we lose goes as sigma-T-to-the-fourth as a black body so you can say sigma-T-to-the-fourth is equal to the incoming solar that's energy balance so you said what came in as far as energy onto Earth must go out yeah so it's coming in as solar and it's leaving as r-, infra-red radiation that's the simplest energy balance model if you work that out the solar constant is thirteen-seventy watts per metre squared er this is the Stefan- Boltzmann Stefan-Boltzmann constant you find in a thermodynamics book for black body radiation and you'll find a temperature for the Earth of two-hundred-and-fifty-five degrees kelvin if you do that which is too cold the average on Earth the average temperature on Earth the observed one if you average over the whole planet is two-hundred-and-eighty-eight kelvin so that's an energy balance model the reason it didn't work very well it was too cold was thirty degrees too cold is because we didn't include any abs-, we didn't include a nice little atmosphere round here that would absorb infra-red radiation so there's no this is that that little balance model is just er for a planet there's no atmosphere there if you put the little blanket round it then you get another thirty degrees and you get you get what they call the greenhouse effect not the enhanced one the it's just natural yeah yeah sm0879: nm0877: no they don't no no no you can have you can develop more complicated ones but there've been an awful lot of nice little things like that one sm0879: yeah nm0877: yeah they don't they can get you can make one-D energy balance models the thing with those is they start getting more the more complicated ones like that er don't once you go go to higher higher number of when you want the more space variation then all the flow comes into it you know so you really need the fluid dynamics you can't there's a limit to how far you can get on energy balances so they sort of work nice when you average over the whole planet but they don't they w-, they're not so sweet when you look at them in certain regions yeah but yeah you're good point yeah it's er anyway that's the range of different models that you come across er this is sort of the most complex and this is the simplest as far as complexity it doesn't mean it's doesn't mean it's not got interesting results actually this little model here t- , can tell you by playing around with this you can find out that er Arrhenius in the this person called Arrhenius Swedish scientist in the in the eighteen- ninety-six he used a little model like this and he found the greenhouse effect he found the enhanced one he got a he said well if carbon dioxide changed we'd get so many degrees kelvin using a little model like that he was way before his time yeah er and so even without a big climate model you can you can get confidence that by changing a bit of carbon dioxide that will cause temperatures to warm up and it's based on a very simple little model so that's a nice model you know you you don't want to believe a big complicated thing you know if if a little thing like that on a back of an envelope c-, can convince you of climate change then that's pretty good yeah well it makes you feel better about if somebody just said well i've got a big complica-, i i've solved if somebody said i've solved every molecular dynamics and i've found out it was going to get warmer you know you'd just say well i don't believe you you know so there's that you can do on a bit of paper yourself and convince yourself quite quickly so er simple models can be pretty good okay is that that's a sort of quick run- through the important thing like a lot of these things in this numerical course you'll find out the important thing is to know which approximations are being made so if somebody comes along and gives you a model or tell say your supervisor or whatever comes along eventually and says er here's a nice model to use you know it's a good one we use it round here everybody likes it round here the things to know are what are the approximations that went into your model and a lot of people are not very good at that not knowing that what they their models are good at some things for instance this model because primitive equations because it's had the hydrostatic approximation and the anelastic approximation is absolutely useless at doing anything to do with sound waves or anything to do with vertically propagating mountain waves so if somebody came along with the big climate model say a primitive equation model and said oh we're looking at vertically propagating waves round the back of a mountain you're using this model complete rubbish you know it's not made for that it's the approximations got rid of those sort of things so you should be very careful about which each model involves certain approximations so if you're clever you know which approximations have been used for your model that tells you which things you can use your model for you know so y-, it'd be plain stupidity you couldn't look at sound waves using primitive equation models so it's designed for looking at bigger things and people even clever people these days get confused with that so they'll say oh we've reduced the resolution of our very complicated climate model and we're going to go down like the Japanese now have a project frontier project to make a one five kilometre grid on their model so they're going to get a really small resolution you know and look at very local things well they're still using the primitive equations so their model's still not going to get gravity waves properly so even if they got five kilometre resolution round the back of a mountain or something they're not going to get it right [laugh] so you get a very funny impression they say ah but it's got a five kilometre resolution it's resolving everything great you know well it's not because it's got the wrong equations to resolve everything correct yeah so you've got to be aware of the weaknesses of your equations okay er now i'll move on to this the final bit was this er where we got to yeah so i've gone through the equations are you sort of happy with that does it help review a bit well hopefully this course reviews some of the other things you've seen in the last term er er there's nothing like making a model to make you know what you're doing in the subject i've talked about hierarchy models we talked about waves in the atmosphe-, oh i didn't show you the waves oh hang on what i am doing oh the waves yes sorry missed a crucial slide here well it's better ne-, you now know the equations so if we look at this this is a quite a nice little diagram this was a meteorologist Green who who drew up this sort of d-, schematic diagram of different waves in the atmosphere so the waves are the atmosphere's a big compressible atmosphere at this axis is phase phase velocity so call it C yeah this sort of yellowy line going across here is three-hundred metres a second that's the speed of sound yeah anything above that line is supersonic not very important because you d-, haven't seen any supersonic weather systems i don't know if anybody's ever seen a supersonic weather system but i certainly haven't seen a supersonic weather system in principle you could have if you look at these lines on here the atmosphere could support supersonic waves but it'd never do that because they produce a shock wave and it would you know when you've got Concorde going supersonic then you have to put so much energy in to get it when it produce the sonic boom it creates so much dissipation that you need a lot of energy to keep it moving so if if suddenly one of those storms became supersonic it would slow down very quickly it would it would lose all its energy so chance of seeing a supersonic weather system is low very low sound waves are obviously in the atmosphere 'cause you can hear what i'm saying so and that line's there er then there's some other waves so this bunch of waves this is sorry er spatial wavelength the horizontal wavelength yeah in kilometres these are logarithmic scales as well so this is phase speed this is logarith-, er horizontal wavelength so ten-thousand kilometres is called planetary scale in meteorology usually one-thousand kilometres is synoptic scale that's the size of a storm in mid-latitudes er anything between a thousand kilometres and ten kilometres is called mesoscale so most of your favourite weather systems are in mesoscale but the big things are the big systems are the synoptic systems are a thousand kilometres er then there's things less than ten kilometres which are called microscale so the three sort of the four scales on the planet are you know really big planetary scale things synoptic scale so El Niño the big El Niño response is a planetary scale phenometa phenomena then there's synoptic then there's mesoscale then there's micro and then there's these different speeds and so er the free surface one doesn't matter 'cause the atmosphere doesn't have a free surface it doesn't have a top on it really it just the atmosphere just gets less dense as it goes out to space if it did have a top surface on it would go at this speed but it it doesn't really have a top surface er then there's gravity waves er these are the gravity waves here have quite a range of speeds so they can go very fast so very very er long wavelength gravity waves er move very quickly very short wavelength ones move slower yeah er but then there's an area in the mean between where the phase velocity doesn't change much so the gravity waves are non-dispersive so over quite a long spatial scale from synoptic right down to about ten kilometres gravity waves move at about the same speed they don't they're not that dispersive as waves er once you get below ten kilometres gravity waves become dispersive again er there's also some of these gravity waves get mixed up with these inertial waves that you can have er the easiest way to see why you have an inertial wave is in your equations here if you had D-U- by-D-T equals minus- F-V and D-V-by-D-T equals F-U yeah so that's just Coriolis that's the Coriolis force acting on both of those no pressure gradients imagine no pressure gradients if you solve those equations there you get D-squared-U-by-D-T-squared er equals F-squared- U and the same sort of thing for V so that's an oscillation if you look at the thing and the period of the oscillation is one- over period is one-over-F oh sorry two-pi-over-F so it depends on where you are on the planet the the winds the U and V components oscillate they go round so if when people do measurements of the ocean er the when they put a probe down they'll see that the velocities are are turning round at a certain speed and that speed is determined by the Coriolis parameter at that point and that's an inertial wave you don't tend to see them as much in the atmosphere as an inertial well they call it inertial oscillations you don't see those things much in the atmosphere er 'cause it's not stable enough so you don't you see it more in the ocean er but those things can mix up with gravity waves so you get this sort of funny little mixture wave here these shorter ones the you get these things called inertia gravity waves so the two things have combined a bit you know er right so those are the gravity waves and then up here on the long large scale stuff r-, from planetary down to synoptic are the Rossby Rossby waves now if you're interested in forecasting weather and looking at storm synoptic systems coming through which is what the original point of doing weather forecasting was was to s-, get try and get the storm systems you're interested in getting the Rossby waves right yeah these especially the synoptic ones down here typical speeds less than ten metres a second yeah you don't really care much about these very big thing these gravity waves that that go at very high speeds yeah you're not really interested in those very lon-, very large scale gravity waves that move quickly that that those aren't relevant so the trick is to try and filter some of those things out a little bit in your equations you're more interested in getting these waves and you don't really want sound waves so by doing the anelastic approximation you get rid of all the sound waves and all the supersonic stuff by doing er the er by doing the hydrostatic approximation you get rid of quite a lot of these fast gravity waves a lot of the fast ones are going vertically these are vertically propagating ones and you end up with waves that then all move at a slower speed yeah and that means you can then simulate the thing much nicer use a bigger timestep and you've k-, still kept the essential part of you've still kept the Rossby waves and the the synoptic systems you've got rid of the fast stuff does that make sense are you are you happy with that all the ways we cheat in writing our equations down yeah [laugh] so anybody who says why did you why did you use primitive equations well the reason is to get the timestep down in the model really you know er y-, so so you don't have to use a large timestep okay er now the final bit i was going to go is er yeah the ideas oh we're running out of time very quickly we've got a hierarchy of models we've got waves in the atmosphere some basic equations i was just going to show you how you can write these things in a general as a dynamical system so it's all a dynamical system and so the in the last few minutes just show you this you can write all of those sort of equations that i've just gone through there in a quite a simple way you can't solve them easily but you can write the equations simply so if we write the equation this is a general equation for the ocean and the atmosphere and you can write down D-xi-by-D-T so it's a first order equation you don't usually get second order D-squared-xi-by-D-Ts there's some horrible non-linear operator called Q which is some depends on the state of the system so this is like the advection terms it's actually not that non-linear er compared to what you c-, it's only quadratic usually that's why i call it Q actually so when you look at your equations you have things like U D-U-by-D-X et cetera so you have some sort of quadratic operator here and you have some forcing on this side forcing and dissipation that depends on the state of the system xi the time and some parameters of your model d-, parameters of albedo of the Earth et cetera et cetera so xi here is a general xi is the state of the system the state of either the atmosphere or the ocean and that for instance if you're doing the primitive equations would be a little vector of U it would consist of V W er er [sigh] T what else have we got about that yeah er and here you'd have this'd be a function of latitude long-, longitude latitude and time and that'd be a function of longitude latitude time and height sorry or this Z latitude longitude ti-, height and time longitude latitude height and time yeah so you have four fields you have the U field the V field the W field and the ti-, the temperature field would all be would all be define the state of the atmosphere so if i know all those things i know what the state the atmosphere's in so that's what i mean by xi it's sort of a big beg-, big field summarizing that lot this this xi the state of the system evolves like that basically that's the general equation for most atmosphere ocean systems this bit on this side gets called dynamics quite often by quite a lot of people and this bit is called the physics so this is the force in the force this includes force in so radiation and things it also invo-, includes dissipation so the atmosphere's got diffusion and drag it's got it's losing energy as well so it's it's gaining energy from the sun but it's also losing energy when it drags along the ground so these er well we people do pr-, m-, numerical models they like to split it into two so they call this part the dymani-, dynamical part of the model and this part is the physics the parameterization of all the radiation all the messy bits of the clouds and things er sometimes this is called the dynamical core so this is the fluid part of this is basic just basic fluids and waves this is the physics how it's forced yeah so that's a useful way to look at climate models er how they usually break up people look at the dynamical schemes and then they look at the physical schemes in the model er the current models tend to spend fifty per cent of the computer time doing this and fifty per cent of the computer time doing this so when i do all this fluid all those fluid equations i wrote before i ignored that completely actually i only showed you the dynamical bit so in reality er the actual real climate models and weather models are spending fifty per cent of the time doing physical calculations like what's the radiation and what's the what's the latent heat release so physics physical things in models are very important it's not just a pure fluid er i'll try and finish off quickly er what we you can do when these sort of things you can't really this state of the system here depends on er longitude lambda latitude phi the height Z and T yeah now it's a continuum this d-, this is everywhere you know so even at this point that point it's very this is a an infinite number of places this is defined at yeah this is a continuum field now obviously you can't put that onto a little computer 'cause the computer's only got a finite memory it's only you've got to break it up so what you do is you break it up like this so you say well i won't look at the field everywhere i'll discretize this so i'll have a bunch of lati-, longitudes a bunch of latitudes a bunch of heights of levels and a bunch of timesteps Ns right so these are sort of like the grid points in the model and you label them with an index here this is labelled with I as an index so I equals one to er and it can go up to a very large number P usually about ten-to-the-five up to about ten-to-the-seven in current models of grid points yeah so you've broken up space into a little you've broken it into a big a grid in the horizontal and a grid in the vertical as well so you've you've got a lattice if you like a like a climbing frame and at each point you've only defining the variable at those points so you've replaced er this wonderful continuous field by a horrible discrete bunch of things yeah about ten-to-the-five variables yeah and these you can label these ones time as well you break up into steps so you discretize time so you discretized all the space and the time dimensions into broken them up as a grid this you can then label as one label here I for the space index and a little label at the top N meaning the time index so that's the times-, that tells you what timestep it is and that tells you which grid point variable that's the grid point yeah so now you've replaced this continuous equation here by a bunch of very finite just that you've g-, only a certain number of variables phi Is and then you do them in different times yeah so er i think i'm going to stop there because it's going to er we're going to run into lunch otherwise we can pick it up again in the old old Meteorology building afterwards so have have lunch and have a think about this and then we'll [laugh] we're going to discretize time in after lunch yeah we're going to do that a bit more