The query
command allows the user
to get information about a variety of aspects of the current GrADS session.
Configuration, plot characteristics, graphics specifics, and file structure
are some examples. The use of query pos
combined with
the coordinate transformations is the basis of many interactive applications
with buttons and drop menus. The query
command may
be shortened to simply q
. The syntax is:
query <option>
q <option>
When given without an option
,
the query
command returns a list of the possible options.
These are:
attr n Returns all attributes for file n (or default file if n is omitted) config Returns GrADS configuration information ctlinfo Returns contents of data descriptor file define Lists currently defined variables defval v1 i j Returns the value of defined variable v1
at pointi,j
dialog args Launches a dialog box that prompts for text or numeric data entry dims Returns current dimension environment file n Returns info on file number n
files Lists open files fwrite Returns status and characteristics of fwrite ouput file gxinfo Returns graphics environment info gxout Returns current gxout settings lats Returns the status of the GrADS-LATS interface pos Waits for mouse click, then returns position plus additional widget information shades Lists colors and levels of shaded contours string str Returns the width of string str
time v1 v2 Returns info about time settings udft v1 v2 Returns the user defined function table xinfo v1 v2 Returns characteristics of the graphics display window xy2w v1 v2 Converts XY coords to world coords xy2gr v1 v2 Converts XY coords to grid coords w2xy v1 v2 Converts world coords to XY coords w2gr v1 v2 Converts world coords to grid coords gr2w v1 v2 Converts grid coords to world coords gr2xy v1 v2 Converts grid coords to XY coords pp2xy v1 v2 Converts virtual page XY coords to real page XY coords
For more information on the use of the query
command, see the section of the User's Guide on commands that complement the scripting language.