<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"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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">You must download the 'PS' associated with the U and V. Any old 'PS' won'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"><<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</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>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"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></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 'fun', try<br>
<br>
printVarSummary(U(:1,:,:))<br>
<br>
What do you see? NCL will eliminate the "degenerate dimension".<br>
Regardless, you must enter multiple levels.<br>
<br>
I will make one correction to GusC'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 'Examples'<br>
<br>
On right side, click "Vertical Interpolation"<br>
<br>
Good Luck<br>
<br>
On Mon, Jan 25, 2016 at 12:49 PM, Gus Correa <<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>> wrote:<br>
> Maybe using all of U's four dimensions (level included):<br>
><br>
> UonP = vinth2p(U(:,:,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)<br>
><br>
> instead of:<br>
><br>
> TonP = vinth2p(U(:,1,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap) ?<br>
><br>
><br>
> On 01/25/2016 02:15 PM, Barbara Wortham wrote:<br>
>> Hello,<br>
>><br>
>> I am working to convert the elevations in U and V files from the CESM<br>
>> LME dataset to pressure levels. I think I should be using vinth2p and<br>
>> attached is the code I am using. However, it seems like the variable PS<br>
>> can't be called upon in these files.<br>
><br>
> Why?<br>
> Maybe it is in another file?<br>
> Or is it called "ps" instead of "PS"?<br>
><br>
>> I was wondering if you had a<br>
>> suggestion for a surface pressure that is anchored in space that I could<br>
>> use for the conversion?<br>
>><br>
>> Thanks, barbara<br>
>><br>
>> --<br>
>> Barbara E. Wortham<br>
>> Graduate Student<br>
>> Boston College<br>
>> Department of Earth and Environmental Science<br>
>> Devlin 311<br>
>><br>
>><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>
>><br>
><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>
_______________________________________________<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>