[ncl-talk] Sub: Station data.
Adv
advita6 at gmail.com
Mon Mar 23 20:54:15 MDT 2015
Hi Ncl users,
This is how my code look like. I would like to extract data corresponding
to station name and plot spatially only over North Dakota region. Could
some one help me to accomplish this by extracting the data for different
variables. I have attached the input csv file with this mail. I have many
csv files like this. I just wanna loop in such a way all data can be
processed at once.
Thanks,
Adv
begin
flnm = "479615.csv"
strs = asciiread(flnm,-1,"string")
;print(strs)
split_lines = str_split_csv(strs,",",2)
nlines = dimsizes(split_lines(:,0))
nfields = dimsizes(split_lines(0,:))
header = split_lines(0,:)
do n=0,nlines-1
tf = isStrSubset(strs(n), "CROSBY ND US")
if (tf) then
field=(strs(n))
do nf=0,nfields-1
print(header(nf) + " : " + str_join(split_lines(n,nf),", "))
end do
end if
end do
return
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150323/c0dd3928/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 479615.csv
Type: text/csv
Size: 1067930 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150323/c0dd3928/attachment-0001.bin
More information about the ncl-talk
mailing list