[gradsusr] tile and grfill

Andrew Friedman andfried at gmail.com
Wed Jan 27 12:16:26 EST 2016


Thank you, Jennifer and Jeff.
-Andrew

On Wed, Jan 27, 2016 at 5:38 PM, Jennifer M Adams <jadams21 at gmu.edu> wrote:

> Thanks for the clarification, Andrew. I think this is a bug — the grfill
> code path is not doing what it’s supposed to with a contour level of -1.
> The ’not drawing anything when the color is -1’ is a feature of the new
> shading algorithm, and it may not have propagated over to the grfill code.
> I will look into it. I can offter two workarounds.
>
> 1. Define a color that is fully transparent and use that instead of -1.
>
> ‘set gxout grfill'
> ‘set rgb 42 0 0 0 0 ‘
> 'set ccols 41 42'
> ‘set clevs 0.05’
> ‘d pval’
>
> 2. Leave the -1 in there, but use ‘d maskout(pval,0.5-pval)’ instead of ‘d
> pval’.
>
>
> —Jennifer
>
> On Jan 27, 2016, at 9:05 AM, Andrew Friedman <andfried at gmail.com> wrote:
>
> Hi Jeff,
>
> Here's an example of where I have the discrepancy.
> I'm looking at a netcdf file with 2 variables, 'slope' and 'pval' (it's a
> trend of rainfall). I'm trying to plot the slope using grfill, and to apply
> the pattern in areas where 'pval' is above a certain value.
>
> First, I define a tile as a new color:
> 'set tile 0 2 6 6 3 0'
> 'set rgb 41 tile 0'
>
> Then, I shade the slope:
> 'set gxout shaded' * (or grfill)
> 'd slope'
>
> Third, I apply the pattern fill to pval:
> 'set clevs 0.05'
> 'set ccols 41 -1'
> 'd pval'
>
> When I use 'set gxout shaded', the pattern fills on top of the existing
> shading, as in the GrADS website example. However, when I use 'set gxout
> grfill', the initial fill disappears in areas without pattern fill. I've
> attached images showing the differences.
>
> Any ideas? I know it's not a major issue, but I often look at coarse
> spatial resolution datasets, and I like the grfill setting to present where
> the gridbox boundaries are exactly.
>
> Thanks,
> Andrew
>
>
> On Tue, Jan 26, 2016 at 6:42 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
>
>> Andrew,
>> Can you clarify your question please? What exactly do you mean by
>> "tiling"?
>>
>> The difference between grfill and shaded is that shaded color shades
>> between (smoothed) contours drawn by the software, giving your fields a
>> nicer smoother look, whereas grfill just uses color shades to fill by grid
>> box only, with no contour lines drawn to serve as boundaries for color
>> areas. For very high resolution grids, you won't really see much, if any,
>> difference between a field displayed using grfill and that field displayed
>> using shaded. It only really shows up for coarser grids.
>>
>> Jeff Duda
>>
>> On Tue, Jan 26, 2016 at 10:58 AM, Andrew Friedman <andfried at gmail.com>
>> wrote:
>>
>>> Hi GrADS users,
>>>
>>> I am trying to tile areas of significance using grfill. However, I have
>>> noticed that tiling seems to behave differently with gxout set to grfill v.
>>> shaded. When gxout is set to grfill, all values that are not tiled are
>>> return to the background. Does anyone know a work-around for this?
>>>
>>> Thanks, Andrew
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>>
>> --
>> Jeff Duda
>> Graduate research assistant
>> University of Oklahoma School of Meteorology
>> Center for Analysis and Prediction of Storms
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
> <shaded_example.png><grfill_example.png>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> --
> Jennifer M. Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> 111 Research Hall, Mail Stop 2B3
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160127/2725073a/attachment.html 


More information about the gradsusr mailing list