Now, often times its nice to just put these scripts in the main GrADS folder, but I have a lot of my own scripts in there, so I made a separate sub-folder to contain these scripts, as they are often used in ALL of my other scripts, so it's nice to separate them. Just remember, if you do this, you will need to include to full file path in your GrADS script; e.g., your command would be: 'useful_scripts/script.gs' vs. 'script.gs'.
Colors and Color definition
- This script is a basic script that defines a number of different colors and color shades, greatly increasing your color options is included with the basic color set defined when you start the program.
- This is perhaps the most useful script for defining colors for GrADS available on the internet. This script makes it easy to construct detailed and continuous color scales without having to write out long and complicated lists using the 'set clevs' and 'set ccols' command. Color.gs can be used to make the plot below using the following set of commands:
|Surface temperature plotted on a continuous scale using color.gs|
- This script plots a very basic color bar either below, or to the right of your plot based on where you have the most available space. This is perhaps the simplest way to plot a color bar in GrADS as it does not require you to pass any additional information. However with simplicity comes limitations, more advanced color bar options will be addressed later on.
- Other basic color bar scripts include:
- While you certainly do not need all of these scripts in your library, they can certainly be useful from time to time
- This is another script from the folks who brought you color.gs, this script is very useful as it gives you nearly fully control of your color bar, from where it goes, to the type of ends it has, to how even text is plotted next to it, to whether or not it has lines, etc. As you may have guessed, the color bar plotted in the surface temperature image was made with xcbar.gs.
Other Useful Scripts
- This is another script from the group that developed color.gs and xcbar.gs. This script is very useful if you want to include "hatching" in your plots. This script is great, and includes a lot of versatility regarding the hatching style. I included an example image made using hatch.gs. The major disadvantage to this script is that it is obnoxiously slow. Therefore I don't recommend it for use with operational plotting (as this will take forever with more than one or two timesteps), but rather for making figures for papers or presentations.
Example of Hatched plot using hatch.gs
- Basemap.gs is great for plotting base maps (more on base maps here). This script (with associated .asc files) fills in land and water with different colors.