controling colour station data according to defined range.

Michael Fiorino Michael.Fiorino at NOAA.GOV
Wed Jul 29 14:48:30 EDT 2009


dear jennifer,

have you tried the 'set gxout stnmark'?  yes, i see you have, but maybe
for the rest, there might be interest in some of my recent work with
this option. yeah, you really need something like 'set gxout stnvalue'
which might not be that hard...

i implemented this display many years ago to colourise station data
based on value and one could follow that code to implement 'stnvalue'...
i'm not that interested, but...

attached is a plot of small difference between two topography data sets
on a 625,000+ point station data set.  the following script segment
shows how i made the plot:


z2='z0.2'
rbcolsd='    49  47 46 45 44 43 42 79 0 39 22 23 24 25 26 27 29'
zmin=5
zint=zmin/20
digsz1=0.0225

'set digsiz 'digsz1
'set cmark 3'                                 # 3 = filled circle
'set rbcols 'rbcolsd                         # set colours in the rainbow
'set rbrange -'zmin' 'zmin                   # set the range of values
'set cint 'zint                              # set the contour interval
'd maskout('z2','zmin'-abs('z2'))'
'cbarn'
'draw map'
'draw title abs(z0)`bGFS`n <= 'zmin' m --spectral ringing for G'glev

if(parea != 'global')
'print 'pdir'z0gfs_small.eps'
endif

'printim 'pdir'z0gfs_small.png x'xsiz' y'ysiz

reminds me of a mandelbrot set...

and grads was able to draw the 625,000+ on the screen in less than 3
sec, which is very impressive...

hope this helps.

best /r mike



Jennifer Faber wrote:
> Hi Stephan (and other GrADS users)
>
> It seems like a good option when you are talking about 10 or 20
stations. But I want to produce maps that make use of hundreds of
stations. Finding all coordinates and creating this function will be
very time-consuming! I am starting to get the idea that it isnt possible
in GrADS to color values, which suprises me because so much is possible
with GrADS! Maybe a good idea to insert the option in a new version?! ;-)
>
> Greetings,
> Jennifer
>
>
>
>     ----- Original Message -----
>     From: Stephen R McMillan
>     To: GRADSUSR at LIST.CINECA.IT
>     Sent: Monday, July 27, 2009 5:53 AM
>     Subject: Re: controling colour station data according to defined range.
>
>     Jennifer,
>     Have you considered using 'set strsiz...', 'set string...', and
'draw string...' to draw your values?  You could create a function that
draws the plotted parameters in value-dependent colors, using station
x-y coordinates and wx parameter values as arguments.  It may be more
time-consuming but should do the trick.  Perhaps someone else out there
knows a more efficient way in GrADS,
>
>     Note:  I am on "vacation" so I may not respond to any follow-up
questions/comments in a timely manner.   Sorry--no sample script at this
time.
>
>     Good luck!
>     Stephen McMillan
>
>     Jennifer Faber <j.faber at WEERONLINE.NL>
>     Sent by: GRADSUSR at LIST.CINECA.IT
>
>     07/24/2009 02:16 AM
>     Please respond to
>     GRADSUSR at LIST.CINECA.IT
>
>
>     To
>         GRADSUSR at LIST.CINECA.IT
>     cc
>
>     Subject
>         Re: controling colour station data according to defined range.
>
>
>
>
>
>     Hi Jennifer (and rest)
>
>     Thanks you for your fast reply! I never knew about  this option.
But unfortunately I dont wanna plot the parameters as dots  that
represents the station location. I want to plot parameters like
temperature, rainfall, wind direction and speed measured by the station
as  values (not as dots) and control the  colours of these parameters.
If I "set gxout value" then I can plot the values  but I cannot color
the colors according to their value. Any new suggestions?? (I  dont know
if it is allowed, but I added a file as an example what I  mean)
>
>     Greetings,
>     Jennifer Faber
>     ----- Original Message -----
>     From: Jennifer Adams
>     To: GRADSUSR at LIST.CINECA.IT
>     Sent: Thursday, July 23, 2009 5:24  PM
>     Subject: Re: controling colour station  data according to defined
range.
>
>     Use 'set gxout stnmark' and you'll get a colorized dot where  the
station location is. Then 'set clevs' and 'set ccols' and 'set digsiz'
will allow you to control the colors and levels  and size of the dots.
>     --Jennifer
>
>     On Jul 23, 2009, at 11:01 AM, Jennifer Faber wrote:
>
>
>     Dear all,
>
>     Problem: I am  trying to plot MOS data in GrADS. This data is
station data and we  already created a numerical model and STNmap
utility to read and  draw into a grid. What I want to do is colour the
parameters according to  their values. In essence the same as what you
can do for the contours  (shaded or not) but now for gridvalues or
stationdata.
>
>     With Tmax as example we managed: to  plot the Tmax of all stations
(of MOS file) with gxout shaded using oacreas.  Here we can manipulate
the colours and the range.
>
>     Now: We want to plot the value Tmax  as value (not contour) and
then colour the value according to a range. I  cannot use clevs or ccols
because that is only for contours. And I cannot  use fgvals neither
because then it will colour the entire grid and not the  grid value. All
I can do with the value is change digit, change size and  colour them,
BUT all in the SAME colours.
>
>     I didnt include a script, because no script I  tried, solved this
problem.
>     I hope you can help me. Thanks!
>
>     Sincerely,
>
>     MSc. Jennifer Faber
>     Meteorologist  Weeronline
>
>     WeerOnline B.V.
>     Waterstraat 11
>     6882 GA  Velp
>     Tel.: 026-3622111
>     Fax: 026-3621699
>     http://www.weeronline.nl
>     http://pda.weeronline.nl
>     mailto: j.faber at weeronline.nl
>     --
>     Jennifer M. Adams
>     IGES/COLA
>     4041 Powder Mill Road, Suite 302
>     Calverton, MD 20705
>     jma at cola.iges.org[attachment "example TMAX coloured.gif" deleted by
Stephen R. McMillan/Planalytics]
>
>
>     ***************************************************
>     The information contained in this e-mail message is intended only
for the use of the recipient(s) named above and may contain information
that is privileged, confidential, and/or proprietary. If you are not the
intended recipient, you may not review, copy or distribute this message.
If you have received this communication in error, please notify the
sender immediately by e-mail, and delete the original message.
>     ***************************************************

-------------- next part --------------
A non-text attachment was scrubbed...
Name: g8wrf.global.z0gfs_small.png
Type: image/png
Size: 199731 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20090729/113758b8/attachment.png 


More information about the gradsusr mailing list