<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Ryan,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Your dbz array has been vertically interpolated, using <span style="font-family:arial,sans-serif">wrf_user_intrp3d. This routine has a hard-wired number of vertical levels set to 100. </span></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default">Since you want to plot from 0-10 km, you should follow the example for a limited vertical extent:</div><div class="gmail_default"><a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/CROSS_SECTION/wrf_CrossSection4.htm"> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/CROSS_SECTION/wrf_CrossSection4.htm</a></div><div class="gmail_default">in which your height (z) is also vertically interpolated to these 100 levels. If you follow what happens to zz in the online example, I think you will get what you want. I have extracted the required lines and added a few comments to what they have already.</div><div class="gmail_default"><br></div><div class="gmail_default"><pre> ; get height info for labels
zmin = 0.
zmax = 10. ; We are only interested in the first 10km
nz = floattoint(zmax/2 + 1) ; nz = # of tick marks (you want 6)</pre><pre> </pre><pre><span style="font-family:arial,sans-serif"> ; Find the index where 10km is - only need to do this once</span><br></pre><pre>
zz = wrf_user_intrp3d(z,z,"v",plane,angle,opts) ; interpolate z -> zz
b = ind(zz(:,0) .gt. zmax*1000. ) ; get 1st index above zmax
zspan = b(0) - 1 <span style="font-family:arial,sans-serif"> </span><font face="monospace, monospace"> ; level index to use</font></pre><pre><font face="monospace, monospace"> </font><span style="font-family:arial,sans-serif"> </span><span style="font-family:monospace,monospace"> delete(zz)</span></pre><pre> delete(b)
<br></pre><pre><span style="font-family:arial,sans-serif">.....</span><br></pre><pre><span style="font-family:arial,sans-serif"> </span><font face="monospace, monospace"> opts_xy@tmYLValues = fspan(0,zspan,nz) ; Create tick marks</font><br></pre><pre> opts_xy@tmYLLabels = sprintf("%.1f",fspan(zmin,zmax,nz)) ; Create labels</pre><pre>Then when you actually do the plotting, you must set the max index to limit the vertical dimension:</pre><pre> contour_dbz = wrf_contour(a,wks,dbz_plane(0:zspan,:),opts_xy)</pre><pre>Good luck,</pre><pre>Evelyn</pre><pre><br></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 8, 2016 at 8:22 PM, Ryan Connelly <span dir="ltr"><<a href="mailto:rconne01@gmail.com" target="_blank">rconne01@gmail.com</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">Hi,<div><br></div><div>I produce a vertical plane of, in this case, simulated reflectivity. I want to then manually define the y axis (in this case z) to have tick marks every 2 km from 0 to 10 km. This is proving surprisingly difficult. </div><div><br></div><div>This WRF run has 39 vertical levels, yet somehow a PrintVarSummary of the newly-created plane (below) reveals that its vertical extent is "100". 100 whats? Not 100 vertical levels, not 100 meters or 100 km, not 100 hPa...</div><div><br></div><div>I figured out how to use the tmYLValues and tmYLLabels options in xy plotting resources (also below) to define where to put tick marks and what to label them, to get me the 2-4-6-8-10 that I want, <b>but my problem is: how do I get them to match the actual vertical coordinate of the data (meters or km)?</b> Right now, I can put in any numbers I want and it'll put them there, but the contours don't move, so the actual height of the data is not changing, and remains unknown.</div><div><br></div><div><div><font face="monospace, monospace">Variable: dbz_plane</font></div><div><font face="monospace, monospace">Type: float</font></div><div><font face="monospace, monospace">Total Size: 60400 bytes</font></div><div><font face="monospace, monospace"> 15100 values</font></div><div><font face="monospace, monospace">Number of Dimensions: 2</font></div><div><font face="monospace, monospace">Dimensions and sizes: [Vertical | 100] x [Horizontal | 151]</font></div><div><font face="monospace, monospace">Coordinates:</font></div><div><font face="monospace, monospace">Number Of Attributes: 4</font></div><div><font face="monospace, monospace"> _FillValue : 9.96921e+36</font></div><div><font face="monospace, monospace"> units : dBZ</font></div><div><font face="monospace, monospace"> description : Reflectivity</font></div><div><font face="monospace, monospace"> Orientation : Cross-Section: (27,254) to (142,156)</font></div><div><br></div><div>****************************************************</div><div><br></div><div><div><font face="monospace, monospace"> ; Options for XY Plots</font></div><div><font face="monospace, monospace"> opts_xy = res</font></div><div><font face="monospace, monospace"> opts_xy@tiYAxisString = "Height (km)"</font></div><div><font face="monospace, monospace"> opts_xy@cnMissingValPerimOn = True</font></div><div><font face="monospace, monospace"> opts_xy@cnMissingValFillColor = 0</font></div><div><font face="monospace, monospace"> opts_xy@cnMissingValFillPattern = 11</font></div><div><font face="monospace, monospace"> opts_xy@tmYLMode = "Explicit"</font></div><div><font face="monospace, monospace"> ;opts_xy@tmYLValues = fspan(0,100,6) ; Create tick marks</font></div><div><font face="monospace, monospace"> ;opts_xy@tmYLLabels = fspan(0,10,6) ; Create labels</font></div><div><font face="monospace, monospace"> opts_xy@tiXAxisFontHeightF = 0.020</font></div><div><font face="monospace, monospace"> opts_xy@tiYAxisFontHeightF = 0.020</font></div><div><font face="monospace, monospace"> opts_xy@tmXBMajorLengthF = 0.02</font></div><div><font face="monospace, monospace"> opts_xy@tmYLMajorLengthF = 0.02</font></div><div><font face="monospace, monospace"> opts_xy@tmYLLabelFontHeightF = 0.015</font></div><div><font face="monospace, monospace"> opts_xy@PlotOrientation = dbz_plane@Orientation</font></div></div><div><br></div><div><br></div><div>Thanks,</div><div>Ryan</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font size="1">Ryan Connelly</font></div><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><font color="#000000"><font size="1">M.S. Student in Atmospheric Sciences, </font><span style="font-size:x-small">Stony Brook University</span><br></font></div><div dir="ltr" style="font-size:12.8px"><div><font color="#000000"><font size="1">B.S. in Meteorology with Minors in Mathematics and GIS, </font><span style="font-size:x-small">Valparaiso University</span></font></div></div><div><a href="mailto:rconne01@gmail.com" style="font-size:x-small" target="_blank">rconne01@gmail.com</a><br></div><div><font size="1"><a href="mailto:ryan.connelly@stonybrook.edu" target="_blank">ryan.connelly@stonybrook.edu</a></font></div></div></div></div></div></div></div></div></div></div>
</font></span></div></div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>