Merges two color maps and sets this as the color map for the given workstation.
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" procedure gsn_merge_colormaps ( wks  : graphic, color_map1 , color_map2 )
This procedure merges two color maps and sets this as the new color map for the given workstation.
Note: this procedure must be used if you have NCL V6.0.0 or earlier, and want to use more than one color map per page of graphics. If you have V6.1.0 or later and are drawing color contours, vectors, or streamlines, then you can associate a color map directly with a contour, vector, or streamline plot using these special resources: cnFillPalette, vcLevelPalette, and stLevelPalette.
If the second color map is a list of RGB values or a predefined color map, then the foreground and background colors will be dropped from this color map before it is appended to the first color map. If the second color map is a list of named colors, then all of the named colors will be appended.
Since there's a limit of 256 colors in a color map associated with a workstation, the sum total of colors in the two color maps must be less than or equal to 256.
You can use the gsn_draw_colormap procedure to draw the color map (mostly for debugging purposes).
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" begin wks = gsn_open_wks("ncgm","gsn_merge_colormaps") ;---Merge two pre-defined colormaps; gsn_merge_colormaps(wks,"rainbow","gsdtol") gsn_draw_colormap(wks) ;---Generate grayscale color map. gcmap = new((/11,3/),float) gcmap(:,0) = ispan(0,10,1)/10. gcmap(:,1) = gcmap(:,0) gcmap(:,2) = gcmap(:,0) ;---Append grayscale map to the end of a Blue-White-Red color map. gsn_merge_colormaps(wks,"BlWhRe",gcmap) gsn_draw_colormap(wks) end