<div dir="ltr">Your "loc" argument is incorrect (4th argument). This variable can only contain up to 4 values if doing a vertical cross section, but in your case you are doing horizontal interpolation, so this variable should just be a single scalar. That argument should be the value 2.0. If I'm reading your example correctly, it looks to me like you're trying to get the pressure values at 2m AGL. To do this, you would want to subtract the terrain from your z values to get z in AGL. Then, use that variable as your vertical coordinate argument.<div><br></div><div>For example, </div><div><br></div><div>z_agl = z - Zter </div><div><br></div><div>pat2m = wrf_user_interp3d(p, z_agl, "h", 2.0, 0, False)</div><div><br></div><div>However, WRF already contains the surface pressure variable "PSFC", so you can just use that if you are trying to get the surface pressure. </div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 13, 2016 at 1:25 AM, Krishna C <span dir="ltr"><<a href="mailto:chandrakrishna.90@gmail.com" target="_blank">chandrakrishna.90@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"><div><div>Hi all,<br><br></div>Following script i used to get pressure at 2m height from wrf out file<br></div>Its throwing some error . <br><br><b>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br>begin<br> <br>a = addfile("<a href="http://input.nc" target="_blank">input.nc</a>","r")<br><br>Zter = wrf_user_getvar(a,"ter" , 0) ;m Terrain Height<br><br>time = 0<br>p = wrf_user_getvar(a,"pressure",time) <br>z = wrf_user_getvar(a,"z",time) <br><br>height = Zter + 2.0 ; 2m height <br><br>pat2m = wrf_user_intrp3d(p,z,"h",height,0.,False)<br><br>end<br></b><br>Error message:<br> Copyright (C) 1995-2014 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.2.1<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>fatal:_NclBuildArray: each element of a literal array must have the same dimension sizes, at least one item doesn't<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 235 in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl<br><br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 17 in file p2m.ncl<br><br><br clear="all"><div><div><div><div><div><div dir="ltr"><div style="text-align:left"><font size="2"><span style="font-family:times new roman,serif"><font size="2">R</font>egards<span class="HOEnZb"><font color="#888888"><br></font></span></span></font></div><span class="HOEnZb"><font color="#888888"><div style="text-align:left"><font face="verdana,sans-serif"><font size="2"><span style="font-family:times new roman,serif">-Krishna-</span></font></font><br></div></font></span></div></div></div>
</div></div></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>