[Thread Prev][Thread Next][Index]

Re: how to define a 3-D variable



Hi Boyin,
Perhaps the best idea is for you to make your own version of the poly_vectors.jnl
script, and define a thinner arrow head. You can find the script with the Unix
command "Fgo poly_vectors". Copy it to your own journal script directory,
and rename it to for instance, poly_vectors_thin.jnl in which you change the
value of the arrowhead width. Find the lines

! arrow head half-width (inches)
let arrow_hd_half_wd = if (arrowhead_draw eq 0) then 0.05 else 0
and change 0.05 to a smaller number, say 0.03.

The repeat command you tried does not work to fill a 3-D variable with
numbers; because of the way Ferret makes variable definitions. What you
have computed is the value for just the last iteration of the REPEAT. You
could define a more complex mask to define the variable vv, or one can
draw the kind of plot you want with overlays:

use coads_climatology
set reg/l=1
vec/color=blue (if sst lt 15 then uwnd), (if sst lt 15 then vwnd)
go fland
vec/over/color=green (if sst lt 20 and sst gt 15 then uwnd), (if sst lt 20 and sst gt 15 then vwnd)
vec/over/color=purple (if sst lt 25 and sst gt 20 then uwnd), (if sst lt 25 and sst gt 20 then vwnd)
vec/over/color=red (if sst gt 25 then uwnd), (if sst gt 25 then vwnd)

(Of course this can be cleaned up with a new title, and vector/nolabel commands).
This is not as satisfactory as using a version of poly_vectors.jnl, since the /COLOR=
option for the vector command has so few choices of colors.

Ansley

Boyin Huang wrote:

Dear ferreters:


The purpose is to control vector colors using vector
routine (poly_vector routine is not good due to wide
arrow head).

Assume I have velocity V(x,y), I wish to separate it
into a 3-D field VV(x,y,t) according to the 3rd
variable (say SST). If I can do this, I will be able
to plot series vector/over plot with different colors.

Here is what I did:

----------------------------------------
DEFINE AXIS/t=1:10:1/unit=none naxis

repeat/range=1:10/name=m (let/t=`m` vv = if (sst gt
`m`) then v)

list vv[t=1]
list vv[t=10]
----------------------------------------
The listed values of vv[t=1] and vv[t=10] are same.

I guess the problem is "let/t=..."
Is there any way to define a new variable with
additional dimension?

Thanks

=====
Boyin Huang
The Center for Research on the Changing Earth System (CRCES)
10211 Wincopin Circle, Suite 240
Columbia, Maryland 21044
Tel. 410-992-5300/19 (O), 410-461-9339(H) Fax. 410-992-5944, Email. byh@crces.org http://byh.crces.org



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement