[ncl-talk] Segmentation Fault with vinth2p Function

Meina Wang mnawang at ucdavis.edu
Fri Jul 28 00:34:18 MDT 2017

Dear NCL users,

I ran into the segmentation fault when using the vinth2p to convert CAM
hybrid levels to pressure levels.  The error message is:

 KP.GT.KLEVI IN P2HBD.  KP,KLEVI=    31   30

Segmentation fault

I found the source code from online
but didn't quite understand why the function gave me this error message.
Since I called this function in a time loop, the number of vertical levels
(30 levels) for all the time steps are the same, still it crashed
mid-way through the time loop.

​Here are the code where I called this function to interpolate the
geopotential height to 700hPa from hybrid coordinate:

interp = 1

extrap = False

pnew = (/700./)
HGTp = vinth2p(HGT,hyam,hybm,pnew,PS,interp,P0mb,1,extrap)​

Any thoughts on this is much appreciated since I've never ran into this
problem before.  Thank you.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170727/349282a9/attachment.html 

More information about the ncl-talk mailing list