[gradsusr] GrADS default colors?

Sim Aberson Sim.Aberson at noaa.gov
Wed Apr 21 10:55:54 EDT 2010


Eric,

Sorry I wasn't clear in my original message.  The plot shows colored contours, 
but also shows streamlines that are too light to actually be seen, thus the 
reason for my question.

What I want is a plot of the contours of the differences between two wind 
fields, so I have in my script:

'set csmooth on'
'set clevs  1  2  3  4  5  6  7  8  9'
'set ccols  4  5  3 10  7 12  8  2  6'
'd 
mag(ave(ugrdprs.1,lev=850,lev=200)-ave(ugrdprs.2,lev=850,lev=200),ave(vgrdprs.1,lev=850,lev=200)-ave(vgrdprs.2,lev=850,lev=200))'


In addition, I want some direction information, so I added:

'set gxout stream'
'set cmin 1'
'd 
ave(ugrdprs.1,lev=850,lev=200)-ave(ugrdprs.2,lev=850,lev=200);ave(vgrdprs.1,lev=850,lev=200)-ave(vgrdprs.2,lev=850,lev=200);mag(ave(ugrdprs.1,lev=850,lev=200)-ave(ugrdprs.2,lev=850,lev=200),ave(vgrdprs.1,lev=850,lev=200)-ave(vgrdprs.2,lev=850,lev=200))'

This provides the streamlines.  However, as you see in the figure, the 
streamlines come out very light.  The actual question is how I get those 
streamlines to be darker.

Thanks for the help.

Sim

On 4/20/10 4:54 PM, Eric Altshuler wrote:

> You say you want to plot streamlines, but your attached plot shows some
> colored contours. The colors 0 and 1 are not necessarily black and white,
> respectively. 0 is the background color (black by default) and 1 is the
> foreground color (white by default). If you have used the 'set display'
> command to get a white background (e.g. 'set display color white'), then 0
> should be white and 1 should be black. (There is another command, 'set
> background', but it is undocumented, and I'm not sure what effect it might
> have, especially in combination with 'set display'.)
>
> Your approach using 'set clevs' and 'set ccols' doesn't work for streamlines.
> For one thing, streamlines only represent the nondivergent part of the wind
> field, so the wind speed can't be determined from the streamfunction alone.
> There is a better way to accomplish what you want. Mask out all grid points
> where the wind speed is less than 1 m/s, and display the wind using this
> mask:
>
> 'set display color white' 'set gxout stream' 'wspd=mag(u,v)' 'd
> maskout(u,wspd-1.0);maskout(v,wspd-1.0)'
>
> This will only draw (black) streamlines where the wind speed exceeds 1 m/s.
>
> Best regards,
>
> Eric L. Altshuler Assistant Research Scientist Center for
> Ocean-Land-Atmosphere Studies 4041 Powder Mill Road, Suite 302 Calverton, MD
> 20705-3106 USA
>
> E-mail: ela at cola.iges.org Phone: (301) 902-1257 Fax: (301) 595-9793
>
> ----- Original Message ----- From: "Sim Aberson"<Sim.Aberson at noaa.gov> To:
> gradsusr at gradsusr.org Sent: Tuesday, April 20, 2010 9:06:52 AM Subject:
> [gradsusr] GrADS default colors?
>
>
> I am trying to make some plots in which streamlines are plotted only when
> the magnitude of the wind is>  a threshold, in this case 1 m/s.  I am using
>
> 'set clevs  0 1' 'set ccols  1 0'
>
> My impression is that 1 is white and 0 is black.  When I make the plot, 1 is
> white, and 0 is very light grey.  How do I make the streamlines black?
>
> Thanks, Sim
>
>


-- 
Sim Aberson         AOML/Hurricane Research Division          Miami, FL
     "Hurricane states erect statues in my honor." -- David Sedaris



More information about the gradsusr mailing list