[ncl-talk] The problems to use function of pot_vort_hybrid

Adam Phillips asphilli at ucar.edu
Tue Apr 10 15:49:42 MDT 2018


Hi Zhuxiao,
To access the contents of a list, you need to refer to the index position
of the list enclosed by [ ]. Thus, to get at the 2nd list in the PV array
try this:
theta = PV[1]
Adam


On Tue, Apr 10, 2018 at 3:36 PM, Zhuxiao Li - NOAA Affiliate <
zhuxiao.li at noaa.gov> wrote:

> Hi Dennis and Adam,
>
> Excuse me for the late response. My time today has been fully scheduled
> until just now, I had a try with Dennis attachment and Adam's debug
> suggestion, the good news is both the issue a) and b) has been resolved!
> For issue b) I think the code revise worked! As for issue a), after I apply
> the debug idea of Adam, I realized the it is my careless fault to get lat
> by 'lat=f[:]->lat' instead of 'lat=f[0]->lat'. so the size of the lat is
> the multiple of the real lat!  thanks very much for the very helpful guide
> from you both, I also learned how to debug on NCL code and my own code!
>
> Now here is the simple question, if I set opt=1, I got a list variable
> e.g. PV,  how to quote (or express) the variables (s, theta, pv),  I mean
> 'theta=PV(1, :, :, :, :)' ?
>
> Cheers,
> Zhuxiao
>
>
>

-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180410/029afab9/attachment.html>


More information about the ncl-talk mailing list