output different terms of horizontal momentum equations

Discuss advection schemes, timestepping, pressure gradients, coordinates, etc.

output different terms of horizontal momentum equations

Postby amy1086 on Sat May 09, 2009 10:12 pm

Hello,
I want to output different terms of horizontal momentum equations (eg. pressure gradient term, advection term, Coriolis term, horizontal and vertical turbulence mixing terms) and compare their relative importance in determining the local wind acceleration. Please help me to solve this. Which program should i modify?

Thanks in advance!
amy1086
 
Posts: 6
Joined: Thu Apr 02, 2009 10:48 am

Re: output different terms of horizontal momentum equations

Postby jimmyc on Sun May 10, 2009 2:29 am

Well, you have a semi big task ahead of you. You need to start in solve_em.F in dyn_em/
Check the registry to see if any of the variables are specified before adding new ones.

Otherwise, it will be a matter of tracking down the subroutine where the terms are calculated. They will probably be coupled to mass, and applied as tendency terms. You will have to decide if you want coupled or uncoupled terms, and if you want instantaneous values or accumulated values.
Good luck.
James Correia, Jr
Climate Physics group
Pacific Northwest National lab
jimmyc
 
Posts: 304
Joined: Tue Apr 15, 2008 1:10 am

Re: output different terms of horizontal momentum equations

Postby tkgdewxf1983 on Mon Aug 31, 2009 3:38 am

amy1086 wrote:Hello,
I want to output different terms of horizontal momentum equations (eg. pressure gradient term, advection term, Coriolis term, horizontal and vertical turbulence mixing terms) and compare their relative importance in determining the local wind acceleration. Please help me to solve this. Which program should i modify?

Thanks in advance!

Dear,Sir
I also need to do this work, Did you solve this problem? If you have solved the problem, Plealse give me a Help, Thanks very much!
Awaiting your early reply.
yours faithfully
tkgdewxf1983
tkgdewxf1983
 
Posts: 2
Joined: Mon Aug 31, 2009 3:24 am

Re: output different terms of horizontal momentum equations

Postby tkgdewxf1983 on Mon Aug 31, 2009 3:58 am

jimmyc wrote:Well, you have a semi big task ahead of you. You need to start in solve_em.F in dyn_em/
Check the registry to see if any of the variables are specified before adding new ones.

Otherwise, it will be a matter of tracking down the subroutine where the terms are calculated. They will probably be coupled to mass, and applied as tendency terms. You will have to decide if you want coupled or uncoupled terms, and if you want instantaneous values or accumulated values.
Good luck.

Dear Sir!
I am a student, I also need to do this work, The answer that you provided has given me a big help,But i also don't know how to solve this problem. Could you describe in detail? could you give a modified solve_em.F to me? I know it is easy for you to do this work, However it is a huge task for me to do.
I am looking forward to your reply.
Thank you very much!!
cheers
tkgdewxf1983
tkgdewxf1983
 
Posts: 2
Joined: Mon Aug 31, 2009 3:24 am

Re: output different terms of horizontal momentum equations

Postby samsonhagos on Wed Dec 16, 2009 1:25 pm

Well the code you need to modify are module_em.F, Registry_EM and solve_em.F. Define new arrays in module_em with intent OUT (that is were the terms are called in from their respective subroutine)
For example if you want advection, you save the ru_tend before and after advection is called and subtract the first from the second and so on.
Include them in the subroutine statement as well as in the call statement of solve_em and include them in the registry as well. In other words follow the variable ru_tend (the sum of them all) and take the clue.
samsonhagos
 
Posts: 1
Joined: Wed Dec 16, 2009 1:14 pm

Re: output different terms of horizontal momentum equations

Postby VictoriaS on Thu Aug 26, 2010 4:14 am

Thanks for the tips on this post. I've now done this recently. Here is what I did in case anyone finds it helpful. It seems to work but I've not tested it throughly yet!

You need to create 6 new state variables in Registry.EM

state real ru_tend_adv ikj dyn_em 1 X irh "ru_tend_adv" "" ""
state real ru_tend_pgf ikj dyn_em 1 X irh "ru_tend_pgf" "" ""
state real ru_tend_cor ikj dyn_em 1 X irh "ru_tend_cor" "" ""
state real rv_tend_adv ikj dyn_em 1 X irh "rv_tend_adv" "" ""
state real rv_tend_pgf ikj dyn_em 1 X irh "rv_tend_pgf" "" ""
state real rv_tend_cor ikj dyn_em 1 X irh "rv_tend_cor" "" ""

These will be available to solve_em.F.
Pass all 6 of these variable to rk_tendency (note that they are in the form grid%ru_tend_adv)
Make some modications to rk_tendency (in module_em.F)

1. define these 6 variables as REAL INOUT
2. after the call to advect_u add ru_tend_adv=ru_tend
3, after the call to advect_v add rv_tend_adv=rv_tend
4. after the call to horizontal_pressure_gradient add ru_tend_pgf=ru_tend - ru_tend_adv (same for v)
5. after call to coriolis add ru_tend_adv = ru_tend - ru_tend_adv - ru_tend_pgf (same for v)

I am only doing idealized exper. on a cartesian grid so didn't worry about the curvature.

Victoria
VictoriaS
 
Posts: 5
Joined: Thu Jun 17, 2010 11:29 am


Return to Dynamics and Numerics

Who is online

Users browsing this forum: No registered users and 1 guest