[ncl-talk] vinth2p help

Dennis Shea shea at ucar.edu
Mon Jan 25 13:51:48 MST 2016


As noted by GusC ... the following is incorrect.

TonP = vinth2p(U(:,1,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)  ?


You are passing in only one vertical (hybrid) level. Interpolation
requires multiple levels.

For 'fun', try

   printVarSummary(U(:1,:,:))

What do you see? NCL will eliminate the "degenerate dimension".
Regardless, you must enter multiple levels.

I will make one correction to GusC's suggestion. As a rule, if you are
referring to a full array, use U rather than for assorted reasons

UonP = vinth2p(U,hyam,hybm,pnew,PS,interp,P0mb,1,extrap) ; pass a
reference (pointer to the variable)

Note: there are numerous examples

http://www.ncl.ucar.edu

Click 'Examples'

On right side, click "Vertical Interpolation"

Good Luck

On Mon, Jan 25, 2016 at 12:49 PM, Gus Correa <gus at ldeo.columbia.edu> wrote:
> Maybe using all of U's four dimensions (level included):
>
> UonP = vinth2p(U(:,:,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)
>
> instead of:
>
> TonP = vinth2p(U(:,1,:,:),hyam,hybm,pnew,PS,interp,P0mb,1,extrap)  ?
>
>
> On 01/25/2016 02:15 PM, Barbara Wortham wrote:
>> Hello,
>>
>> I am working to convert the elevations in U and V files from the CESM
>> LME dataset to pressure levels. I think I should be using vinth2p and
>> attached is the code I am using. However, it seems like the variable PS
>> can't be called upon in these files.
>
> Why?
> Maybe it is in another file?
> Or is it called "ps" instead of "PS"?
>
>> I was wondering if you had a
>> suggestion for a surface pressure that is anchored in space that I could
>> use for the conversion?
>>
>> Thanks, barbara
>>
>> --
>> Barbara E. Wortham
>> Graduate Student
>> Boston College
>> Department of Earth and Environmental Science
>> Devlin 311
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list