Graphics: NCL - Creating Scripts



You are now ready to create scripts to generate images. (Or view the example scripts to get you started.)

Below is the outline of a basic plot. Or view a detailed example.

load external functions and procedures

begin

; Open input file(s)
; Open graphical output
 
; Read variables
 
; Set up plot resources & Create plots
; Output graphics

end

 

Run NCL scripts

1. Ensure NCL is successfully installed on your computer.

2. Ensure that the environment variable NCARG_ROOT is set to the location where NCL is installed on your computer. Typically (for cshrc shell), the command will look as follows:

setenv NCARG_ROOT /usr/local/ncl

3. Create an NCL plotting script.

4. Run the NCL script you created:

ncl  NCL_script

The output type created with this command is controlled by the line:
wks = gsn_open_wk (type,"Output")    ;  inside the NCL script
where type can be x11, pdf, ncgm, ps, or eps

 

For high quality images, create pdf / ps or eps images directly via the ncl scripts (type = pdf / ps / eps)
  
See Tools for more information concerning other types of graphical formats and conversions between graphical formats.



Sample Scripts