[ncl-talk] Segmentation fault (core dumped)

Ajay Bankar ajaybankar123 at gmail.com
Tue Apr 2 01:11:26 MDT 2019


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*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190402/bdff34be/attachment.html>


More information about the ncl-talk mailing list