[gradsusr] Plot a symbol on map where difference field exceeds a threshold
jeffduda319 at gmail.com
Thu Dec 13 14:40:35 EST 2018
One way you can do it is using the "tiling" option for creating custom
colors in grads.
-However, if you want to use stars specifically, you will need to find or
create a very small image file displaying the star and save it as a .png
-Then you can use 'set tile' (see tiling
<http://cola.gmu.edu/grads/gadoc/gradcomdsettile.html>) to create the tile.
Then apply that tile to a color by using 'set rgb *color#* tile *tile#*' as
indicated in the documentation for set rgb.
-Finally, you can display a masked field in combination with 'set clevs'
and 'set ccols' with your new color number and threshold level to get Grads
to plot the stars in a hatching pattern where the field threshold is
Another way is to literally search through your grid one point at a time
and use 'draw string' to draw whatever character you want with whatever
settings at that grid point if the field value at that grid point exceeds
the threshold. This option would me more involved and require more coding
and testing, but you would have a greater degree of control over how the
end result looks.
Hope this helps. Ask questions if you need more information.
On Thu, Dec 13, 2018 at 11:56 AM Tracey <tdorian10 at gmail.com> wrote:
> Hi GrADS users,
> I was wondering if anyone knew if there was a way to plot a large enough
> symbol on a global map in GrADS where a difference field exceeds a specific
> For example, in my GrADS script I am plotting sea surface temperatures and
> masking out land areas:
> 'set_parea 2 2 2 1 -margin 'margin
> *'color -levs -15 -10 -5 5 10 15 -kind blue->white->red'
> *'color -20 20 5 -kind blue->white-(0)->white->red'*
> *'d (TMPsfc.2-TMPsfc.1)'*
> 'q gxinfo'
> say ' (x1,x2) = ('x1','x2')'
> say ' (y1,y2) = ('y1','y2')'
> 'xcbar 'x1' 'x2' 'y1-0.3' 'y1-0.2' -fw .06 -fh .06 -fs 1'
> 'draw title FV3-GFS'
> * 'set rgb 73 80 80 80'
> 'set rgb 73 255 255 255'
> ** Plots ocean temperatures and masks land **
> 'basemap L 73 1 M'
> ** Plots land temperatures and masks ocean **
> *'basemap O 0 1 H'
> I want to say in GrADS, look at all points on the global map (not
> including land) and plot a large enough star that the user can see anywhere
> in the globe where the difference in surface temperature exceeds 10 degrees
> Celsius, for example. Does anyone know how I can do this?
> Thank you,
> Tracey Dorian
> gradsusr mailing list
> gradsusr at gradsusr.org
Jeff Duda, Research Scientist
University of Colorado Boulder
Cooperative Institute for Research in Environmental Sciences
NOAA/OAR/ESRL/Global Systems Division
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gradsusr