<div dir="ltr">Hi James,<div><br></div><div>The units for Omega should be Pa/s. The documentation is incorrect. We'll make a ticket to fix it.</div><div><br></div><div>Here is the code:</div><div><br></div><div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">c=============================<wbr>==============================<wbr>===========<br>c<br>c !IROUTINE: omgcalc -- Calculate omega (dp/dt)<br>c<br>c !DESCRIPTION:<br>c<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>Calculate approximate omega, based on vertical velocity w (dz/dt).<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>It is approximate because it cannot take into account the vertical<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>motion of pressure surfaces.<br>c<br>c !INPUT:<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>mx - index for x dimension<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>my - index for y dimension<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>mx -<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>index for vertical dimension<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>qvp - water vapor mixing ratio (kg/kg)<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>tmk - temperature (K)<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>www - vertical velocity (m/s)<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>prs -<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>pressure (Pa)<br>c<br>c !OUTPUT:<br>c<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>omg - omega (Pa/sec)<br>c<br>c !ASSUMPTIONS:<br>c<br>c !REVISION HISTORY:<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>2009-March<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>- Mark T. Stoelinga - from RIP4.5<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>2010-August - J. Schramm<br>c <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>2014-March - A. Jaye - modified to run with NCL and ARW wrf output<br>c<br>c ------------------------------<wbr>------------------------------<wbr>------</blockquote>
</div><div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">c NCLFORTSTART<br><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">subroutine</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>omgcalc<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span>qvp<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>tmk<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>www<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>prs<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>omg<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>mx<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"><wbr>,</span>my<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span>mz<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>implicit<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>none<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">integer</span> <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span>, <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span>, <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">qvp</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">tmk</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">www</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">prs</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<span class="m_-8612539612182925429gmail-Apple-converted-space"> <br></span></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">omg</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">(</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">)<br></span>c NCLEND<br>c Local variables<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">integer</span> <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>, <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>, <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k<br></span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>double<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span>precision<span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">grav</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">rgas</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)">,</span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">eps</span><span class="m_-8612539612182925429gmail-s1" style="color:rgb(0,0,0)"> <br></span>c<br>c Constants<br>c<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">grav</span>=9.81 <span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s4" style="color:rgb(78,144,114)">! m/s**2<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">rgas</span>=287.04<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s4" style="color:rgb(78,144,114)">!J/K/kg<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">eps</span>=0.622<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">do</span> <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>=1,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mx<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">do</span> <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>=1,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">my<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">do</span> <span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>=1,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">mz<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">omg</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)=-<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">grav</span>*<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">prs</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)/<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>&<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">rgas</span>*((<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">tmk</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)*(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">eps</span>+<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">qvp</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)"><wbr>j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)))/<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>&<span class="m_-8612539612182925429gmail-Apple-converted-space"> </span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">eps</span>*(1.+<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">qvp</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)))))*<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">www</span>(<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">i</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)"><wbr>j</span>,<span class="m_-8612539612182925429gmail-s3" style="color:rgb(3,38,204)">k</span>)<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">enddo<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">enddo<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">enddo<br></span>c<br><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">return<br></span><span class="m_-8612539612182925429gmail-Apple-converted-space"> </span><span class="m_-8612539612182925429gmail-s2" style="color:rgb(147,26,104)">end</span></blockquote>
</div><div><br></div><div>If you want to view the source code yourself, it's in ncl_source_directory/ni/src/<wbr>lib/nfpfort/wrf_rip_phys_<wbr>routines.f.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 6, 2018 at 1:22 PM, James Russell <span dir="ltr"><<a href="mailto:jorussel@ncsu.edu" target="_blank">jorussel@ncsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div>Just wanted to clarify some confusion over the documentation for the wrf_omega and wrf_user_getvar functions.<div><br></div><div>In the wrf_user_getvar documentation it says that the units of omega are in [C]. Also the first line in </div><div>the wrf_omega documentation says:</div><div><br></div><div><i><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">"Calculates approximate omega in C..."</span><br></i></div><div><br></div><div>Also I'm confused why these functions use<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> mixing ratio and temperature. </span>At first I thought I was confused about what was being output in these two functions since the units for dp/dt should not be celsius, and I'm not familiar with an equation that uses these variables to calculate dp/dt. However, further down the page in wrf_omega it says that these functions output dp/dt and that the units are in Pa/s. That cleared up that this is in fact dp/dt at least. But I'm still confused about the calculation being used.</div><div><br></div><div>Could someone point me to the code these use? Or perhaps a paper with the specific equation used? Also it might be helpful if the documentation could be corrected <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">to avoid such confusion</span>, especially the units.</div><div><br></div><div>Thanks,</div><div>James</div><div><br></div><div><div><div class="m_-6533685111399232588gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">------------------------------<wbr>------------------------------<wbr>-----------------<br><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">Graduate Research & Teaching Assistant<br></span></font></span></div><div><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">PhD Student: Atmospheric Science<br></span></font></span></div><div><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">Department of Marine, Earth, and Atmospheric Sciences <br></span></font></span></div><div dir="ltr"><div><span lang="en-US"><font face="Tahoma"><span dir="ltr"><font color="#000000"><span style="font-size:10pt">North Carolina State University</span></font><br><font color="#000000"><span style="font-size:13.3333px"><a href="https://sites.google.com/view/james-russell/" target="_blank">https://sites.google.com/view/<wbr>james-russell/</a></span></font></span></font></span></div><div><span lang="en-US"><font face="Tahoma" size="2" color="black"><span style="font-size:10pt" dir="ltr">------------------------------<wbr>------------------------------<wbr>--------<br></span></font></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>