Hi Erik,<br><br>
The basic concept is that the "staggered" vertical grid is at the top
and bottom of each grid cell. Except for vertical wind, W, most
variables are in the vertical middle of the grid cell. So to get the height of
the QVAPOR variable, take the average of the top and bottom heights:<br><br> height of QVAPOR in vertical cell n = ((PH(n)+PHB(n)) + (PH(n+1) + PHB(n+1))) / 9.81<br><br>Of course, there are also the X and Y coordinates for the cell, but they are the same for QVAPOR as for PH and PHB. If you then want QVAPOR "at a given elevation" you will have to interpolate again from the two QVAPOR values above and below the given elevation. So you interpolate PH and PHB to get the vertical center of the cells and then interpolate to the "given elevation." There are bound to be some algebraic shortcuts. And maybe someone else will come up with a better approach.<br>
<br>Q2 has already been interpolated (more likely extrapolated) to the 2 meter level for easy comparison to met station observations.<br><br>You didn't ask, but for the horizontally staggered grids, the U and V winds are on the horizontal edges of the grid cell rather than in the middle, but they are centered up and down, so they are at the same heights as QVAPOR.<br>
<br>Hope that helps,<br>Kevin<br><br><div class="gmail_quote">On Fri, Sep 2, 2011 at 2:02 PM, Erik Carlsten <span dir="ltr"><<a href="mailto:ecarlste@gmail.com">ecarlste@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi All,<div><br></div><div>This is my first time using this mailing list so hopefully I give you the information you need to answer the question I have, providing you have the time to help.</div><div><br></div><div>Currently I am running WRF and producing output just fine. The variables I am primarily interested in looking at right now are PH, PHB, and QVAPOR. I might also need Q2, but I am unsure yet due to my lack of overall understanding of the correlation between the staggered grid for elevation ( ( PH + PHB ) / 9.81 ) and the non-staggered grid of QVAPOR.</div>
<div><br></div><div>What I am trying to figure out is what the water vapor mixing ratio is at a given elevation. I am pulling the data straight out of the NetCDF files using C and Matlab, so I won't be using NCL at all for this.</div>
<div><br></div><div>Can anyone explain with some detail on how I would determine which vertical layer of QVAPOR correlates to which vertical layer of "total geopotential height in meters"?</div><div><br></div><div>
Thanks very much for your time,</div><div>Erik<br clear="all"><div><br></div>-- <br>Erik S. Carlsten Cell: <a href="tel:%28406%29%20570-1547" value="+14065701547" target="_blank">(406) 570-1547</a> <br>EPS 116 Lab: <a href="tel:%28406%29%20994-6145" value="+14069946145" target="_blank">(406) 994-6145</a> <br>
Montana State University <br>
Bozeman, MT 59717<br><br>---------------------------------------------------------------<br>There is a single light of science, and to<br>brighten it anywhere is to brighten it<br>everywhere. <br> - Isaac Asimov<br>
</div>
<br>_______________________________________________<br>
Wrf-users mailing list<br>
<a href="mailto:Wrf-users@ucar.edu">Wrf-users@ucar.edu</a><br>
<a href="http://mailman.ucar.edu/mailman/listinfo/wrf-users" target="_blank">http://mailman.ucar.edu/mailman/listinfo/wrf-users</a><br>
<br></blockquote></div><br>