<div dir="ltr">







<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">Hi Irina:</span></span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">  </span></span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>ph = wrf_user_getvar(a,"PH",time)</span></p>
<p class="gmail-p1"><span class="gmail-s1"> </span><span class="gmail-s2">phb</span><span class="gmail-s1"> = wrf_user_getvar(a,"PHB",time)</span></p><p class="gmail-p1">







</p><p class="gmail-p1"><span class="gmail-s1">height</span><span class="gmail-s2">_w(i,j,</span><span class="gmail-s3">0</span><span class="gmail-s2">)</span><span class="gmail-s4">=</span><span class="gmail-s2">(ph(i,j,</span><span class="gmail-s3">0</span><span class="gmail-s2">)</span><span class="gmail-s4">+</span><span class="gmail-s2">phb(i,j,</span><span class="gmail-s3">0</span><span class="gmail-s2">))</span><span class="gmail-s4">/</span><span class="gmail-s3">9.8</span></p><p class="gmail-p1"><span class="gmail-s1">







</span></p><p class="gmail-p1"><span class="gmail-s1">height_w(k)</span><span class="gmail-s2">=</span><span class="gmail-s1">(ph(i,j,k)</span><span class="gmail-s2">+</span><span class="gmail-s3">phb</span><span class="gmail-s1">(i,j,k))</span><span class="gmail-s2">/</span><span class="gmail-s4">9.8</span></p><p class="gmail-p1"><span class="gmail-s4">If you want without terrain ("HGT").</span></p><p class="gmail-p1"><span class="gmail-s4">







</span></p><p class="gmail-p1"><span class="gmail-s1">height</span><span class="gmail-s2">_wmt(i,j,k)</span><span class="gmail-s3">=</span><span class="gmail-s2">(ph(i,j,k)</span><span class="gmail-s3">+</span><span class="gmail-s2">phb(i,j,k))</span><span class="gmail-s3">/</span><span class="gmail-s4">9.8</span><span class="gmail-s3">-</span><span class="gmail-s2">terrain(i,j)</span></p><p class="gmail-p1"><span class="gmail-s4"><br></span></p><p class="gmail-p1"><span class="gmail-s4">I believe that U and V are at the half levels.  In that case, the the first half level height would be height_w(k)/2. </span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">do</span><span class="gmail-s1"> k</span><span class="gmail-s2">=</span><span class="gmail-s3">1</span><span class="gmail-s1">,nk</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">do</span><span class="gmail-s1"> j</span><span class="gmail-s2">=</span><span class="gmail-s3">1</span><span class="gmail-s1">,nj</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">do</span><span class="gmail-s1"> i</span><span class="gmail-s2">=</span><span class="gmail-s3">1</span><span class="gmail-s1">,ni</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">          </span></span><span class="gmail-s4">height</span><span class="gmail-s1">(i,j,k)</span><span class="gmail-s2">=</span><span class="gmail-s3">0.5</span><span class="gmail-s2">*</span><span class="gmail-s1">(</span><span class="gmail-s4">height</span><span class="gmail-s1">_w(i,j,k</span><span class="gmail-s2">-</span><span class="gmail-s3">1</span><span class="gmail-s1">)</span><span class="gmail-s2">+</span><span class="gmail-s4">height</span><span class="gmail-s1">_w(i,j,k))</span></p><p class="gmail-p2"><span class="gmail-s1">! <span class="gmail-Apple-converted-space">        </span>w_s(i,j,k)=0.5*(w(i,j,k-1)+w(i,j,k))</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">end do</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">end do</span></p><p class="gmail-p1"><span class="gmail-s4">














</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">      </span></span><span class="gmail-s2">end do</span></p><p class="gmail-p1">Barry</p><p class="gmail-p1"><span class="gmail-s4"><br></span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 12:57 AM, Irina Rypina <span dir="ltr"><<a href="mailto:irypina@whoi.edu" target="_blank">irypina@whoi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am trying to use WRF output (from a wrfout* file) and have a question about WRF variables.<br>
<br>
For my analysis, I only need to know the 3 components of air velocities, u,v and w, and their corresponding grids in 3d (lat, lon, height above sea level) and time.<br>
<br>
I believe "U", "V", and "W" variables in WRF give the 3 components of velocity, and I think the lateral lat and long grids for these are given by "XLONG_U,XLATG_U", "XLONG_V,XLATG_V", and "XLONG,XLATG."<br>
<br>
I also found the time variable "XTIME" that gives time stamps for "U", "V", and "W."<br>
<br>
But what I cannot find are the z-grids (height above sea level in meters) at which "U", "V", and "W" are given.<br>
<br>
Can anyone please help me with this?<br>
<br>
Thanks!<br>
Irina<br>
<br>
<br>
______________________________<wbr>_________________<br>
Wrf-users mailing list<br>
<a href="mailto:Wrf-users@ucar.edu" target="_blank">Wrf-users@ucar.edu</a><br>
<a href="http://mailman.ucar.edu/mailman/listinfo/wrf-users" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/wrf-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br></span></div><div>C.E.O, Weather It Is, LTD<br>Weather and Climate Focus<br><a href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br>Jerusalem, Israel<br>Local: 02 930 9525<br>Cell: 054 7 231 170<br>Int-IS: x972 2 930 9525<br>US 914 432 3108<br></div></div></div>
</div>