output different terms of horizontal momentum equations

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

output different terms of horizontal momentum equations

Postby amy1086 » 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: 8
Joined: Thu Apr 02, 2009 10:48 am

Re: output different terms of horizontal momentum equations

Postby jimmyc » 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.
The views expressed in this message do not necessarily reflect those of NOAA or the National Weather Service or the University of Oklahoma.
James Correia, Jr
jimmyc
 
Posts: 519
Joined: Tue Apr 15, 2008 1:10 am

Re: output different terms of horizontal momentum equations

Postby tkgdewxf1983 » 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 » 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 » 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: 2
Joined: Wed Dec 16, 2009 1:14 pm

Re: output different terms of horizontal momentum equations

Postby VictoriaS » 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: 15
Joined: Thu Jun 17, 2010 11:29 am

Re: output different terms of horizontal momentum equations

Postby lucy » Sat Jan 18, 2014 4:17 am

Hi Victoria,
Does this method work?
What should I dot about the terms of conservation equations for the potential temperature? Also, is it possible to extract contributions of each physics scheme? if yes, how?
thanks
lucy
 
Posts: 5
Joined: Wed Jul 07, 2010 1:28 am

Re: output different terms of horizontal momentum equations

Postby nadya512 » Tue Mar 04, 2014 3:41 pm

Hi Lucy,

I am not sure if this will be of any help, but I've done something similar for a real-case simulation momentum equations. You can find the description and altered code (with instructions) here: https://circle.ubc.ca/bitstream/handle/ ... mTerms.pdf

The physics contributions are often already available in the registry (you just need to select to output them).

Hope it helps,
Nadya
nadya512
 
Posts: 1
Joined: Tue Mar 04, 2014 3:36 pm

Re: output different terms of horizontal momentum equations

Postby nuist_czy » Sat Nov 02, 2019 1:24 am

Dear nadya512:

I have use your methods to output the momtenum budgets in the wrfout* files.However, I found that the momtenum equation does not balance at the 20°N ,but it is right in the north of the 20°N. So it is so amazing and I can not find the wrong with my test.
nuist_czy
 
Posts: 2
Joined: Sun Sep 15, 2019 11:52 pm


Return to Dynamics and Numerics

Who is online

Users browsing this forum: No registered users and 1 guest