Passing arguments to Grads script
Daniel Leins
daniel.leins at NOAA.GOV
Mon Jan 31 20:37:53 EST 2005
All,
I have written a script to plot temperatures across a given area. When it
comes to titling the images, I would like to pass the current time to the
script, then have this argument displayed through 'draw title'. For example,
If it is 15:00, I would like to pass the time to my script, and do something
like
draw title Current Temperatures as of @ARGV[0]
where @ARGV[0] comes from gradsdods -l -b -c "run temps.gs 15:00"
(i am aware that @ARGV[0] is not correct, I am simply using this syntax as
an example).
OR
If I wanted to pass the title itself to the script instead of the time, for
example:
draw title @ARGV[0]
where @ARGV[0] comes from gradsdods -l -b -c "run temps.gs Dewpoints"
I've looked through several scripts online which involve passed arguments,
however I haven't been able to find anything that pertains to this. I don't
need to perform any sort of calculations on the passed argument, I simply
need to pass it into the script, and have it passed back out in the title
section. What is the best way to accomplish this?
Thanks,
Dan Leins
DOC/NOAA/NWS/EAX
More information about the gradsusr
mailing list