Page 1 of 1

Vector Help

Posted: Mon Jul 09, 2018 3:49 am
by MMWeather
Hoping someone will read this and be able to give an answer.
To subtract a vector B from Vector A:
You can take the neg of Vect B and then add the -B to A?!
According to my memory of vectors the above reasoning is correct. If this is indeed true AND if DA allows the addition of Vectors with SSUM then:

ERASE
ANALYZE,stor=2 smlc=1:-1 stor=1 wind hsfc
analyze,stor=3 wind h500
analyze,bknt color=200:0:0 stor=4 ssum=2:3
STAMP

I initially check the first analyze script line and it did print out the negative vector, so I know that part works. I checked it against the "normal" wind barb. The resulting barbs for this shear are close to the spc meso page for zero to 6 bulk shear. If anyone with more knowledge than I could send a response I would appreciate it immensely. BTW I originally asked TIM if SDIF would work with vectors but I have not rec. a response yet.
Thanks,
P19

Re: Vector Help

Posted: Tue Jul 10, 2018 3:46 am
by texsky
Not sure this is what you're after, but I get the same results using the following scripts. And as you stated, they're pretty similar to the SPC depictions.

CONT CINT=5 LINE=2 GRTN=25 VKNT MAGN BKNT COLOR=200:100:200 STOR=3 SDIF=1:2 STOR=2 WIND HSFC STOR=1 WIND H500

CONT LINE=2 COLOR=50:25:175 CINT=5 GRTN=25 MAGN VKNT BKNT color=100:0:200 stor=4 ssum=2:3 stor=3 wind h500 stor=2 smlc=1:-1 stor=1 wind hsfc

Re: Vector Help

Posted: Tue Jul 10, 2018 12:44 pm
by MMWeather
Thanks, I had tried sdif in previous scripts...but did not have a lot of confidence in some of the results I rec. And Thanks for all of the scripts you have provided over the years, many of scripts on the 2018 scripts post are yours. Thanks again!
P19