[Thread Prev][Thread Next][Index]

Re: [ferret_users] non-standard variable names - inconsistent behavior (version 6.7)



Hi Hella,
I think it'll see the variable if you specify it in upper-case.

   yes? list `'ABC',return=isize`

This is not quite what's described in the documentation,
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/VARIABLES#_VPINDEXENTRY_filevars

where if the file variable is lower-case, what you showed should work. So we'll look into that.

Ansley

On 3/8/2013 5:43 AM, Hella Riede wrote:
Dear ferreters,

I have come across an inconsistent behavior for non-standard variable names:

I load a file into ferret, which introduces non-standard variable names, i.e. including a dash as in 'N4-12'. I know these variable names can be often handled by enclosing them in single quotes:

yes? list `N4-12,return=lsize`
 **ERROR: variable unknown or not in data set: N4

yes? list `'N4-12',return=lsize`
             VARIABLE : constant
          3498.

However, this does not work for standard variable names:

yes? let abc = 2
yes? list `abc,return=isize`
             VARIABLE : constant
          1.000

yes? list `'abc',return=isize`
 **ERROR: variable unknown or not in data set: 'abc'


Thus, I need to figure out first for each variable whether it has a standard name or not to decide whether I need to use single quotes. It would be more consistent and convenient to be able to enclose any variable name - standard or not - in single quotes. Sorry if this has already been fixed since version 6.7.

Greetings,
Hella



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement