colormaps and file formats

From: Derrick Snowden (Derrick.Snowden AT noaa.gov)
Date: Wed Jan 12 2005 - 07:51:59 MST


Hi all,

I'm interested in writing a conversion script to convert GMT style *.cpt
colormap files to a file format useable by NCL and PyNGL. First of all, has
anyone already done this? If so are you willing to share? There are some
good default colormaps in GMT and there is a great site (cpt-city at
http://craik.shef.ac.uk/cpt-city/index.html) with hundreds of user
contributed extensions. A script to go between these different file formats
would be very useful. I have a few questions as I'm getting started...

1. NCL/PyNGL ships with colormaps in the $NCARG_ROOT/lib/ncarg/colormaps
directory. In my installation, I have *.ncmap, *.gp and *.rgb files. For
some colormaps there are multiple file type versions of the same map. Which
is the preferred file format and why? Is there a trick to the format or are
they just rgb (0-255) triplets on each line?

2. If I remember correctly, the first entry in the colormap is the default
background color, and the second entry is the default foreground color.
Which index entry provides the default color for the various fill colors such
as the land fill and the inland waters filll? I constantly screw that up.
If one uses the resource gsnSpreadColors = True, are the
foreground/background colors used or not?

3. Where, other than $NCARG_ROOT/lib/ncarg/colormaps, can these files be
stored so they are available in scripts? If I'm using a network installation
of ncl and don't have write permission in the directory above?

4. What is a good rule of thumb for the length of a colormap, given that one
can interpolate etc? (For this purpose I am talking about colormaps used for
continuous variables not categorical variables.)

Thanks for any help you can give...

Best,
Derrick

-- 
Derrick Snowden
PhOD/AOML/NOAA
4301 Rickenbacker Causeway
Miami, FL 33149
Office: 305.361.4322  Fax: 305.361.4392
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Thu Jan 13 2005 - 07:43:33 MST