<div dir="ltr"><div>Hi Trisanu,</div><div><br></div>See the attached script. This uses only the WRF routines for the computations. Since I don't have your data, here is a cross section that it created for a hurricane. It uses a start point and an end point for the cross section line, rather than a pivot point and angle. Hopefully there aren't too many typos.<div><br></div><div>Regards,</div><div><br></div><div>Bill</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 24, 2018 at 7:50 AM Trisanu Banik <<a href="mailto:baniktrisanu@gmail.com">baniktrisanu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Sir</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for your feedback. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">The problem is still persisting in a different manner. I have attached three plots for your convenience. The plot REFL_10CM.000002.jpg is vertical cross section of Reflectivity and model level (36) is in Y axis. I just wish to plot same reflectivity keeping height in Y axis instead of model level. I have utilized two function 1st "int2p_n_Wrap" and plotted cross sectional plot attached in the email as a name of cross.000001.jpg using plot function "gsn_csm_contour". Secondly I have utilized "wrf_user_intrp3d" and plotted cross.jpg utilizing the same plot function. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">But interpolated plot does not resemble with the REFL_10CM. cross.jpg represents reflectivity well but it provide the grid info in X and Y axis which is undesirable for me. As the function "wrf_user_intrp3d" generates two dimensional variable with vertical and horizontal grid info in two axis. Please guide how generate plot like REFL_10CM.000002.jpg with height in Y axis. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Regards</div><div class="gmail_default" style="font-family:verdana,sans-serif">Trisanu</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div><div dir="ltr" class="m_-4328119519690680001gmail_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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="text-align:center"><div style="text-align:left"><b><font face="verdana, sans-serif">Trisanu Banik,PhD</font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Research Scientist<br></font></b></div><div>
</div><div style="text-align:left"><b><font face="verdana, sans-serif">North Eastern Space Applications Centre (NESAC)<br></font></b></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Government of India</span></b><br></font></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Department of Space</span></b><b style="font-size:12.8px"><span style="font-size:12.8px"><br></span></b></font></div><div style="text-align:left"><b><font face="verdana, sans-serif"><span style="font-size:12.8px">Umiam-793103, Meghalaya</span><br></font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Mobile-9774837581</font></b></div><div style="text-align:left"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 20, 2018 at 2:02 AM Bill Ladwig <<a href="mailto:ladwig@ucar.edu" target="_blank">ladwig@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Is there a reason why you can't use the cross section capability of wrf_user_intrp3d? See Example 1 here:<div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml</a><br></div><div><br></div><div>If you need specific height levels, rather than the 1% increments the routine does by default, I can show you how to accomplish that (see code below, or do a search, since I've guided others through this in the past). </div><div><br></div><div>Also, WRF uses PH + PHB to get the geopotential, not ZNW, so to get the height at each grid point, you do (PH + PHB) / 9.81 (or just use wrf_user_getvar with 'z' as the product type). (If you don't have both of those variables in your WRF file, you're going to be in trouble). Also, the right two dimensions in a WRF file aren't lat and lon, they're south_north, and west_east, which is a bit of a misnomer since it's really used for "bottom to top" and "left to right" for a grid. WRF uses curvilinear coordinates, so the latitude and longitude values require two dimensions to determine them (this is why XLAT and XLONG are two dimensions).</div><div><br></div><div>For reference, the code that computes the cross section in wrf_user_intrp3d is here (removed the horizontal interpolation stuff):</div><div><br></div><div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration-line:underline">undef</span>("wrf_user_intrp3d")<br>function wrf_user_intrp3d( var3d:numeric, z_in:numeric, \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>plot_type:string, \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>loc_param:numeric, angle:numeric, opts:logical )<br>; var3d<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>- 3d field to interpolate (all input fields must be <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration-line:underline">unstaggered</span>)<br>; z_in <span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>- interpolate to this field (either p/z)<br>; plot_type<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>- interpolate horizontally "h", or vertically "v"<br>; loc_param<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>- level(s) for horizontal plots (<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration-line:underline">eg</span>. 500hPa ; 3000m - scalar),<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>plane for vertical plots (2 values representing an <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration-line:underline">xy</span> point<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>on the model domain through which the vertical plane will pass<br>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>OR 4 values specifying start and end values<br>; angle<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>- 0.0 for horizontal plots, and<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>an angle for vertical plots - 90 represent a WE cross section<br>; opts <span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>Used IF opts is TRUE, else use loc_param and angle to determine <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration-line:underline">crosssection</span><br>begin<br><br>if(plot_type .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">eq</span>. "v" ) then <span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>vertical cross section needed<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>dims = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dimsizes</span>(var3d)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nd</span> = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dimsizes</span>(dims)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>dimX = dims(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nd</span>-1)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>dimY = dims(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nd</span>-2)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>dimZ = dims(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nd</span>-3)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nd</span> .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">eq</span>. 4 ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( z_in(0,dimZ-1,0,0) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">lt</span>. z_in(0,dimZ-2,0,0) ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; We must be interpolating to pressure<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; This routine needs input field and level in hPa - lets make sure of this<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( max(z_in) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">gt</span>. 2000. ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; looks like we have Pa as input - make this hPa<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_in = z_in * 0.01<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z = z_in(0,:,:,:)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>else<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( z_in(dimZ-1,0,0) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">lt</span>. z_in(dimZ-2,0,0) ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; We must be interpolating to pressure<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; This routine needs input field and level in hPa - lets make sure of this<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( z_in(0,0,0) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">gt</span>. 2000. ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; looks like we have Pa as input - make this hPa<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_in = z_in * 0.01<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z = z_in<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span>; set vertical cross section<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if (opts) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span> = wrf_user_set_xy( z, loc_param(0), loc_param(1), \<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; assumes 0-based indexing in v6.5.0<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>loc_param(2), loc_param(3), \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>angle, opts )<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>else<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span> = wrf_user_set_xy( z, loc_param(0), loc_param(1), \ ;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>0.0, 0.0, angle, opts )<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span> = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dimsizes</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span>; first we <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">interp</span> z<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2dz <span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>= wrf_interp_2d_xy( z, <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>)<br>;<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">interp</span> to constant z grid<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if(var2dz(0,0) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">gt</span>. var2dz(1,0) ) then<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; monotonically decreasing coordinate<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_max = floor(max(z)/10)*10 <span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; bottom value<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_min = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">ceil</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">min</span>(z)/10)*10<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>; top value<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz</span> = 10<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span> = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>( (z_max-z_min)/<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz</span>)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_var2d = new( (/<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span>/), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">typeof</span>(z))<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_var2d(0) = z_max<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz</span> = -<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz<br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>else<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_max = max(z)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_min = 0.<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz</span> = 0.01 * z_max<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span> = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>( z_max/<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz</span> )<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_var2d = new( (/<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span>/), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">typeof</span>(z))<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_var2d(0) = z_min<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>do i=1, <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span>-1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>z_var2d(i) = z_var2d(0)+i*<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dz<br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end do<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span><br>; <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">interp</span> the variable<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if ( <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">dimsizes</span>(dims) .<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">eq</span>. 4 ) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d = new( (/dims(0), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span>, <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)/), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">typeof</span>(var2dz))<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>do it = 0,dims(0)-1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2dtmp = wrf_interp_2d_xy( var3d(it,:,:,:), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>do i=0,<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)-1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d(it,:,i) = wrf_interp_1d( var2dtmp(:,i), var2dz(:,i), z_var2d)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end do<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end do<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d!0 = var3d!0<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d!1 = "Vertical"<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d!2 = "Horizontal"<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>else<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d = new( (/<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">nlevels</span>, <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)/), <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">typeof</span>(var2dz))<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2dtmp = wrf_interp_2d_xy( var3d, <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>do i=0,<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)-1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d(:,i) = wrf_interp_1d( var2dtmp(:,i), var2dz(:,i), z_var2d)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end do<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d!0 = "Vertical"<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d!1 = "Horizontal"<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><br><br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>st_x = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>(0,0)) ; + 1 (removed 1-based indexing in 6.5.0)<span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> <br></span><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>st_y = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>(0,1)) ; + 1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>ed_x = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)-1,0)) ; + 1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>ed_y = <span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">tointeger</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xy</span>(<span class="m_-4328119519690680001m_2981543131131305740gmail-s1" style="text-decoration:underline">xp</span>(0)-1,1)) ; + 1<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>if (opts) then<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d@Orientation = "Cross-Section: (" + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>st_x + "," + st_y + ") to (" + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>ed_x + "," + ed_y + ")"<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>else<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>var2d@Orientation = "Cross-Section: (" + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>st_x + "," + st_y + ") to (" + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>ed_x + "," + ed_y + ") ; center=(" + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>loc_param(0) + "," + loc_param(1) + \<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>") ; angle=" + angle<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>return(var2d)<br><span class="m_-4328119519690680001m_2981543131131305740gmail-Apple-converted-space"> </span>end if<br><br><br>end</blockquote>
<p class="m_-4328119519690680001m_2981543131131305740gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Monaco">
</p><p class="m_-4328119519690680001m_2981543131131305740gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Monaco"><br></p>If you want to set your own levels, set z_var2d to the levels you want and comment out the section of code that computes the 1% increments. You'll want to rename this function and copy this code in to your script to use it.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 19, 2018 at 7:44 AM Trisanu Banik <<a href="mailto:baniktrisanu@gmail.com" target="_blank">baniktrisanu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I am still struggling with the plot of vertical cross section of reflectivity with respect to height and various lat keeping long constant and vice versa. </div><div class="gmail_default" style="font-family:verdana,sans-serif">During the search of cross sectional plots in web, I got few functions that might be helpful for generating vertical cross sectional plot with respect to height.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">But my data has four dimensions time, eta level, lat, long. If I consider the values for particular time it will become 3D i.e. level, lat, long. Now to convert eta level to pressure I have utilized "q_isobaric = int2p_n_Wrap(P_HYD,REFL_10CM,level,linlog,0) " this. Presently I am able to plot reflectivity w..r.t pressure for various lat long. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Now the challenge is to convert vertical level to height. Various inbuilt functions are there in NCL that convert pressure to height like "<span style="color:rgb(0,0,0);font-family:courier;font-size:13.3333px">wrf_user_vert_interp" and gsn_csm_pres_hgt </span>etc. But my data dimension does not satisfy the functions requirement. In wrf_out file, the necessary variables related to this are, one dimentional vertical eta level (ZNW), Hydrostatic Pressure level (P_HYD) and reflectivity (REFL_10CM). No height related 3D parameter is available in the wrf_out file. Only terrain height is available which is 2D. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">For your convenience, I have attached my tentative code. Please guide me to plot the vertical cross section of reflectivity with Height in Y axis for various lat long. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks & Regards</div><div class="gmail_default" style="font-family:verdana,sans-serif">Trisanu</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"> </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div><div dir="ltr" class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703gmail-m_-5088528713878436161gmail_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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="text-align:center"><div style="text-align:left"><b><font face="verdana, sans-serif">Trisanu Banik,PhD</font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Research Scientist<br></font></b></div><div>
</div><div style="text-align:left"><b><font face="verdana, sans-serif">North Eastern Space Applications Centre (NESAC)<br></font></b></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Government of India</span></b><br></font></div><div style="text-align:left"><font face="verdana, sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Department of Space</span></b><b style="font-size:12.8px"><span style="font-size:12.8px"><br></span></b></font></div><div style="text-align:left"><b><font face="verdana, sans-serif"><span style="font-size:12.8px">Umiam-793103, Meghalaya</span><br></font></b></div><div style="text-align:left"><b><font face="verdana, sans-serif">Mobile-9774837581</font></b></div><div style="text-align:left"><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 7:58 PM Jim Means <<a href="mailto:jim@weatherextreme.com" target="_blank">jim@weatherextreme.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>In addition to Soma's suggestion, you might also look at the
cross section plot examples here:</p>
<p><a class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681moz-txt-link-freetext" href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm" target="_blank">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/NCL_examples.htm</a><br>
</p>
<br>
<div class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681moz-cite-prefix">On 9/13/2018 7:09 AM, Soma Roy wrote:<br>
</div>
<blockquote type="cite">
<div dir="auto">See the different examples at the below link: <a href="https://www.ncl.ucar.edu/Applications/height_long.shtml" target="_blank">https://www.ncl.ucar.edu/Applications/height_long.shtml</a>
<div dir="auto"><br>
</div>
<div dir="auto">Best,</div>
<div dir="auto">Soma</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Sep 13, 2018, 19:10 Trisanu Banik <<a href="mailto:baniktrisanu@gmail.com" target="_blank">baniktrisanu@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif">Hi,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif">I need help to plot
a vertical cross section plot of WRF REFL_10CM
(Reflectivity). The parameter is four dimensional (Time,
eta level, lat, lon). I tried to plot the vertical cross
section of reflectivity with respect to height for a
particular time. But the REFL_10CM parameter contain only
eta level. Therefore whenever I generated plot, it always
provide vertical cross section w.r.t eta level only. i
need suggestion how I can convert eta level to pressure
level/Height level. So that, I can plot a vertical cross
section of WRF reflectivity for various longitude
corresponding to a single latitude. Here I have added a
sample plot. I need to plot vertical cross section w.r.t
height (not w.r.t eta level) </div>
<div class="gmail_default" style="font-family:verdana,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif">Please help me to
resolve the issue. </div>
<div class="gmail_default" style="font-family:verdana,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif"><br>
</div>
<div>
<div dir="ltr" class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681m_3858156200551823969gmail_signature" data-smartmail="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 dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div style="text-align:center">
<div style="text-align:left"><b><font face="verdana,
sans-serif">Trisanu
Banik,PhD</font></b></div>
<div style="text-align:left"><b><font face="verdana,
sans-serif">Research
Scientist<br>
</font></b></div>
<div>
</div>
<div style="text-align:left"><b><font face="verdana,
sans-serif">North
Eastern Space
Applications
Centre (NESAC)<br>
</font></b></div>
<div style="text-align:left"><font face="verdana,
sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Government of
India</span></b><br>
</font></div>
<div style="text-align:left"><font face="verdana,
sans-serif"><b style="font-size:12.8px"><span style="font-size:12.8px">Department of
Space</span></b><b style="font-size:12.8px"><span style="font-size:12.8px"><br>
</span></b></font></div>
<div style="text-align:left"><b><font face="verdana,
sans-serif"><span style="font-size:12.8px">Umiam-793103, Meghalaya</span><br>
</font></b></div>
<div style="text-align:left"><b><font face="verdana,
sans-serif">Mobile-9774837581</font></b></div>
<div style="text-align:left"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" rel="noreferrer" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote>
</div>
<br>
<fieldset class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
ncl-talk mailing list
<a class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br>
<div class="m_-4328119519690680001m_2981543131131305740m_4952527620732369703m_-5088528713878436161m_-2347723574764200681moz-signature">-- <br>
<p style="text-decoration:none;color:#000000;font-size:13px;font-family:'Roboto',sans-serif;font-weight:700!important">James
D. Means, Ph.D.<br>
<span style="font-size:10px;font-family:'Roboto',sans-serif">Senior
Atmospheric & Climate Scientist</span><br>
<span style="text-decoration:none;font-size:10px">California
Office</span><br>
<span style="text-decoration:none;font-size:10px">Tele:
619-495-1638 | Fax: 775-636-8430</span><br>
<span style="text-decoration:none;font-size:10px">930 Tahoe
Blvd., Suite 802-560<span style="text-decoration:none"><br>
<span style="text-decoration:none;font-size:10px"> Incline
Village, Nevada 89451</span><br>
<span style="text-decoration:none;color:red"><a style="color:red;font-size:10px" href="mailto:jim@weatherextreme.com" target="_blank">jim@weatherextreme.com</a>
| <a style="color:red;font-size:10px" href="http://www.weatherextreme.com/vcards/James%20Means.vcf" target="_blank">vcard</a></span><br>
<span style="text-decoration:none;font-size:10px"> <a style="color:#000000" href="http://www.weatherextreme.com/" target="_blank">www.<span style="color:red">w</span>eather<span style="color:red">e</span>xtreme.com</a></span></span></span></p>
<a href="http://www.weatherextreme.com/" target="_blank"><img src="http://%7E/Documents/jimsignature_files/wx-logo.jpg" alt="" height="96" width="361"></a>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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>
</blockquote></div>
</blockquote></div>
</blockquote></div>