[gradsusr] [Non-DoD Source] Re: How to plot a single vector or number ona GrADS plot background (UNCLASSIFIED)

Brian Doty grads at gradsdev.com
Sun May 6 21:28:28 EDT 2018


There is no native "draw" command in grads to draw a vector.  You will need to do a sequence of "draw line" commands to do this task.  As others have indicated, this is "easily" done using the programmable interface to grads, the grads scripting language.  The script is a text file, a simple program.  It is invoked from grads using the "run" command.  You can pass arguments to the script as well.  

If I were doing the task that I think you are trying to do, I'd put the info for my custom vectors into a text file.  I'd then write a small grads script to read the text file line by line (as a loop), then I'd repeatedly call a script (essentially a subroutine at this point) to draw the vector(s) at the desired location and size and color etc.  

There's somewhat of a learning curve implied here, and I'm happy to help you out further if you're still stuck... Brian


> On May 4, 2018 at 10:31 AM "Haines, Patrick A CIV USARMY RDECOM ARL " <patrick.a.haines6.civ at mail.mil> wrote:
> 
> 
> CLASSIFICATION: UNCLASSIFIED
> 
> Lyndon,
> 
>                   I want to plot individual vectors representing the observed wind (speed and direction). I only have a few of these (~10). I can plot a character using draw string (setting the location, orientation, color and so on), but how do I plot a line with an arrow?
> 
> Pat
> 
> -----Original Message-----
> From: gradsusr [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Lyndz
> Sent: Friday, May 04, 2018 9:11 AM
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Subject: Re: [gradsusr] [Non-DoD Source] Re: How to plot a single vector or number ona GrADS plot background (UNCLASSIFIED)
> 
> All active links contained in this email were disabled. Please verify the identity of the sender, and confirm the authenticity of all links contained within the message prior to copying and pasting the address to a Web browser. 
> 
> 
> ________________________________
> 
> 
> 
> Hi Patrick,
> 
> I'm not sure what you really want to plot here. Can you send your desired output (sample image) here and the smallest data sample if possible?
> 
> There is a script in this link: Caution-http://www.jamstec.go.jp/frsgc/research/iprc/nona/GrADS/plot-vector.html < Caution-http://www.jamstec.go.jp/frsgc/research/iprc/nona/GrADS/plot-vector.html >  called vec.gs < Caution-http://vec.gs > .
> By using this script, you can control the location of the arrow (vector) and the magnitude (number). 
> 
> 
> Hope this helps,
> 
> 
> Lyndon Mark P. Olaguera
> PhD Student 
> Laboratory of Climatology
> Department of Geography
> Faculty of Urban Environmental Science
> Minami-Osawa Campus
> 
> Tokyo Metropolitan University
> Hachioji Tokyo, Japan
> 
> 
> On Fri, May 4, 2018 at 11:26 PM, Haines, Patrick A CIV USARMY RDECOM ARL (US) <patrick.a.haines6.civ at mail.mil < Caution-mailto:patrick.a.haines6.civ at mail.mil > > wrote:
> 
> 
> 	CLASSIFICATION: UNCLASSIFIED
> 	
> 	Brian,
> 	
> 	        "draw string" seems promising but how do I specify that the character plotted is a vector (line and arrowhead)?
> 	
> 	Thank you,
> 	
> 	Patrick Haines
> 	
> 	
> 	-----Original Message-----
> 	From: gradsusr [Caution-mailto:gradsusr-bounces at gradsusr.org < Caution-mailto:gradsusr-bounces at gradsusr.org > ] On Behalf Of Brian Doty
> 	Sent: Wednesday, May 02, 2018 11:36 AM
> 	To: GrADS Users Forum <gradsusr at gradsusr.org < Caution-mailto:gradsusr at gradsusr.org > >
> 	Subject: [Non-DoD Source] Re: [gradsusr] How to plot a single vector or number ona GrADS plot background (UNCLASSIFIED)
> 	
> 	All active links contained in this email were disabled.  Please verify the identity of the sender, and confirm the authenticity of all links contained within the message prior to copying and pasting the address to a Web browser.  
> 	
> 	
> 	
> 	
> 	----
> 	
> 	Check to see if the "draw" commands suit your need, in particular the "draw string" command...
> 	
> 	> On May 1, 2018 at 10:17 AM "Haines, Patrick A CIV USARMY RDECOM ARL " <patrick.a.haines6.civ at mail.mil < Caution-mailto:patrick.a.haines6.civ at mail.mil > > wrote:
> 	> 
> 	> 
> 	> CLASSIFICATION: UNCLASSIFIED
> 	> 
> 	> I am generating various surface wind flow and other plots with GrADS. These are based on numerical simulation and they look pretty good. Now, I would like to plot a few isolated values or numbers on the previously mentioned GrADS plots. The values and/or numbers are not in station format. Is there a way in GrADS to do this? Previously, I have imported the GrADS plots into powerpoint and then placed the vectors or numbers.
> 	> 
> 	> Thank you,
> 	> 
> 	> Patrick Haines
> 	> 
> 	> 
> 	> CLASSIFICATION: UNCLASSIFIED
> 	> _______________________________________________
> 	> gradsusr mailing list
> 	> gradsusr at gradsusr.org < Caution-mailto:gradsusr at gradsusr.org > 
> 	> Caution-Caution-http://gradsusr.org/mailman/listinfo/gradsusr < Caution-http://gradsusr.org/mailman/listinfo/gradsusr > 
> 	_______________________________________________
> 	gradsusr mailing list
> 	gradsusr at gradsusr.org < Caution-mailto:gradsusr at gradsusr.org > 
> 	Caution-Caution-http://gradsusr.org/mailman/listinfo/gradsusr < Caution-http://gradsusr.org/mailman/listinfo/gradsusr > 
> 	
> 
> 
> 	CLASSIFICATION: UNCLASSIFIED
> 	
> 	_______________________________________________
> 	gradsusr mailing list
> 	gradsusr at gradsusr.org < Caution-mailto:gradsusr at gradsusr.org > 
> 	Caution-http://gradsusr.org/mailman/listinfo/gradsusr < Caution-http://gradsusr.org/mailman/listinfo/gradsusr > 
> 	
> 
> 
> 
> CLASSIFICATION: UNCLASSIFIED
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr


More information about the gradsusr mailing list