[ncl-talk] sf[XY]CellBounds

G.Monte at isac.cnr.it G.Monte at isac.cnr.it
Thu Sep 26 02:15:01 MDT 2019


Dears all,
I have to plot a scalar field (rain rate) on a contouring map, which is
arranged this way in an ascii file: lat-lon-rain rate.
If I set cnFillMode as "CellFill", the ncl script does not work since I
had to set sf[XY]CellBounds first; unfortunately, I still don't understand
very well how to fill these arrays (probably, I get wrong with the
dimensions to assign them). At the moment, I overcame this inconvenience
by setting cnFillMode as "RasterFill" and cnRasterCellSizeF = 0.0015, but
I think that it should not be the proper way and sf[XY]CellBounds would be
much better for plotting data. I attach the main code lines in the ncl
script:

;---read longitude
lat = dataf(:,2)

;---read latitude
lon = dataf(:,3)

;---read data
rr = dataf(:,4)

res at mpLimitMode         = "LatLon"
res at mpMinLonF           = 0
res at mpMaxLonF           = 30
res at mpMinLatF           = 35
res at mpMaxLatF           = 50

res at sfXArray            = lon
res at sfYArray            = lat

res at pmTickMarkDisplayMode = "Always"

res at cnFillOn                   = True
res at cnLinesOn                  = False
;res at cnRasterSmoothingOn        = True
res at cnRasterCellSizeF          = 0.0015
res at cnFillMode                 = "RasterFill"

Can you provide me with some examples of a correct usage of sf[XY]CellBounds?
Thank you in advance,

Giulio






More information about the ncl-talk mailing list