[ncl-talk] Cell Fill Contour Plot: Irregular Column(s)

Zac Suriano zsuriano at unomaha.edu
Mon Oct 1 13:47:34 MDT 2018


Hello,

I am attempting to create a contour map using cell fill of a 1x1 degree dataset. There are no error messages, however the output plot is irregular, with a (seemingly random) column appearing in the NW corner of the domain. Running the identical code multiple times, the column starts in the NW corner, sometimes extending south, other times extending north, and occasionally not occurring at all.

Please find a screenshot of the plot and a simplified version of the script below. I would appreciate any assistance that could be provided.

Please note, the script is simplified for ncl-talk purposes; CellFill is necessary due to missing data constraints and the nature of the particular research project. I am running version 6.5.

Thank you,

Zachary

begin

wks=gsn_open_wks("x11","figure")
res=True
res at mpDataBaseVersion="Ncarg4_1"
res at mpProjection="LambertEqualArea"
res at mpLimitMode="Corners"
res at mpLeftCornerLatF=40.
res at mpLeftCornerLonF=-95.
res at mpRightCornerLatF=52.
res at mpRightCornerLonF=-70.
res at gsnAddCyclic=False
res at mpCenterLonF=-84.
res at cnFillOn=True
res at cnFillMode="CellFill"
res at cnLinesOn=False
res at mpOutlineOn=True

res at mpOutlineBoundarySets = "National"
res at mpOutlineSpecifiers=(/"Canada : Provinces", "United States : States"/)
res at pmTickMarkDisplayMode="Always"
res at tmXTOn=False
res at tmYROn=False
res at cnCellFillEdgeColor="Grey18"
res at mpGeophysicalLineThicknessF=0.5
res at mpNationalLineThicknessF=0.5
res at mpProvincialLineThicknessF=0.5
res at mpFillOn=False
res at pmTickMarkDisplayMode="Always"

;***** to get rasterfill to work: https://www.ncl.ucar.edu/Applications/Scripts/raster_5.ncl
nlat=10
nlon=18
res at tmXBMinorOn=False
res at tmXBFormat="f"
res at tmYLFormat="f"
res at sfXArray=fspan(-93.,-75.,nlon)
res at sfYArray=fspan(41,51,nlat)
res at sfXArray := fspan(-93.,-75.,nlon+1)
res at sfYArray := fspan(41,51,nlat+1)

;******* test plot with dummy data
dummy=new((/10,18/),"float",-999)
dummy!0="lat"
dummy&lat=fspan(40.5,50.5,10)
dummy!1="lon"
dummy&lon=fspan(-92.5,-75.5,18)

dummy=3
dummy(9,:)=5
dummy(9,9)=2

plot=gsn_csm_contour_map(wks,dummy,res)

end[cid:343B0E3C-85BE-4E5C-B022-6C88395C2106 at dsc.unomaha.edu]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ae6b1c7a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-1.tiff
Type: image/tiff
Size: 286944 bytes
Desc: PastedGraphic-1.tiff
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ae6b1c7a/attachment-0001.tiff>


More information about the ncl-talk mailing list