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

Rick Brownrigg brownrig at ucar.edu
Tue Oct 2 13:58:57 MDT 2018


Hi Zac,

This does indeed look like a bug -- I've traced through the code enough to
see that it *looks* like an array is getting accessed
beyond its bound, which might explain the irregular behavior of the
graphic.  I've filled a ticket -- NCL-2778.

Unfortunately, that code is extremely complex, and I can't say I'll have a
fix in the short term.  I also don't know of a work around
other than using a different cnFillMode (I know you said you really can't.)

Thanks for setting up the simplified test data. I wonder if you would mind
sending me (directly) a snapshot of what the plot looks
like with your real data?

Wish I had better news to report...
Rick

On Mon, Oct 1, 2018 at 3:25 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> Hi,
>
> I can reproduce the problem, although it hasn't been random for me --
> always like the image you sent.  I'm looking into it.
>
> Rick
>
> On Mon, Oct 1, 2018 at 1:47 PM Zac Suriano <zsuriano at unomaha.edu> wrote:
>
>> 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
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181002/d16718c6/attachment.html>


More information about the ncl-talk mailing list