This module discusses various tools for figuring out what went wrong
with an NCL program execution.
Most syntax error messages should be self-explanatory. Since NCL is
an interpreted language, syntax errors will not be reported until they
are encountered. However, if you want to have an entire NCL script
checked for syntax errors before execution, you can enclose the entire
script in a begin and end statement. That is, put a
begin at the beginning of the script and an end at the
end. This will make the entire script into an NCL
blocks are not executed until they are checked for syntax, the entire
NCL script will be checked for syntax before proceeding.
There is no high-level debugger for NCL like dbx. Most of the
time, the error messages issued by NCL will be enough to figure out what
the problem is. If not, you may want to use the NCL
The procedure print can be used to print, on the standard
output unit, values of any NCL
variable or data structure. When printing arrays, you may want to
take advantage of the ability to easily select subsets of the array.
This is discussed in the
NCL array subscripting
If you just want to print an informational message,
you can pass a string literal to print. For example:
print("Execution got to this point")
If you assign a value to an HLU resource in a resource file and that
change is not reflected in your plot, make sure that you have not
assigned a value to the resource in an NCL
statement, or in an NCL
statement. Values set in a create or setvalues
statement will take precedence over those set in a resource file.
The NCAR Graphics consulting staff is available via e-mail at
firstname.lastname@example.org. Installation consulting is available at
email@example.com. You can also send comments to us by simply clicking
on the Feedback icon (the one with the ear) in the control panel
that appears in every documentation module.
User Guide Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, UG Contents, UG WhereAmI?
$Revision: 1.7 $ $Date: 1998/06/15 22:08:58 $