Re: grdvector with GMT5

Paul Wessel <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
On Nov 16, 2013, at 11:51 AM, Cyril Langlois <[email protected]> wrote:

> Hi Paul,
> 
> Thanks for the answer. As you suggest, using -Q0.25+e+n2 give relatively correct vectors (but the smaller ones become quite invisible).
> 
> Nevertheless, grdvector gives me other disappointing outputs with this Nuvel 1 velocity map :
> 
> First : attached are the maps I obtain with the grdvector options -Si150 and -Si300, respectively : the second one (-Mercator2, with -Si300) shows two unexpected yellow lines, which I suppose to be head vectors inordinately stretched (?)
> 
I see the 360 wrap around problem; will have a look.

> (grdvector command is : gmt grdvector nuvel1.vy.1.5.grd nuvel1.vx.1.5.grd  -T -R -J -I23 -Si150 -Q0.25+e+n2  -Wthick,black -Gorange --MAP_VECTOR_SHAPE=0.25 -O -K -V >> $carte)
> 
> Second, the -I option : these Nuvel-1 vectors grids have x_inc and y_inc set to 1, but the vectors are drawn only when setting -I30. Using any other value gives the error message : 
> «  New y grid spacing (14.5) is not a multiple of actual grid spacing (1) » (here for -I15)
> 
This I cannot reproduce.  When I try

grdvector nuvel1.vy.1.5.grd nuvel1.vx.1.5.grd  -T -R-35/325/-70/75 -JM145/0/18c -I15 -Si150 -Q0.25+e+n2  -Wthick,black -Gorange --MAP_VECTOR_SHAPE=0.25  -V > t.ps
it works fine.  If I give something not a multiple of one, e.g. 7.5, then I get the expected message:
grdvector: Error: New y grid spacing (7.5) is not a multiple of actual grid spacing (1)

Are you sure you updated to the latest revision (r12527 as of right now)?  Am I not running the command you used?

-p

> Thanks for help,
> Cyril
> 
> PS : these Nuvel-1 grids comes from the Thornsten Becker’s iGMT site (http://geodynamics.usc.edu/~becker/igmt/). Values are cm/yr.
> 
> 
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected] <Nuvel-1-maps.zip>
> 
> 
> 
> Le 16 nov. 2013 à 00:11, Paul Wessel <[email protected]> a écrit :
> 
>> Thanks Cyril, for exposing more issues. It was a mix of bugs and "features" with the new geo-vectors.
>> 
>> The weirdness had to do with the vector heads being longer than the length of the vector.  That is, the chosen vector head length of 0.25cm, when converted to km on the ground, in many places exceeded the length of the data vector projected to km on the ground.  This would bring up the issue of using the +n<norm> modifier to -Q, but it had bugs as well.  These are now all fixed I hope.  Here is the modified behavior:
>> 
>> 1. If the vector head length exceed 90% of the vector length the head is skipped and a warning is issued
>> 2. If +n<norm> is used with -Q then four things can happen:
>> 	a) vector length >= norm and vector head length >= 90% of the vector length: Normal plotting
>> 	b) vector length >= norm and vector head length < 90% of the vector length: Head is shrunk down to satisfy criteria; warning issued
>> 	c) vector length <norm:
>> 		Vector pen and head shrinks down as desired. Then
>> 		d) if shrunk head length still >= 90% of the vector length: head shrinks down further, vector pen stays the same.; warning issued
>> 
>> I have added a new test to our suite for this behavior. PDF is attached and panels with blue line has +n such that the left side experiences shrinking.
>> The other panel just skips head when vector is too short.
>> 
>> In r12520.
>> 
>> Cheers, Paul
>> To unsubscribe, send the message "signoff gmt-help" to [email protected] <shrink.pdf>
>> On Nov 15, 2013, at 6:36 AM, Langlois <[email protected]> wrote:
>> 
>>> Hello,
>>> 
>>> I’m getting trouble with grdvector use with GMT5.1.0 :
>>> I have two scripts with the same grdvector command to draw Nuvel-1 velocity vectors, one for a regional map, the other for a global map (attached). But the output maps look completely differents (see attached images) and I don’t undersand why.
>>> 
>>> My grdvector command is, for both map :
>>>  
>>> # add vector field
>>> vecsize=0.25+e+p0.25p
>>> velscale=i80
>>> 
>>> #Nuvel-1A
>>> gmt grdvector $rasterpath/plates/nuvel1.vy.1.5.grd $rasterpath/plates/nuvel1.vx.1.5.grd \
>>>  	 -T $region $projection -I30 -S$velscale -Q$vecsize \
>>>  	 -Wthick,black -Gorange --MAP_VECTOR_SHAPE=0.5 -O -K -V >> $carte
>>> 
>>> where "$rasterpath/plates/nuvel1.vy.1.5.grd » is the Nuvel-1 velocity grid (x and y components). Only the -I option are changed (-I30 for the global map, -I5 for the regional one).
>>> 
>>> How can the same script command gives so different results ?? Both scripts are also attached below.
>>> Thanks for help,
>>> 
>>> Cyril
>>> 
>>> 
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected] <GMT5_Nuvel_Eu-fixe-JM.sh>
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]<GMT5_Tibet_GPS-Nuvel-Eurasie-2013-3.sh>
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]<GMT_Tibet_GPS_Nuvel_2013-simple.pdf>
>>> 
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]<GMT5_Nuvel-plaques-Eu-Mercator.pdf>
>>> 
>>> Dr. Cyril LANGLOIS
>>> Professeur agrégé - enseignant de Sciences de la Terre 
>>> [email protected]
>>> Tél. portable : 06 89 05 68 22
>>> Tél. bureau : 04 72 72 85 28
>>> § --------------------------- §
>>> Préparation à l'Agrégation SV-STU
>>> Ecole Normale Supérieure de Lyon -  Site Monod
>>> 46, allée d'Italie
>>> 69364 Lyon cedex 07
>>> § --------------------------- §
>>> 
>>> To unsubscribe, send the message "signoff gmt-help" to [email protected]
>> 
>> To unsubscribe, send the message "signoff gmt-help" to [email protected]
> 
> Dr. Cyril LANGLOIS
> Professeur agrégé - enseignant de Sciences de la Terre 
> [email protected]
> Tél. portable : 06 89 05 68 22
> Tél. bureau : 04 72 72 85 28
> § --------------------------- §
> Préparation à l'Agrégation SV-STU
> Ecole Normale Supérieure de Lyon -  Site Monod
> 46, allée d'Italie
> 69364 Lyon cedex 07
> § --------------------------- §
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected] 
> 
> To unsubscribe, send the message "signoff gmt-help" to [email protected]


To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.