<div dir="ltr">OK thanks everyone! that was very helpful!</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 4:12 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You must download the &#39;PS&#39; associated with the U and V. Any old &#39;PS&#39; won&#39;t do!<br><br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 2:01 PM, Adam Phillips <span dir="ltr">&lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>&gt;</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>Hi Barbara,</div>To answer your PS query: PS is not normally given within the individual variable files (U, V, for instance). You will need to download the PS files separately.<div>Adam  </div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 1:51 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As noted by GusC ... the following is incorrect.<br>
<br>
TonP = vinth2p(U(:,1,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)  ?<br>
<br>
<br>
You are passing in only one vertical (hybrid) level. Interpolation<br>
requires multiple levels.<br>
<br>
For &#39;fun&#39;, try<br>
<br>
   printVarSummary(U(:1,:,:))<br>
<br>
What do you see? NCL will eliminate the &quot;degenerate dimension&quot;.<br>
Regardless, you must enter multiple levels.<br>
<br>
I will make one correction to GusC&#39;s suggestion. As a rule, if you are<br>
referring to a full array, use U rather than for assorted reasons<br>
<br>
UonP = vinth2p(U,hyam,hybm,pnew,PS,interp,P0mb,1,extrap) ; pass a<br>
reference (pointer to the variable)<br>
<br>
Note: there are numerous examples<br>
<br>
<a href="http://www.ncl.ucar.edu" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu</a><br>
<br>
Click &#39;Examples&#39;<br>
<br>
On right side, click &quot;Vertical Interpolation&quot;<br>
<br>
Good Luck<br>
<br>
On Mon, Jan 25, 2016 at 12:49 PM, Gus Correa &lt;<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>&gt; wrote:<br>
&gt; Maybe using all of U&#39;s four dimensions (level included):<br>
&gt;<br>
&gt; UonP = vinth2p(U(:,:,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)<br>
&gt;<br>
&gt; instead of:<br>
&gt;<br>
&gt; TonP = vinth2p(U(:,1,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)  ?<br>
&gt;<br>
&gt;<br>
&gt; On 01/25/2016 02:15 PM, Barbara Wortham wrote:<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I am working to convert the elevations in U and V files from the CESM<br>
&gt;&gt; LME dataset to pressure levels. I think I should be using vinth2p and<br>
&gt;&gt; attached is the code I am using. However, it seems like the variable PS<br>
&gt;&gt; can&#39;t be called upon in these files.<br>
&gt;<br>
&gt; Why?<br>
&gt; Maybe it is in another file?<br>
&gt; Or is it called &quot;ps&quot; instead of &quot;PS&quot;?<br>
&gt;<br>
&gt;&gt; I was wondering if you had a<br>
&gt;&gt; suggestion for a surface pressure that is anchored in space that I could<br>
&gt;&gt; use for the conversion?<br>
&gt;&gt;<br>
&gt;&gt; Thanks, barbara<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Barbara E. Wortham<br>
&gt;&gt; Graduate Student<br>
&gt;&gt; Boston College<br>
&gt;&gt; Department of Earth and Environmental Science<br>
&gt;&gt; Devlin 311<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; ncl-talk mailing list<br>
&gt;&gt; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
&gt;&gt; List instructions, subscriber options, unsubscribe:<br>
&gt;&gt; <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; ncl-talk mailing list<br>
&gt; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
&gt; List instructions, subscriber options, unsubscribe:<br>
&gt; <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>
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><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Barbara E. Wortham<div>Graduate Student</div><div>Boston College</div><div>Department of Earth and Environmental Science</div><div>Devlin 311</div></div></div>
</div>