<p dir="ltr">I didn&#39;t account for your time dimension. I don&#39;t see a wrf_interp function that will interp across those two dimensions (time|level).  You could create an output array of ntime x noutlevel and loop over times. </p>
<p dir="ltr">These lines are example and not intended to work without editing. </p>
<p dir="ltr">rhp= new( (/ntimes, 3/), float)</p>
<p dir="ltr">do t=0,ntimes-1<br>
rhp(t,:) = wrf_interp_1d(rh(t,:,60,41), p(t,:,60,41), (/500,850,1000/)) <br>
end do</p>
<p dir="ltr">The error line tells you about the number of dimensions and the specific problem. </p>
<p dir="ltr">P.s. always reply to ncl-talk, this allows everyone to help and not burden a specific person. </p>
<div class="gmail_quote">On 13 Oct 2014 16:43, &quot;Saurabh Singh&quot; &lt;<a href="mailto:saurabhsingh123op@gmail.com">saurabhsingh123op@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 14, 2014 at 2:44 AM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">(/500,850,1000/) )</blockquote></div><br>hey Alan</div><div class="gmail_extra"><br></div><div class="gmail_extra">i tried this script </div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div class="gmail_extra">    load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;</div><div class="gmail_extra"><br></div><div class="gmail_extra">   files = systemfunc(&quot;ls -1 /home/cee1/Music/Build_WRF_and_WPS.V351/WRF_and_WPS_src/WRFV3/test/em_real/2k1/wrfout_d01_2001-01-01*&quot;) + &quot;.nc&quot;</div><div class="gmail_extra">   a = addfiles(files,&quot;r&quot;)</div><div class="gmail_extra">;extraction of variables</div><div class="gmail_extra">   time = -1</div><div class="gmail_extra">rh = wrf_user_getvar(a,&quot;rh&quot;,time)</div><div class="gmail_extra">p  = wrf_user_getvar(a,&quot;pressure&quot;,time) </div><div class="gmail_extra">rhp = wrf_interp_1d(rh(:,60,41), p(:,60,41), (/500,850,1000/)) </div><div class="gmail_extra">asciiwrite(&quot;rh0.txt&quot;,rhp)</div><div class="gmail_extra"><br></div><div class="gmail_extra">it dosent works give an error :</div><div class="gmail_extra"><div class="gmail_extra">fatal:Number of subscripts do not match number of dimensions of variable,(3) Subscripts used, (4) Subscripts expected</div><div class="gmail_extra">fatal:[&quot;Execute.c&quot;:7743]:Execute: Error occurred at or near line 10 in file chota.ncl</div><div class="gmail_extra"><br></div><div class="gmail_extra">fatal:Variable (rhp) is undefined</div><div class="gmail_extra">fatal:[&quot;Execute.c&quot;:7743]:Execute: Error occurred at or near line 11 in file chota.ncl</div><div><br></div></div><div class="gmail_extra"><br></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><font style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span>With regards</span><span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span> </span></font><br style="color:rgb(51,204,0)"><br><font style="color:rgb(102,102,102)" size="1"> <b><i><span style="font-family:Webdings" lang="EN-GB">P</span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB"> : </span></i></b><b><i><span style="font-family:Arial,sans-serif" lang="EN-GB"> </span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div>
</div></div>
</blockquote></div>