<div dir="ltr">It'll take someone with knowledge on the background plotting code to say more, but I think you're running into an issue of trying to contour a region over only ~4 data points. Looks like AreaFill needs more than 4 data points to calculate the contours. There should probably be an error check here. <div><br></div><div>If you change the cnFillMode to CellFill or RasterFill then it'll plot as expected. Or expand your region to include more than 4 data points. </div><div><br></div><div>cnFillMode = "RasterFill"</div><div>cnRasterSmoothingOn = True</div><div><br></div><div>The combination of those two resources will produce contours that are very similar to AreaFill. </div><div><br></div><div><br></div><div>~Alan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 8:46 AM, Raffaele Quarta <span dir="ltr"><<a href="mailto:raffaele.quarta@linksmt.it" target="_blank">raffaele.quarta@linksmt.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><u></u>
<div>
<p><font>Ok, sorry if I got wrong since I called functions instead of resources.<br>
I'm trying to make a plot of NetCDF file, by using a tiling approach and making a subset of the data.<br>
Although I add the following two lines in my script, as you suggested, I can't obtain what I'd like to. <br>
<br>
--------------------------------<br>
res@cnConstFEnableFill = True |<br>
res@cnConstFLabelOn = False |<br>
--------------------------------<br>
<br>
Attached you will find:<br>
<br>
- <a href="http://file_input_crop.nc" target="_blank">file_input_crop.nc</a> (NETCDF input file that I'm using)<br>
- tms_output.png (an example of output .PNG that I got)<br>
- tms_test.ncl (the script that I'm using for the plot)<br>
<br>
Looking at the output, I believe that NCL isn't able to get the constant value in the selected bounding area.<br>
<br>
Maybe I'm not using appropriately the resources.<br>
<br>
Thank you for the help<br>
<br>
Raffaele<br>
<br>
-----Original Message-----<br>
From: Alan Brammer [<a href="mailto:abrammer@albany.edu" target="_blank">mailto:abrammer@albany.edu</a>]<br>
Sent: Tue 11/11/2014 6:08 PM<br>
To: Raffaele Quarta<br>
Cc: <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
Subject: Re: [ncl-talk] Plot of constant values<br>
<br>
It'll help everyone solve this by describing how it is not working? Also<br>
fyi these are resources not functions.<br>
<br>
<br>
This works exactly as expected for me in 6.2.0 and 6.2.1.<br>
<br>
<br>
x = new ( (/100,100/), float)<br>
x = 100<br>
<br>
wks = gsn_open_wks("X11","ConstFill_wks")<br>
<br>
res = True<br>
res@cnFillOn = True ;;;; The contour needs to be filled to<br>
start with, for a constant value to be filled.<br>
res@cnConstFEnableFill = True<br>
res@cnConstFLabelOn = False<br>
<br>
plot = gsn_csm_contour(wks, x, res)<br>
<br>
<br>
<br>
<br>
Alan Brammer<br>
<br>
<br>
<br>
On Tue, Nov 11, 2014 at 11:29 AM, Raffaele Quarta <<br>
<a href="mailto:raffaele.quarta@linksmt.it" target="_blank">raffaele.quarta@linksmt.it</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> I'm using the 6.2.0 NCL version. Actually, I'm dealing with the problem to<br>
> plot an area with constant value.<br>
> I saw that starting from the version 6.2.0, the following function is able<br>
> to solve the problem.<br>
><br>
> -------------------------<br>
> cnConstFEnableFill<br>
><br>
> Available in version 6.2.0 and later.<br>
> If the boolean resource cnConstFEnableFill is set to True, then in most<br>
> cases, constant or near-constant fields will be rendered as a filled area,<br>
> rather than having the contoured area remain blank. By default, the<br>
> constant field informational text box will still appear; turn it off by<br>
> setting cnConstFLabelOn to False.<br>
><br>
> In the future, cnConstFEnableFill will likely default to True, with<br>
> cnConstFLabelOn defaulting to False unless contour line drawing is enabled.<br>
><br>
> Default: False<br>
> -----------------------<br>
><br>
> I tried to use this solution but it seems not working. Maybe it a bug of<br>
> the software?<br>
> Can you suggest a different solution?<br>
><br>
> Thank you very much.<br>
><br>
> Raffaele<br>
><br>
> --<br>
> This email was Virus checked by Astaro Security Gateway. <a href="http://www.sophos.com" target="_blank">http://www.sophos.com</a><br>
><br>
><br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
><br>
><br>
<br>
--<br>
This email was Virus checked by Astaro Security Gateway. <a href="http://www.sophos.com" target="_blank">http://www.sophos.com</a><br>
<br>
<br>
<br>
</font>
</p>
</div>
</div></div></blockquote></div><br></div>