[ncl-talk] Missing color fill with fixed contour levels

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Thu Dec 31 13:37:23 MST 2015


Dave B,

Thanks for the explanation.  It is good to know a fix is in the works.
Some time if you have a chance to fix the remaining AreaFill issue, it
would be good because my team makes lots of regional plots where the
viewport is smaller than that data grid.

--Dave A.


On Thu, Dec 31, 2015 at 10:19 AM, David Brown <dbrown at ucar.edu> wrote:

> There was a check-in on 2015-06-24 that addressed this problem with
> this explanatory text:
>
> r16255 | dbrown | 2015-06-24 17:02:16 -0600 (Wed, 24 Jun 2015) | 8 lines
>
> NCL-2236: partial fix for constant fill with AreaFill mode set
>
> This works a bit better than the original hack but it is not yet
> totally reliable.
> It may not work when the data field is bigger than the area displayed
> within the
> viewport (i.e. over a map when the view is limited using map limits
> rather than by
> sub-setting the data).
>
> ======
>
> Note that the AreaFill method was not originally designed to work when
> there are no isolines within the visible area of the plot. The fix can
> still theoretically fail but it should be much better than the
> previous situation.
>  -dave
>
>
> On Thu, Dec 31, 2015 at 9:51 AM, Rick Brownrigg <brownrig at ucar.edu> wrote:
> > Hi Dave,
> >
> > I get the same blank map running your script using 6.3.0 on yellowstone.
> > However, running your script unmodified using a current development
> snapshot
> > of the code, I get a correctly filled, mono-colored map (attached).  So
> the
> > issue appears to have cropped up before and has been fixed -- I don't
> know
> > the details.
> >
> > Do you need a binary of the development branch -- its usually quite
> stable?
> >
> > Rick
> >
> >
> > On Wed, Dec 30, 2015 at 6:25 PM, Dave Allured - NOAA Affiliate
> > <dave.allured at noaa.gov> wrote:
> >>
> >> NCL team,
> >>
> >> I am making ordinary color filled contour maps of gridded data, with
> fixed
> >> contour levels.  When all data values lie between two adjacent contour
> >> levels, all one color is expected.  However, NCL 6.3.0 fails to color
> fill
> >> in these cases.  The result is all white maps that interrupt
> presentation
> >> sequences.
> >>
> >> Attached plot #1 shows color fill forced by adding an intermediate
> contour
> >> level.  Plot #2 shows the problem, a blank plot when fewer contour
> levels
> >> are selected, and all one color expected.
> >>
> >> Here is the script for plot #2, the non-filled map.  Plot #1 results by
> >> changing cnLevelSpacingF to 6 instead of 12.  The input file is in the
> third
> >> attachment:
> >>
> >> begin
> >>   f = addfile ("data.no-color.nc", "r")
> >>   dat = f->dat
> >>   print ("Data range of full grid = " + min (dat) + ", " + max (dat))
> >>
> >>   wks = gsn_open_wks ("x11", "plot.test")
> >>   res                      = True
> >>   res at cnFillOn             = True
> >>   res at cnConstFEnableFill   = True
> >>
> >>   res at cnLevelSelectionMode = "ManualLevels"
> >>   res at cnMinLevelValF       = 0
> >>   res at cnMaxLevelValF       = 24
> >>   res at cnLevelSpacingF      = 12   ; smaller generates color fill
> >>
> >>   res at mpMinLonF    = 234     ; any boundary outside data limits
> >>   res at mpMaxLonF    = 260     ; generates color fill
> >>   res at mpMinLatF    = 31
> >>   res at mpMaxLatF    = 50
> >>
> >>   res at mpCenterLonF = (res at mpMinLonF + res at mpMaxLonF) / 2.0
> >>   res at gsnAddCyclic = False
> >>   res at mpFillOn     = False
> >>   res at mpOutlineBoundarySets = "AllBoundaries"
> >>
> >>   plot = gsn_csm_contour_map_ce (wks, dat, res)
> >> end
> >>
> >> Please note that two different kinds of changes result in correct color
> >> fill, just not all one color which is what I need.  You can decrease
> >> cnLevelSpacingF to some value such as 6, which generates more than one
> >> color.  You can also change any of the map border resources (mpMinLonF
> etc.)
> >> to extend outside the data limits, resulting in missing values along the
> >> edges showing as blank (white) areas.
> >>
> >> Both of these changes have something in common.  They all result in at
> >> least one color variation inside the plot frame.  The failure occurs
> when
> >> the entire plot frame should be one solid color with no breaks for
> missing
> >> values or contour lines.
> >>
> >> Is this a bug in NCL?  Is there an existing solution?  Can you please
> >> either change NCL to prevent this kind of blanking, or else add a
> resource
> >> similar to cnConstFEnableFill, to allow users to control the blanking in
> >> such cases?  Thanks for your consideration.
> >>
> >> --Dave
> >>
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >
> >
> > _______________________________________________
> > 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/20151231/16c0a030/attachment.html 


More information about the ncl-talk mailing list