<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span lang="en-US"><span style="font-size:12.8px">Hi all,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm attempting to plot a cross-section with height that traverses a line of lat/lon points. The data set in is currently in pressure x lat x lon coordinates. I'm using gc_latlon to create two vectors with the lat and lon coordinates I need and then attempting to use linint2_points_Wrap to interpolate to those points. This is similar to the narr_5.ncl example on the Slices page. My issue is that linint2_points_Wrap needs both the xcoord and ycoord to be monotonically increasing while I want to plot a cross-section along a line that has latitude decreasing but longitude increasing.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">My script is below. With the current configuration, because the input latitudes are monotonically decreasing, it outputs only missing values for the result.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Can anyone help me with this? Is there a better way to go about creating the slice? Or am I missing an obvious working around in my code?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks,</div><div style="font-size:12.8px">James</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>lat1 = 12.</div><div>lat2 = 10.</div><div>lon1 = -15.</div><div>lon2 = 0.</div><div>preL = 1000.</div><div>preH = 200.</div><div><br></div><div>pathin = "/home/james/"</div><div>filein = "WRFNCLPP_V.nc"</div><div><br></div><div>npts = 30</div><div><br></div><div>;*****************************<wbr>*****************************</div><div>; Create great circle vectors of lat/lon points</div><div>;*****************************<wbr>*****************************</div><div><br></div><div>pts = gc_latlon(lat1,lon1,lat2,lon2,<wbr>npts,-2)</div><div><br></div><div>;*****************************<wbr>*****************************</div><div>; open file and read required data</div><div>;*****************************<wbr>*****************************</div><div><br></div><div>print("Opening file and reading data")</div><div>f = addfile(pathin+filein,"r")</div><div>vwnd = f->V(1,{preL:preH},{lat1:lat2}<wbr>,{lon1:lon2})</div><div><br></div><div>;*****************************<wbr>*****************************</div><div>; Interpolate to points on great circle</div><div>;*****************************<wbr>*****************************</div><div><br></div><div>vwnd_xs = linint2_points_Wrap(vwnd&lon,<wbr>vwnd&lat,vwnd, \</div><div> False,pts@gclon,pts@gclat,0)</div></div></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>