[Thread Prev][Thread Next][Index]

Re: [ferret_users] ocean cooling palette recommended



Hi,

Here's a quick example using "RGB_Mapping_by_value"

First, you can make a palette file with the following (edited from blue_darkred.spk)

RGB_Mapping By_value ! First column is value (e.g. temperature anomaly) -18 14.2 0.0 85.0 -16 9.7 11.2 97.0 -14 16.0 34.2 100.0 -12 24.0 53.1 100.0 -10 34.0 69.2 100.0  -8 46.0 82.9 100.0 -6 60.0 92.0 100.0 -4 74.0 97.8 100.0 -2 92.0 100.0 100.0
0 100.0 100.0 92.0 2 100.0 94.8 74.0 4 100.0 84.0 60.0 6 100.0 67.6 46.0 8 100.0 47.2 34.0 10 100.0 24.0 24.0 12 97.0 15.5 21.0 14 85.0 8.5 18.7 16 65.0 0.0 13.0

Save this to something like "blue_darkred_by_val.spk" and put it in the directory where you run ferret (or have a dedicated directory and update $FER_PALETTE). Now start ferret:

yes? use coads_climatology
yes? palette blue_darkred_by_val
yes? fill sst[l=1]-sst[l=@ave] !Jan anomaly
yes? fill/lev=(-14,14,2) sst[l=1]-sst[l=@ave] !Centered levels
yes? go land
yes? set win 2
yes? fill/lev=(-14,4,2) sst[l=1]-sst[l=@ave] !Not centered, but colors for level X are same as in example 1
yes? go land

....Obviously defining your own palette colors can be a lot more powerful than this, but hopefully this gives some idea. (The only thing to remember is that RGB is specified as a percentage, rather than on the 0-255 scale).

Cheers,

Paul





On Apr 6, 2012, at 3:37 PM, jagadish karmacharya wrote:

Its not very clear what your question is.

I think central palette works only when there are equal number of levels on +ve and -ve sides. If you want to associate color with fixed value then one way may be to define palette associating data values (in the first column) with colors. I have not done it myself but see http://ferret.pmel.noaa.gov/Ferret/faq/palettes-for-out-of-bounds-data for some idea. But I guess these palettes has limitled utility as they work well only for the assigned data values.
 
Jagadish

From: Kelin Zhuang <kzhuang@xxxxxxxxxxxxxxxxx>
To: Ansley Manke <ansley.b.manke@xxxxxxxx>
Cc: "ferret_users@xxxxxxxx" <ferret_users@xxxxxxxx>; j_karmacharya@xxxxxxxxx
Sent: Friday, April 6, 2012 10:15 PM
Subject: Re: [ferret_users] ocean cooling palette recommended

Thanks for all reply.
I have a more specific question.
For example, if I use blue_darkred pal and if I use lev=(-5,5,0.5) then white is in the middle.However, If I still want white in the middle and all colors remain but the lev changes to (-5,2,0.5). How can I modify the blue_darkred.spk. Thanks!
Kelin
On 04/06/2012 12:51 PM, Ansley Manke wrote:
Hi Kelin,
A place to start is the FAQ, How can I choose a good color palette for my plot?

One thing that's not mentioned there is the  Fpalette command (from the Unix command line). Try

> Fpalette center

to find a list of the centered palettes that are in the Ferret distribution. And the main documentation has information about choosing color levels to go with a centered palette.  You'll want /LEV=c  or /LEV=vc, or a custom set of levels so that the middle level of the palette (white or a light color) is the color that represents values near zero.

Ansley

On 4/6/2012 12:09 PM, Kelin Zhuang wrote:
Dear Ansley and all,
Would you kindly recommend a palette for ocean cooling. The default rainbow pal seems not appropriate for a cold background. I prefer a zero change in the middle of white color and the coldest is blue and warmest is red. For example from -5C to 3C. Great thanks!
Kelin




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement