[ncl-talk] Segmentation Fault with vinth2p Function

Meina Wang mnawang at ucdavis.edu
Wed Aug 2 14:20:59 MDT 2017


Dear Mary,

Thank you very much for your kind reply.  I've found the reason why the
function crashed with segfault - because there were errors in the data.
Now I've fixed the data and the function worked with no problem.  Thank you
very much again.

Best,
Meina

On Mon, Jul 31, 2017 at 12:29 PM, Mary Haley <haley at ucar.edu> wrote:

> Hi Meina,
>
> Can you provide us with the script and data so we can run it here and see
> what's going on?  You can use our anonymous ftp, if the data file is not
> too huge:
>
> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
>
> Thanks,
>
> --Mary
>
>
> On Fri, Jul 28, 2017 at 12:34 AM, Meina Wang <mnawang at ucdavis.edu> wrote:
>
>> 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
>> <https://github.com/yyr/ncl/blob/master/ni/src/lib/nfpfort/vinth2p_nodes_dp.f>,
>> 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,
>> Meina
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>


-- 
Meina Wang
PhD candidate in Atmospheric Science
Department of Land, Air and Water Resources
University of California, Davis
Davis, CA 95616
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170802/2191a0f6/attachment.html 


More information about the ncl-talk mailing list