Res: Writing a positive signal ( + ) for temperatures

Stephen R McMillan smcmillan at PLANALYTICS.COM
Sat Aug 29 02:02:39 EDT 2009


Fernando,
Attached sample script should do what you want.  Someone else may know of 
a way to format the "gxout grid" plots (besides digsiz and dignum), but 
this one relies on the 'q defval...' query and a grid x-y WHILE loop to 
format and plot the values at each grid point.  While it may take an 
eye-blink longer, it seems to work.

As before, I included the GrADS-default and script-derived images 
(airt1... and airt2..., respectively).   I did not include wind barbs in 
sample, since you did not have a question about them.

Stephen




Fernando Reis <nandoreisbr at YAHOO.COM.BR> 
Sent by: GRADSUSR at LIST.CINECA.IT
08/28/2009 04:33 PM
Please respond to
GRADSUSR at LIST.CINECA.IT


To
GRADSUSR at LIST.CINECA.IT
cc

Subject
Res: Writing a positive signal ( + ) for temperatures





Hi Stephen,
Thanks a lot for your answering.  I liked your exemplo a lot and it's 
probable that I'll use it in some place. But I wasn't talking about the 
contour but about the number (set gxout grid).
I've attached two images for you. 

model.gif is the image that I want to produce.

reis.png is the image I can do now. The images have different areas but 
what I want to know is how to do (+ for positives, no sign  for negatives, 
)

I hope I could be clear.

Thanks again.



De: Stephen R McMillan <smcmillan at PLANALYTICS.COM>
Para: GRADSUSR at LIST.CINECA.IT
Enviadas: Sexta-feira, 28 de Agosto de 2009 17:04:41
Assunto: Re: Writing a positive signal ( + ) for temperatures

Fernando,

You didn't say, but I assume you're referring to a contour chart with 
contour labels.  If so, see if following sample script does what you had 
in mind for temperatures.  I've attached two PNG output images..."airt1" 
is GrADS default (- for negatives, no sign for positives), and "airt2" is 
derived from sample script.  The "colors" function provides an alternate 
set of contour colors.

Let me know if it needs further explanation...good luck.
Stephen McMillan

'define airt=air-273.16'
#Do negatives:
colors(1)
'd -airt'
#Do positives:
colors(2)
'set clab %+.f'
'd airt'
'draw title Air Temp (C)   Neg = No sign    Pos = + sign'

function colors(opt)
if(opt=1)
#set colors for absolute of negatives:
 'set rgb 18 130 0 190'
 'set rgb 20 0 0 150'
 'set rgb 22 0 0 255'
 'set rgb 24 0 100 255'
 'set rgb 26 0 170 255'
 'set rgb 28 0 230 255'
 'set rgb 30 130 255 255'
 'set rgb 31 245 245 245'
  'set clevs 0 2 4 6 8 10 12'
  'set ccols 31 30 28 26 24 22 20 18'
else
#set colors for positives:
 'set rgb 32 255 255 130'
 'set rgb 34 255 240 0'
 'set rgb 36 255 195 0'
 'set rgb 38 255 130 0'
 'set rgb 40 255 50 0'
 'set rgb 42 220 0 0'
 'set rgb 44 150 0 0'
 'set clevs 2 4 6 8 10 12'
 'set ccols 32 34 36 38 40 42 44'
endif
return






Fernando Reis <nandoreisbr at YAHOO.COM.BR>
Sent by: GRADSUSR at LIST.CINECA.IT

08/28/2009 10:04 AM
Please respond to
GRADSUSR at LIST.CINECA.IT



To
GRADSUSR at LIST.CINECA.IT
cc


Subject
Writing a positive signal ( + ) for temperatures









Hello folks,

I'd like to produce a chart with temperature and wind.  When Grads plots 
Negative temperatures it came with negative signal eg ( -78) and when the 
temperature is positive it came without signal.

I'd like to do it in a different way bye plotting positive values with a 
signal ( + 10 ) and negatives without it. ( 78 ).

Is that possible?

Thanks



Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - 
Celebridades- Música- Esportes


***************************************************
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.
***************************************************

start: 0000-00-00 end: 0000-00-00 

Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - 
Celebridades - Música - Esportes[attachment "model.gif" deleted by Stephen 
R. McMillan/Planalytics] [attachment "reis.png" 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 --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090829/3c01f64e/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: airt1_grid.png
Type: application/octet-stream
Size: 13031 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20090829/3c01f64e/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: airt2_grid.png
Type: application/octet-stream
Size: 13237 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20090829/3c01f64e/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grid_altvals.gs
Type: application/octet-stream
Size: 1069 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20090829/3c01f64e/attachment-0002.obj 


More information about the gradsusr mailing list