# Re: [ferret_users] Vector plot: force maximum?

```Hi Billy,

```
Thanks for your points. This exercise actually is an attempt to *not* generate false data. My first (lame) thought when the other researcher asked me about this was to create separate NetCDF files that scaled back the out of range data. Of course this was immediately shot down by all (including myself) for a number of reasons. My second thought was doing a log plot but she really wanted it to be linear up to the threshold. So, I started exploring with Ferret.
```
```
I think Mick's solution will address your concerns too. Having the scaled-back values be in red will make them stand out and open to question if we ever forget what we did.
```
Cheers,

Steve
______________________________________________________________________
Steve Cousins, Ocean Modeling Group    Email: cousins@xxxxxxxxxxxxxx
Marine Sciences, 452 Aubert Hall       http://rocky.umeoce.maine.edu
Univ. of Maine, Orono, ME 04469        Phone: (207) 581-4302

On Tue, 5 May 2009, William S. Kessler wrote:

```
```Whether or not that works (I haven't looked at your code in detail),
generating false data seems a bad idea. What if you forgot that's what
you were doing? What if the audience at a talk or reader of a paper
missed that crucial point? What if you computed any further statistics
using the false data?

I would do one of three things:
1. plot the log of the data (or the square root, not uncommon in
plotting vectors with a large range of values)
2. use your mask to blank out the too-high data: the holes are real.
3. use PLOT/VLIMITS to limit the height of a (line) plot

One man's opinion.

Billy K

On May 5, 2009, at 11:08 AM, Steve Cousins wrote:

```
```
Long time!

I have a dataset with U and V velocity components. There is a river
that comes into the domain that has high values that I want to
limit. What I have done so far is:

let wind_mask = IF ABS( (u^2 + v^2)^.5) LT .08 THEN 1
let u2 = u * wind_mask
let v2 = v * wind_mask

vector/xskip=2/yskip=2 u2,v2

This works but it puts holes in the data. What we'd like is to have
it so if a speed is greater than 8 cm/sec we scale it down to 8 cm/
sec so the grid doesn't have holes in it and we can still see the
direction.

need something like:

let wind_mask = IF ABS( (u^2 + v^2)^.5) LT .08 THEN 1 ELSE
(.08 /  ABS( (u^2 + v^2)^.5))

... testing ...

It works! Ferret is Great! Hold on. I think it is working. It fills
in the gaps. It *looks* like the scaling is correct...

Is there a better way to do this?

Thanks,

Steve
______________________________________________________________________
Steve Cousins, Ocean Modeling Group    Email: cousins@xxxxxxxxxxxxxx
Marine Sciences, 452 Aubert Hall       http://rocky.umeoce.maine.edu
Univ. of Maine, Orono, ME 04469        Phone: (207) 581-4302
```
```

```
```
```
```
```