[ncl-talk] Plot csv file

Dennis Shea shea at ucar.edu
Thu Dec 3 12:49:30 MST 2020


Hi Anahita

This is *temporarily *offline.

This looks like grid point data that was written to a CSV (ascii/text) file.
Do you know the sizes (nlat,mlon) of the array?

Also, it looks to me like the lat/lon locations should  have been written
as double precision.
Successive points are separated by numbers on the order of e-6.


ncol = 5
ana  = readAsciiTable("Book4.csv", ncol, "double", 1)
lon1 = ana(:,0)
lat1 = ana(:,1)
no   = ana(:,2)
no2  = ana(:,3)
bc   = ana(:,4)

N    = dimsizes(lon1)   ; # of points
print("N="+N)
print("-----")
printMinMax(lon1,0)
printMinMax(lat1,0)
print("-----")


no at long_name = "NO"
no at units     = "?"
no2 at long_name= "NO2"
no2 at units    = "?"
bc at long_name = "BC"
bc at units     = "?"

printMinMax(no ,0)
printMinMax(no2,0)
printMinMax(bc ,0)
print("=====")
print((lon1(1:)-lon1(:N-2))+"     "+(lat1(1:)-lat1(:N-2)))  ; differences
print("-----")

On Thu, Dec 3, 2020 at 11:22 AM Anahita Amiri Farahani via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hello all,
>
> I tried to read and plot the csv data, but I faced some errors. I've
> attached both data and the code.
>
> Thank you,
> ana
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201203/54310542/attachment.html>


More information about the ncl-talk mailing list