variable names with Upper case in dtype netcdf

Don Hooper hoop at COLORADO.EDU
Fri Feb 11 16:54:31 EST 2005


Diane Stokes,

You did not share your DDF file.  I'm wondering if it took advantage
of something explained at:
        http://grads.iges.org/grads/gadoc/descriptorfile.html#VARS
When you declare a variable, you can say SDFname=>GrADSname (there
is a similar feature in xdfopen-style DDFs).  So, you could map
convU to convu there, so that in GrADS' name space, where everything
gets lowercased, you could still get at convU by referring to it
as "convu".

-Hoop
> From owner-gradsusr at LIST.CINECA.IT  Fri Feb 11 14:42:18 2005
> From: Diane Stokes <Diane.Stokes at NOAA.GOV>
>
> Hi,
>
> I'm running GrADS 1.9b3 on both IBM AIX and SGI.
>
> We have a netcdf file with about 17 variables.  The new "dtype netcdf"
> can handle all but one, convU, apparently because there is an upper case
> letter in the variable name:
>
> ga-> d convU
> Data Request Error:  Error for variable 'convu'
>    Error ocurred at column 1
> DISPLAY error:  Invalid expression
>    Expression = convu
>
> I get the same msg whether I call it "convU" or "convu" at the grads
> prompt or in the ctl file.
>
> Following is the just that section from ncdump -c:
>
>          float convU(Time, Surface, yt_j, xt_i) ;
>                  convU:long_name = "convergence of H*ubar" ;
>                  convU:units = "cm/s" ;
>                  convU:valid_range = -300000.f, 300000.f ;
>                  convU:missing_value = -1.e+34f ;
>                  convU:_FillValue = -1.e+34f ;
>
> When I regenerate the file calling that variable "convu" instead of
> "convU", grads can display the variable.  (Note, grads does not have an
> issue with the upper case in "Time" and "Surface").
>
> However, I can successfully display the variable by opening the original
> netcdf file using sdfopen or by opening a ddf with xdfopen.  So, it
> seems it is just an issue with perhaps the "open" or "dtype netcdf"
> section of the code.
>
>
> Am I doing something wrong, or is this just a slight oversight in the code?
>
> In this case, we are not in a rush for a resolution because convU isn't
> an important parameter to us.  But it would be good to know for future
> reference (in the case of a more critical parameter).
>
> I'll provide a sample file or full "ncdump -c" output if it will be useful.
>
> Best Regards,
>    Diane Stokes
> --
> Diane Stokes
> Environmental Modeling Center
> National Weather Service/NOAA



More information about the gradsusr mailing list