• While Stormtrack has discontinued its hosting of SpotterNetwork support on the forums, keep in mind that support for SpotterNetwork issues is available by emailing [email protected].

Creating a "Toy" Weather Model - Where to discuss?

  • Thread starter Thread starter Frank Kienast
  • Start date Start date
I don't think height changes alone will work for calculating realistic vertical motion, but I could be wrong.

On large grid squares(read convection is not calculated exactly but parametrized), you can drive your vertical velocity based on temperature and vorticity advection. Basically the omega equation turned into grid-square form. You'll find that in Holton or you can google it. What you are trying to calculate at each time step is not the velocity but the acceleration. The omega equation will create vertical motion for you. Then for a computer model you will also need the pure advection terms to move it around different grid squares, and you probably want a frictional/turbulent diffusion decay term. Driving your vertical velocity off the omega equation is a stable and time-tested method.

Or, you can apply mass continuity and something like a CAPE equation directly for your vertical motion(plus the above standard advection of already-existing vertical velocity). What you are calculating at any mid level to get the vertical motion is the convergence/divergence at the level above and below. Thus if you have equal convergence both above and below your forcing in that grid square is 0, if you have convergence above and divergence below you drive sinking motion, etc etc. I have used just CAPE/convergence for a small scale(20km domains) model of a single thunderstorm cell. Don't know how well that will work on larger scales.
 
MClarkson's idea is pretty good, and if you can implement that, I would. I would also suggest looking at how w is diagnosed in the WRF: WRF browser (subroutine diagnose_w). You could also try using the vertical momentum equation, which is listed with the horizontal momentum equations in Holton's textbook.
 
The downside to the differential divergence is that if you have a deep layer of divergence into a given set of grid squares you will not conserve mass perfectly as you will only have corresponding outflow out of the sides, artificially removing mass in the core. This would make some deep motions weaker than is realistic, but would be much better than having no mass continuity at all.

A method I tried before and didnt get working was the primitive equations where convergence leads to increased P witch leads to outflow from that grid square. Using that you don't have separate methods for momentum advection and mass continuity, it is all a result of the same P perturbation which is a result of convergence/divergence. This seems simpler and I think it should work, but it didnt work for me. I think I made a math or programing error, but if I am making a fundamental error please someone let me know.
 
A method I tried before and didnt get working was the primitive equations where convergence leads to increased P witch leads to outflow from that grid square. Using that you don't have separate methods for momentum advection and mass continuity, it is all a result of the same P perturbation which is a result of convergence/divergence. This seems simpler and I think it should work, but it didnt work for me. I think I made a math or programing error, but if I am making a fundamental error please someone let me know.

Since you are allowing for compression (change in pressure), wouldn't this allow sound waves? Thus you would need a very small time step, smaller than the distance sound can travel through your smallest vertical level.

I played around a bit with my model at one point by using the ratio of a grid's temperature to the average of surrounding squares at the same level, times gravity, for the acceleration. I found I was able to get somewhat realistic motions (after of course an initial adjustment) for differential surface heating. But I had to make my timestep 1 second, as anything else greater would blow up! Then I realized this was likely because sound waves would travel the distance of my smallest level in just a couple seconds.

I'm wondering if the problem you experienced was just due to too large of a timestep?
 
I don't think it was sound waves. On a grid scale of a kilometer I was getting very little wind even when pressures got up to like 1500 millibars. Thats just not right! a 50,000 pascal difference on a 1km grid should result in a 50m/s/s acceleration at near surface density. Anyway, I thought the "speed of sound" in a weather model was artificially equal to your dx/time step, and that it can't transfer faster than that, and is naturally stable. Maybe I shouldn't assume anything in a model is naturally stable...
 
MClarkson's idea is pretty good, and if you can implement that, I would. I would also suggest looking at how w is diagnosed in the WRF: WRF browser (subroutine diagnose_w). You could also try using the vertical momentum equation, which is listed with the horizontal momentum equations in Holton's textbook.

Thanks for the link to html-browsable code for WRF. I had been looking for something like that - beats reading the code in vi.

I have ran across the omega equation before (as well as q-vector equation which seems similar). However, it is a differential equation that I don't yet know enough to solve for vertical velocity. Probably at some point I will understand it well enough to know what terms I can ignore and be able to solve this equation for the vertical velocity.
 
From your description you've described that the model is incompressible. You don't need to prognosticate w with naiver stokes then. Remember, incompressible means there is no divergence du/dx+dv/dy+dw/dz=0. You know the vertical velocity at the surface is zero (assuming an impermeable surface). Therefore to determine w in a column, simply integrate all the horizontal convergence (i.e. du/dx+dv/dy) in z below the layer of interest for where you want to know the vertical velocity.
 
Last edited by a moderator:
Back
Top