<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Evelyn,<br>
Thank you for your help. I was able to get a diagonal slice using the single pivot point (and angle) example. Still no luck with the two point example. The latter would be better as I could limit the horizontal extent more easily. I'll try again later.
<br>
thanks again,<br>
Matt<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF967328"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Evelyn Grell - NOAA Affiliate [evelyn.grell@noaa.gov]<br>
<b>Sent:</b> Monday, March 23, 2015 8:12 AM<br>
<b>To:</b> Matthew Fearon<br>
<b>Cc:</b> wrf-help@ucar.edu; ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] diagonal cross section with wrf_user_intrp3d<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="">
<div class="" tabindex="-1" style="">
<div class="" style="width:905px">
<div class="" style="">
<div id=":5qk" style="">
<div class="" style="">
<div class="" style="">
<div id=":5q0" class="" style="">
<div id=":5qj" class="" style="overflow:hidden">
<div dir="ltr" style="">
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
Matthew,</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
Regarding your second question (the easier one), I got confused by this too. I believe the order of the variables got changed between versions:</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
<div class="gmail_default" style="font-size:12.8000001907349px">In v6.1.2, the order to specify 2 points for a cross section has to be x1,x2,y1,y2.</div>
<div class="gmail_default" style="font-size:12.8000001907349px">In v6.2.1, the order to specify 2 points has to be x1,y1,x2,y2.</div>
<div class="gmail_default" style="font-size:12.8000001907349px">(maybe wrfhelp could add a note in the example.)</div>
<div class="gmail_default" style="font-size:12.8000001907349px"><br>
</div>
<div class="gmail_default" style="font-size:12.8000001907349px">You can check by looking at the code in your</div>
</div>
<div class="gmail_default" style=""><font face="tahoma, sans-serif"><span style="font-size:12.8000001907349px">$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl</span></font><br>
</div>
<div class="gmail_default" style=""><font face="tahoma, sans-serif"><span style="font-size:12.8000001907349px"><br>
</span></font></div>
<div class="gmail_default" style=""><font face="tahoma, sans-serif"><span style="font-size:12.8000001907349px">Another thing that I ran into is that it assumes you are defining your points in "WRF" space (ie arrays start with 1) rather than in "NCL" space (ie
arrays start with 0) so it subtracts 1 for you...</span></font></div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
<br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
<span style="font-size:12.8000001907349px">In wrf_user_interp3d:</span><br>
</div>
<div class="gmail_default" style="font-family:arial,sans-serif; font-size:12.8000001907349px">
<pre><font color="#0000ff">; set vertical cross section
if (opts) then
xy = wrf_user_set_xy( z, loc_param(0)-1, loc_param(2)-1, \ ; the -1 is for NCL dimensions
loc_param(1)-1, loc_param(3)-1, \
angle, opts )</font><font face="tahoma, sans-serif">
</font></pre>
<div style="font-family:tahoma,sans-serif">(loc_param is the variable containing your XS endpoints).</div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
<div style="font-family:tahoma,sans-serif">About your first question, maybe you are missing the 2d interpolation that defines the x-axis?</div>
<div style="font-family:tahoma,sans-serif"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="" tabindex="-1" style="">
<div class="" style="width:905px">
<div class="" style="">
<div id=":5oo" style="">
<div class="" style="">
<div class="" style="">
<div id=":5om" class="" style="">
<div id=":5on" class="" style="overflow:hidden">
<div dir="ltr" style="">
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
something like:</div>
<div class="gmail_default" style="">
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
if (xang.gt.20. .and. xang.lt.340) then</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
X_plane = wrf_user_intrp2d(lon,xspts,0.,True)</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
else</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
X_plane = wrf_user_intrp2d(lat,xspts,0.,True)</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
end if</div>
<div class="gmail_default" style="">
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
dimsX = dimsizes(X_plane)</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">
xspan = dimsX(0)-1</div>
<div style="font-family:tahoma,sans-serif; font-size:12.8000001907349px"><br>
</div>
<div style=""><font face="tahoma, sans-serif"><span style="font-size:12.8000001907349px"> res@tmXBValues = fspan(0,xspan,2) </span></font><br>
</div>
</div>
<div style="font-family:tahoma,sans-serif; font-size:12.8000001907349px"><br>
</div>
<div style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">Hope that helps,</div>
<div style="font-family:tahoma,sans-serif; font-size:12.8000001907349px">Evelyn Grell</div>
<div style="font-family:tahoma,sans-serif; font-size:12.8000001907349px"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Mar 23, 2015 at 12:21 AM, Matthew Fearon <span dir="ltr">
<<a href="mailto:Matthew.Fearon@dri.edu" target="_blank">Matthew.Fearon@dri.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<pre>Dear WRF-help and NCL users,<br><br>Has anyone successfully plotted a cross section with wrf data <br>along a diagonal, say southeast to northwest or vice versa, using <br>wrf_user_intrp3d? North/south or east/west works fine, but from the <br>documentation, a diagonal seemed possible using the example below<b>, <br></b>although I can't get it working<b>? <br><br></b>Also, the plane is defined (/xstart,xend , ystart,yend/) for sure<br>rather than (/xstart,ystart , xend,yend/) instead?<b><br><br></b>thanks,<br>Matt<b><br><br></b><br><br><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<b>
a = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank"><strong>addfile</strong></a></b>("wrfout_d01_2000-01-24_12:00:<a href="http://00.nc" target="_blank">00.nc</a>","r")
time = 1
tc = <a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml" target="_blank"><strong>wrf_user_getvar</strong></a>(a,"tc",time) ; T [C]
z = <a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml" target="_blank"><strong>wrf_user_getvar</strong></a>(a,"z",time) ; z on mass points
plane = (/ 40,81 , 259,81 /) ; approx. START x;y and END x;y point
; Extract cross section from point A to point B, as defined in "plane"
; And vertically interpolate to height coordinates ("z")
tc_plane = <strong>wrf_user_intrp3d</strong>(tc,z,"v",plane,0.,True)</pre>
</div>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>