Saturday, May 3, 2014

Script:; very easily create elegant color scales for your plots using GrADS

Version 2

If you are a frequent visitor to this site you probably know that I focus a lot of my effort into color scales.  I often reference the script as a must have script in ones script library.  I have additionally added the script to the script library for use with common remote sensing color scales.  This script here is similar to, but different in the sense that it gives the user control as to what number scale the color map will be set to. currently includes 21 color scales (with the option of reversing them).  These scales are shown below.

Colorscales included in

Optional Arguments for
  • -demo             - Pulls up Demo page
  •  -flipped          - Reverses direction of color scale
  •  -name/map     - chooses colormap
  •  -levels/l          - sets scale: max min int
  • -help                - Pulls up help page (includes full list of color maps)

Example: Open WRF data and plot the 2 meter dew point using the  reversed "ocean" color map

  'set gxout shaded'
  'set mpdset hires'
  ' colormaps -flipped -l 265 310 1 -map ocean'
  'd dpt2m'


This series of commands will produce the following image.

2m Dew Point using "Ocean" colormap

This is the first version, so check for bugs and please report any you find!