[ncl-talk] Segmentation fault (core dumped)

Rick Brownrigg brownrig at ucar.edu
Tue Apr 2 11:35:37 MDT 2019


Do you know which line the SEGV occurs? (perhaps put some print statements
in the code to bracket the line that's causing the error).

On Tue, Apr 2, 2019 at 1:07 AM Ajay Bankar <ajaybankar123 at gmail.com> wrote:

> Hi all,
>           I'm running following ncl script to write some parameters in csv
> file. I'm using ATVOS data and trying to write out pressure level, lat,
> lon, temp in csv file. All the time I'm getting *segmentation fault (core
> dumped)* as error. I tried changing format of rtp from integer, double to
> ushort but all the time after writing data of two pressure levels I got the
> same error.
>
> Thanks for any help !
>
> fn =
> "W_XX-EUMETSAT-Darmstadt,SOUNDING+SATELLITE,NOAA19+ATOVS_C_EUMP_20170815222716_43909_eps_o_l2.nc"
> fi = addfile(fn,"r")
> printVarSummary(fi)
>
> lev = fi ->t_pressure_levels
> rtp = fi ->atmospheric_temperature
> lat = fi ->lat
> lon = fi ->lon
> csv_filename = "temp_1.csv"
> system("rm -f " + csv_filename)
>
> fields = (/"P_LEV",     "LAT",  "LON",  "RTEMP"/)
> header = [/str_join(fields,"    ")/]
>
> format = "%i%i%i%d"
>
> write_table(csv_filename, "w", header, "%s")
>
> do i = 2,39
>   do j = 0,927
>     do k = 0, 55
>         alist = [/lev(i), lat(j,k), lon(j,k), rtp(j,k,i)/]
>         write_table(csv_filename, "a", alist, format)
>     end do
>   end do
> end do
>
> --
>
> *Thanks & Regards,*
>
> *Ajay*
>
> _______________________________________________
> 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/20190402/e25cfbab/attachment.html>


More information about the ncl-talk mailing list