Dear NCL help,
The below is an NCL script, which read in data in three columns (lon lat values). The data covers an irregular area (e.g. political area) but the data is at regular grids (e.g. all in 0.5/0.5 degree).
I want the exact 'raster' plot without any interpolation to the no-data area. Can one kindly supply any help?
Thanks very much in advance!
Mark
----------------NCL script---------------
begin
fname = "vec.dat"
lines = asciiread(fname,-1,"string")
lon = stringtofloat(str_get_field(lines(1:),1," "))
lat = stringtofloat(str_get_field(lines(1:),2," "))
pwv = stringtofloat(str_get_field(lines(1:),3," "))
delete(lines)
wks = gsn_open_wks("x11","station")
gsn_define_colormap(wks,"gui_default")
res = True
res@cnFillOn = True
res@gsnSpreadColors = True
res@lbLabelBarOn = True
res@cnLinesOn = False
res@cnLineLabelsOn = False
res@lbLabelAutoStride = True
res@cnFillMode = "RasterFill"
res@sfXArray = lon
res@sfYArray = lat
res@mpMinLatF = min(lat)-1
res@mpMinLonF = min(lon)-1
res@mpMaxLatF = max(lat)+1
res@mpMaxLonF = max(lon)+1
map = gsn_csm_contour_map(wks,pwv,res)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 24 04:18:20 2012
This archive was generated by hypermail 2.1.8 : Fri May 25 2012 - 08:35:50 MDT