As described in the How to run NCL section of the NCL user environment module, one of the ways of running NCL is in batch mode. This involves creating and running NCL scripts.
ncl < my_ncl
The NCL interpreter will proceed to interpret, in sequence, each NCL statement in the input script. If you want NCL to check the entire script for syntax errors before proceeding, make the entire script an NCL block by surrounding it with a begin at the start and an end at the end. Most of the example NCL scripts illustrate this usage of NCL blocks.
load "file_name"
where file_name contains an NCL script. This can be any valid NCL script, but frequently the load statement is used to include independently-defined NCL functions and procedures. The file name argument to the load statement must be a string literal.
Suppose file1 contains the single NCL statement:
a = 5
and file2 contains the statements:
load "file1" print(a)
then executing
ncl < file2
produces the result:
Variable: a Type: integer Total Size: 4 bytes 1 values Number of Dimensions: 1 Dimensions and sizes: [1] Coordinates: (0) 5
NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?