[Thread Prev][Thread Next][Index]

Re: [ferret_users] Vector plot: force maximum?



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.

Thinking about this as I type (don't try this at home!) I think I 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



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement