Re: Changing the colormap directory

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 09 2013 - 11:52:49 MDT

Hello Rodrigo,
NCARG_COLORMAP_PATH and NCARG_COLORMAPS are both environment variables that need to be set on the command line. The syntax needed depends on the shell you use.

The difference between these variables is that you can only specify one directory using NCARG_COLORMAPS, but you can specify multiple directories using NCARG_COLORMAP_PATH. Since what you want to do is add your own colormap to the currently available set of colormaps, you are correct that you should use NCARG_COLORMAP_PATH.
If you use a csh variant for your shell (tcsh, csh) then you should be able to execute the command just as you suggest (except you should use NCARG_COLORMAP_PATH and be sure to do this at the command line, not inside an NCL script). If on the other hand you use an sh variant (bash, ksh) then you would need to change the command to:

export NCARG_COLORMAP_PATH=/your/path/to/your/colormap:$NCARG_ROOT/lib/ncarg/colormaps

Once you are able to get this to take effect within a terminal environment, you can add the statement to your shell initialization script, which again depends on the shell you use. This will be a file in your home directory that you can only see using "ls -a". It will have a name like ".bashrc" or ".cshrc" or ".login".

Hope this helps.
 -dave

On Jul 8, 2013, at 3:12 PM, Rodrigo Colpo <rodrigocolpo2@yahoo.com.br> wrote:

> Dear all,
>
> I created a new colormap but I do not have authority to modify the default directory "$NCARG_ROOT/lib/ncarg/colormaps/". So, I need to change the default directory using NCARG_COLORMAP_PATH or NCARG_COLORMAPS. But it is not clear for me how to do it.
>
> There is two examples but how I understand them, they do not work. Should I use the following command in the command line?
>
> setenv NCARG_COLORMAPS /home/haley/colormaps:$NCARG_ROOT/lib/ncarg/colormaps
>
> Replacing the "/home/haley/colormaps" by my own directory?
>
> If I understand well the difference between the NCARG_COLORMAPS_PATH and NCARG_COLORMAPS, to use NCARG_COLORMAPS_PATH is probably a best option. But how does it work? Shoud I add some line in my script to use the given directory only to run this specific code?
>
> something like:
>
> NCARG_COLORMAP_PATH(/home/.../colormaps)
>
> or
>
> gsn_define_colormap(wks, NCARG_COLORMAPS_PATH("/home/.../colormaps/WhiteBlue100"))
>
> or
>
> NCARG_COLORMAPS_PATH="/home/.../colormaps:$NCARG_ROOT/lib/ncarg/colormaps"
>
> Or it is something I should write in the command line?
>
> Sorry, but this is not clear for me.
>
> Best wishes,
> Rodrigo
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 9 11:53:00 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 12 2013 - 16:37:39 MDT