Return to Ferret FAQ


Reserved keywords


Question:

What variable names conflict with Ferret's reserved keywords?

Example:

yes? use my_data.nc
yes? show data
currently SET data sets:
1> ./my_data.nc (default)
name title I J K L
T SEA SURFACE TEMPERATURE 1:180 1:90 ... 1:1

yes? shade T
**ERROR: dimensions improperly specified: 9999999 words were requested.
*** NOTE: Check for unspecified limits on an ABSTRACT axis
*** NOTE: Use the SHOW GRID command to see the axes

Explanation:

Ferret has a small set of absolutely reserved keywords. If Ferret encounters a variable who's name is an absolutely reserved keyword an error will result. The only absolutely reserved names are the pseudovariables I, J, K, L, X, Y, Z, T, XBOX, YBOX, ZBOX, TBOX and operators AND, OR, GT, GE, LT, LE, EQ, NE. Ferret does not distinguish between upper and lower case.

It turns out that you CAN legally redefine other names and keywords, like this (a good way to confuse the innocent!)

  yes? LET plot = sin(x[gx=sst])
  yes? PLOT plot

Solution:

Two basic possibilities exist for addressing this problem.

  1. In your Ferret expression, use single quotes around the variable name. (Note that variable names become case sensitive when surrounded by single quotes.)
  2. Outside of Ferret, rename the variable using the netCDF operator named ncrename. (e.g. "ncrename -v T,TEMP my_file.nc")

 


Jonathan Callahan: Jonathan.S.Callahan@.noaa.gov
Last modified: April 03, 2003