[ncl-talk] Confusing documentation for wrf_omega and wrf_user_getvar

Bill Ladwig ladwig at ucar.edu
Mon Apr 9 11:20:39 MDT 2018


Hi James,

The units for Omega should be Pa/s. The documentation is incorrect. We'll
make a ticket to fix it.

Here is the code:

c======================================================================
> c
> c !IROUTINE: omgcalc -- Calculate omega (dp/dt)
> c
> c !DESCRIPTION:
> c
> c   Calculate approximate omega, based on vertical velocity w (dz/dt).
> c   It is approximate because it cannot take into account the vertical
> c   motion of pressure surfaces.
> c
> c !INPUT:
> c    mx - index for x dimension
> c    my - index for y dimension
> c    mx -  index for vertical dimension
> c    qvp - water vapor mixing ratio (kg/kg)
> c    tmk - temperature (K)
> c    www - vertical velocity (m/s)
> c    prs -  pressure (Pa)
> c
> c !OUTPUT:
> c    omg - omega (Pa/sec)
> c
> c !ASSUMPTIONS:
> c
> c !REVISION HISTORY:
> c     2009-March  - Mark T. Stoelinga - from RIP4.5
> c     2010-August - J. Schramm
> c     2014-March - A. Jaye - modified to run with NCL and ARW wrf output
> c
> c ------------------------------------------------------------------

c NCLFORTSTART
>       subroutine omgcalc(qvp,tmk,www,prs,omg,mx,my,mz)
>       implicit none
>       integer mx, my, mz
>       double precision qvp(mz,my,mx)
>       double precision tmk(mz,my,mx)
>       double precision www(mz,my,mx)
>       double precision prs(mz,my,mx)
>       double precision omg(mz,my,mx)
> c NCLEND
> c Local variables
>       integer i, j, k
>       double precision grav,rgas,eps
> c
> c Constants
> c
>       grav=9.81           ! m/s**2
>       rgas=287.04  !J/K/kg
>       eps=0.622
>       do k=1,mx
>         do j=1,my
>           do i=1,mz
>             omg(i,j,k)=-grav*prs(i,j,k)/
>      &        (rgas*((tmk(i,j,k)*(eps+qvp(i,j,k)))/
>      &        (eps*(1.+qvp(i,j,k)))))*www(i,j,k)
>           enddo
>         enddo
>       enddo
> c
>       return
>       end


If you want to view the source code yourself, it's in
ncl_source_directory/ni/src/lib/nfpfort/wrf_rip_phys_routines.f.

Hope this helps,

Bill



On Fri, Apr 6, 2018 at 1:22 PM, James Russell <jorussel at ncsu.edu> wrote:

> Hi all,
>
> Just wanted to clarify some confusion over the documentation for the
> wrf_omega and wrf_user_getvar functions.
>
> In the wrf_user_getvar documentation it says that the units of omega are
> in [C]. Also the first line in
> the wrf_omega documentation says:
>
>
> *"Calculates approximate omega in C..."*
>
> Also I'm confused why these functions use mixing ratio and temperature. 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.
>
> 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 to avoid such confusion, especially the units.
>
> Thanks,
> James
>
> ------------------------------------------------------------
> -----------------
> Graduate Research & Teaching Assistant
> PhD Student: Atmospheric Science
> Department of Marine, Earth, and Atmospheric Sciences
> North Carolina State University
> https://sites.google.com/view/james-russell/
> --------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180409/404b034f/attachment-0001.html>


More information about the ncl-talk mailing list