Re: colormap confusion - continent color & colormap options

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 25 Aug 2008 14:58:07 -0600

Hi Leslie,

This is indeed confusing. There are nine original colormaps
associated with NCL that are actually built into the software, rather
than being separate ASCII files that get loaded. The three that you
mentioned fall into this category. I've included the source file that
contains the values for these three colormaps. Look for "static
NhlColor gscyclic", "static NhlColor gsld", and static NhlColor gsdl.

--Marhy

On Aug 25, 2008, at 2:01 PM, Leslie Hartten wrote:

> I am new to NCL and trying to start simple, by drawing a base map
> of the tropical Atlantic. I am playing with color tables because
> (1) I want to have a very light grey lat/lon grid and (2) I'm going
> to want to put things on the base map eventually. I'm using NCL
> v5.0.1 on a Mac OSX system on which I have no adminstrator
> priviledges. I've got 1 question and 1 problem.
>
> The question: When I look in my $NCARG_ROOT/lib/ncarg/colormaps,
> I do not see any of the following gray scale colormaps: gsdtol,
> gsltod_default, gscyclic (c.f. www.ncl.ucar.edu/Document/Graphics/
> ColorTables/grayscale_gr.shtml). Why is this? are they kept
> somewhere else?
>
> The problem: Given the following key lines of code:
> =====
> wks = gsn_open_wks("ps","TropAtlantic")
>
> ; gsn_define_colormap(wks,"gui_default") ; *.rgb file
> ; gsn_define_colormap(wks,"rainbow+gray") ; *.gp file
> ; gsn_define_colormap(wks,"so4_23") ; *.gp file
> ; gsn_define_colormap(wks,"amwg") ; *.rgb file
>
> map = gsn_csm_map_ce(wks,mpres)
> =====
> - when I run this code with no call to gsn_define_colormap (thus using
> *wkColorMap : rainbow+gray
> from my .hluresfile, I get grey land and a white ocean.
>
> - when I run this code with gsn_define_colormap(wks,"gui_default"),
> an ncolors=24 rainbow with no gray, I get no visible land and a
> white ocean.
>
> - when I run this code with an explict call matching
> my .hluresfile, gsn_define_colormap(wks,"rainbow+gray"), I get grey
> land and a white ocean.
>
> - when use gsn_define_colormap(wks,"so4_23"), another small
> (ncolors=25) rainbow with no gray, I get light pink land and a
> white ocean! I printed the output and the color table from
> www.ncl.ucar.edu, and it looks to me as if the land is color #23
> (251,211,251).
>
> - when use gsn_define_colormap(wks,"amwg"), one more small
> (ncolors=18) rainbow with no gray, I get powder blue land.
> Comparing printed plot & color table, it looks like color #6
> (176,224,230).
>
> What's going on? The documentation for gsn_csm_map_ce says "the
> following will happen automatically: the continents will be colored
> gray ...". Is this only true if the colormap in play has a gray?
> If I want to plot something using a grey-free colormap on top of
> gray continents, do I need to switch colormaps midstream?
>
> Cheers,
> Leslie
> --
> Dr. Leslie M. Hartten
> CIRES, Univ. of Colorado email: Leslie.M.Hartten_at_noaa.gov
> 216 UCB web: http://cires.colorado.edu/
> ~hartten
> Boulder CO 80309-0216 phone: (303)497-7052 fax: 497-6181
> --
> Disclaimer: The contents of this message are mine personally and
> do not necessarily reflect any position of the Government of the
> United States of America, the National Oceanic and Atmospheric
> Administration, or the University of Colorado.
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Mon Aug 25 2008 - 14:58:07 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 25 2008 - 15:23:45 MDT