[Thread Prev][Thread Next][Index]

problem variable names in LAS/Ferret




Hi Jon et al,

(Jon, this continues a discussion we had at the DODS meeting.)

Using earlier versions of LAS/Ferret, when I encountered problems
with NetCDF variable names that were  problematic in Ferret because they
clashed with reserved symbol names, I was advised to work around the
problem using an init script. The file in question has a variable called
"NE". Prior to LAS 6.x, by changing the variable name to 'fake_ne' in
the xml file and setting the ferret init_script property to point
to a script with the following contents:
----------------------------------
def var/title ="ELECTRON DENSITY"/units="CM^3" fake_ne = 'NE'
----------------------------------
Ferret would handle the variable properly.

Now however, using LAS 6.1, I get this error:
----------------------------------------
LAS Error
The following error message was received from LAS:

Adding an acceptable error string: "*** NOTE: ".
 	NOAA/PMEL TMAP
 	FERRET v5.41  
 	Solaris 5.8 - 09/18/02
 	25-Mar-03 17:41     

yes? cancel mode verify
yes? cancel mode interp
yes? canc data/all
yes? go init_ne "/home/dbrown/tiegcm/pyrb001.nc" "1" "1" "fake_ne"
yes? set axis/modulo `fake_ne[d=1],return=xaxis`
 **ERROR: unknown data set: D=1

-----------------------------------------------------
Although some variable names that used to cause problems (e.g. "Z")
now work without an init script, "NE" does not. Ferret complains
as follows: 
----------------------------------
Adding an acceptable error string: "*** NOTE: ".
 	NOAA/PMEL TMAP
 	FERRET v5.41  
 	Solaris 5.8 - 09/18/02
 	25-Mar-03 17:51     

yes? cancel mode verify
yes? cancel mode interp
yes? canc data/all
yes? go std_initialize "/home/dbrown/tiegcm/pyrb001.nc" "1" "1" "ne"
 *** NOTE: Units on axis "lev" are not recognized: ln(p0/p)
 *** NOTE: They will not be convertible:
 *** NOTE: Units on axis "mlev" are not recognized: ln(p0/p)
 *** NOTE: They will not be convertible:
yes? set axis/modulo `ne[d=1],return=xaxis`
yes? set
region/x="180":"540"/y="-87.5":"87.5"/z="-7":"-7"/t="01-Jan-1993":"01-Jan-1993"
yes? set win/size=.5
yes? set win/asp=0.729166666666667
yes? GO "/tmp/lasgo278911946537.jnl"
 **ERROR: command syntax: ne
          ne may not start an expression
DEFINE VARIABLE STRIDE_istart = `ne,return=istart`
Command file, command group, or REPEAT execution aborted
---------------------------------------

By modifying the script "stride_create_symbols.jnl", I can get a plot.
I changed:
-----------------------------
let STRIDE_istart = `$1,return=istart`
let STRIDE_iend   = `$1,return=iend`
let STRIDE_iincr  = int((STRIDE_iend-STRIDE_istart)/$2)

let STRIDE_jstart = `$1,return=jstart`
let STRIDE_jend   = `$1,return=jend`
let STRIDE_jincr  = int((STRIDE_jend-STRIDE_jstart)/$3)
-------------------------------
to:
----------------------------------
let STRIDE_istart = `$1[d=1],return=istart`
let STRIDE_iend   = `$1[d=1],return=iend`
let STRIDE_iincr  = int((STRIDE_iend-STRIDE_istart)/$2)

let STRIDE_jstart = `$1[d=1],return=jstart`
let STRIDE_jend   = `$1[d=1],return=jend`
let STRIDE_jincr  = int((STRIDE_jend-STRIDE_jstart)/$3)
----------------------------------

It's interesting that this makes it work, but I don't expect
it's a real solution: it  most likely cause a problem when more
than a single dataset is involved.
 -dave
 dbrown@ucar.edu






[Thread Prev][Thread Next][Index]

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