[Thread Prev][Thread Next][Index]

Re: netCDF variable name problem

Hi Dave,

In the Users Guide (Ch3 Sec1.2. File variables -- or in the index "Variable /
names, invalid in NetCDF files") you'll find

     In some netCDF files the variable names are not consistent with
     Ferret's rules for variable
     naming. They may be case-sensitive (for example, variables "v" and "V"
     defined in the same file),
     may be restricted names such as the Ferret pseudo-variable names I, J,
     K, L, X, Y, Z, T,
     XBOX, YBOX, ZBOX, or TBOX, or them may include "illegal" characters
     such as "+", "-",
     "%", blanks, etc. To access such variable names in Ferret file simply
     enclose the name in single
     quotes. For example,

     yes? PLOT 'x'

I suggest that you handle this in LAS by creating an initialization script for
this data set which contains the single line

    LET valid_name = 'invalid_name'

and then configure LAS to use "valid_name". That way no further modifications to
scripts would be required.

    - steve

P.S. The procedures for creating initialization scripts have varied a bit between
LAS versions. Check back with las@pmel.noaa.gov if it is unclear how to create
'em in your version.


Dave Brown wrote:

> Hi,
> I have encountered a problem using LAS/Ferret to plot a particular
> variable from a group of netCDF file I have set up under LAS. The variable in
> question is named 'NE' in the netCDF file. The GenericLAS_debug.txt file
> reports the following:
> yes? GO "/tmp/lasgo167401535644.jnl"
>  **ERROR: command syntax: ne
>           ne may not start an expression
> CONTOUR/FILL/levels=30/set ne
> Command file, command group, or REPEAT execution aborted
> killing...Waiting for Ferret to exit...
> Ferret exited...
> So it appears that because 'ne' is a Ferret operator, it is not
> recognized as a variable name in this context. Is there a workaround for
> this problem short of rewriting all the netCDF files and giving the
> variable another name?
>  -Dave Brown
>  dbrown@ucar.edu


                |  NOAA/PMEL               |  ph. (206) 526-6080
Steve Hankin    |  7600 Sand Point Way NE  |  FAX (206) 526-6744
                |  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement