[ncl-talk] Segmentation fault when writing to ascii text file

Rick Brownrigg brownrig at ucar.edu
Wed May 18 09:24:51 MDT 2016


Hi Andrew,

Is the format statement correct for the values being written? In particular:

   alist   =
[/dates_array(i),sum_all_reg(i),sum_sat_reg(i,0),sum_sat_reg(i,1),sum_sat_reg(i,2),sum_sat_reg(i,3),sum_sat_reg(i,4),sum_sat_reg(i,5),sum_sat_reg(i,6),sum_sat_reg(i,7),sum_sat_reg(i,8),sum_sat_reg(i,9),sum_sat_reg(i,10),sum_sat_reg(i,11),sum_sat_reg(i,12),sum_sat_reg(i,13),sum_sat_reg(i,14),sum_sat_reg(i,15),sum_sat_reg(i,16),sum_sat_reg(i,17),sum_sat_reg(i,18),sum_sat_reg(i,19),sum_sat_reg(i,20),sum_sat_reg(i,21)/]
   write_table(output_text_file, "a", alist,"%13s %13i %13i %13i %13i %13i
%13i %13i %13i %13i %13i %13i %13i %13i %13i %13s %13i %13i %13i %13i %13i
%13i %13i %13i")

Should that be %13i?

Otherwise kind of hard to say -- how mucn trouble is it to provide some
data to track this down?

HTH...
Rick



On Wed, May 18, 2016 at 9:06 AM, Andrew Kren - NOAA Affiliate <
andrew.kren at noaa.gov> wrote:

> Hi,
>
> I am getting a segmentation fault when writing data to a text file. It
> worked earlier when I had less satellite statistics to write. But when I
> added more, I started getting this segmentation fault. It appears to happen
> on the first text file, right after it writes the table header. I am not
> sure how to fix this. I've tried several exit commands and not sure how to
> rectify the error. The code is attached.
>
> Thanks,
>
> --
> Andrew Kren, PhD
> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
> NOAA ESRL Global Systems Division (Rm 3C515)
> 325 Broadway, Boulder, CO 80305
> (303) 497-5418
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160518/614899db/attachment.html 


More information about the ncl-talk mailing list