[Thread Prev][Thread Next][Index]

Re: netCDF variable name problem



Hi Steve and LAS users,

I have encountered a variation of the problem described in the appended
message (from 2/1/2001) , which was solved using an initialization script
per Steve's suggestion.

In my new case the variable has one of the prohibited variable names (T),
but the difference seems to be that the LAS (5.0) is serving it from a
DODS Ag  server. Creating an init script does not seem to work in this
situation.

Here is the xml fragment I created for the variable:

   <t_fake units="K" name="temperature"
url="http://dataportal.ucar.edu:8080/dodsC/local/CCSM/csm/b20.007/atm/data/fields/T";>
    <link match="/lasdata/grids/CCSM_lon_lat_lev_time_grid"/>
      <properties>
        <ferret>
        <init_script>init_t</init_script>
        </ferret>
      </properties>
   </t_fake>

--------------------------------
   
Here is the init script:

def var/title="temperature" /units="K" t_fake = 'T'

--------------------------------------

Here is all that I get in GenericLAS_debug.txt:

Browser = Mozilla/4.78 [en] (X11; U; Linux 2.2.19-6.2.7smp i686)

Dumping config file
cache : 1
error_file : log/errors
ferret_ps_args : -server -batch
log_file : log/access
output_directory : output/
custom_include : custom
which_ferret : /usr/local/ferret/bin//ferret
ferret_args : -gif -server
debug_file : log/GenericLAS_debug.txt
output_alias : /las5-output/
Got XML request:
<?xml version="1.0"?><lasRequest href="file:las.xml"><link
match="/lasdata/operations/shade"
/><properties><ferret><format>shade</format><size>.5</size></ferret><ui><varname>temperature</varname><dsetname>CCSM</dsetname><view>xy</view><configid>0</configid></ui></properties><args><link
match="/lasdata/datasets/CCSM/variables/T"></link><region><range type="x"
low="-180.0" high="180.0"/><range type="y" low="-87.8637988392326"
high="87.8637988392326"/><point type="z" v="3.54463800000002"/><point
type="t" v="18-Jan-0350"/></region></args></lasRequest>

--------------------------

Here is what the apache error log says:

[Thu May 16 16:58:40 2002] [error] [client 128.117.10.111] Premature end
of script headers: /usr/local/las/las5/server/LASserver.pl
Can't find match target '/lasdata/datasets/CCSM/variables/T' at 'T' at
../xml/perl/LAS.pm line 559
[Thu May 16 17:04:17 2002] [error] [client 128.117.10.111] Premature end
of script headers: /usr/local/las/las5/server/LASserver.pl

-------------------------

See the temperature variable for dataset CCSM at
http://dataportal.ucar.edu/las5/.

The DODS Ag Server is at http://dataportal.ucar.edu:8080/dodsC.

Thanks for any light you can shed on this. 
 -dave brown
 dbrown@ucar.edu



On Fri, 2 Feb 2001, Steve Hankin wrote:

> 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