[gradsusr] defined variables

Semyon Grodsky senya at atmos.umd.edu
Thu Jul 29 14:04:46 EDT 2010


Jennifer,
"When you 'set lat 0', GrADS returns (LAT set to 0.5)"
This means that grads sets lat to the nearest grid point, so that grid 
index is always integer.

Below is 'q dims' response after setting 
lon and lat (see my previous e-mail).

ga-> q dims
Default file number is: 1
X is fixed     Lon = 0.5  X = 1
Y is fixed     Lat = 0.5  Y = 91
Z is fixed     Lev = 0  Z = 1
T is fixed     Time = 00Z01NOV1981  T = 1
ga-> d temp(y=91)
Result value = 26.837

ga-> d temp(y+0)
Data Request Error: Invalid grid coordinates
   World coordinates convert to non-integer grid coordinates
     Variable = temp  Dimension = 1
   Error ocurred at column 1
DISPLAY error:  Invalid expression
   Expression = temp(y+0)

I expected that in this case temp(y=91) and temp(y+0) should be the same. 
But GRADS 'doesn't like' temp(y+0) for defined variables.

If COLA has limited resources (if any) to support earlier versions of 
GRADS, it should be explicitly noted on the GRADS web site. For an 
exmaple, we could consider insertion the version number into the subject 
line, so the GRADS team will simply ignore old version querries. But, 
1.9b4 is the latest COLA version that supports UDFs.

Lets consider this particular querry closed.

Thanks,
--Senya


On Thu, 29 Jul 2010, Jennifer Adams wrote:

> Sorry, but I cannot reproduce this result at all. And even if there is a 
> problem in v1.9, the first thing I'm going to say is try it in v2.0, because 
> I'm not actively supporting v1.9 anymore.
>
> The error message you're getting is that the world coordinate for dimension 
> 1, that's  Y, doesn't convert to an integer grid coordinate. When you 'set 
> lat 0', GrADS returns (LAT set to 0.5). Try setting a lat value that exactly 
> matches a grid coordinate value and see if you get the same message.
> --Jennifer
>
> On Jul 29, 2010, at 12:46 PM, Semyon Grodsky wrote:
>
>> Jennifer,
>> I just open file (Reynolds and Smithh OI v2 SST),then define TEMP for the
>> entire spatial field at t=1 (see below).
>> Thanks,
>> --Senya
>> -------------------------------------
>> /data/arctic1/senya/SODA224> gradsnc
>> 
>> Grid Analysis and Display System (GrADS) Version 1.9b4
>> Copyright (c) 1988-2005 by Brian Doty and IGES
>> Center for Ocean-Land-Atmosphere Studies (COLA)
>> Institute for Global Environment and Society (IGES)
>> GrADS comes with ABSOLUTELY NO WARRANTY
>> See file COPYRIGHT for more information
>> 
>> Config: v1.9b4 32-bit little-endian readline sdf/xdf netcdf lats printim
>> 
>> Issue 'q config' command for more information.
>> 
>> Landscape mode? (no for portrait):
>> GX Package Initialization: Size = 11 8.5
>> ga-> open sst_month.ctl
>> Scanning description file:  /mnt/data/senya/pacific/sst/sst_month
>> Data file /mnt/data/senya/pacific/sst/sst_month_v2_%y4.dat is open as file
>> 1
>> LON set to 0 360
>> LAT set to -89.5 89.5
>> LEV set to 0 0
>> Time values set: 1981:11:1:0 1981:11:1:0
>> 
>> *sst is original variable from VARS in sst_month.ctl
>> *temp is defined variable
>> 
>> ga-> temp=sst
>> Define memory allocation size = 260640 bytes
>> 
>> ga-> set lat 0
>> LAT set to 0.5 0.5
>> ga-> set lon 0
>> LON set to 0.5 0.5
>> 
>> ga-> d sst(y+0)
>> Result value = 26.837
>> 
>> ga-> d temp(y+0)
>> Data Request Error: Invalid grid coordinates
>>  World coordinates convert to non-integer grid coordinates
>>    Variable = temp  Dimension = 1
>>  Error ocurred at column 1
>> DISPLAY error:  Invalid expression
>>  Expression = temp(y+0)
>> ga->
>> 
>> 
>> 
>> On Thu, 29 Jul 2010, Jennifer Adams wrote:
>> 
>>> Senya --
>>> I cannot reproduce this error with version 1.9 or 2.0. Did you change the
>>> default file or the X dimension environment between issuing your define
>>> command to establish tempnew and your display request. What exactly are 
>>> you
>>> trying to accomplish with the expression temp(y+0) ?
>>> --Jennifer
>>> 
>>> 
>>> On Jul 28, 2010, at 11:43 AM, Semyon Grodsky wrote:
>>> 
>>>> Dear experts,
>>>> suppose TEMP is a variable of an open file.
>>>> I define new variable
>>>> 
>>>> TEMPNEW=TEMP
>>>> 
>>>> set x 1
>>>> set y 1
>>>> set z 1
>>>> set t 1 last
>>>> 
>>>> the following command works OK
>>>> d temp(y+0)
>>>> 
>>>> but
>>>> 
>>>> d tempnew(y+0)
>>>> 
>>>> returns error
>>>> World coordinates convert to non-integer grid coordinates
>>>> Variable = tempnew Dimension = 0
>>>> 
>>>> What is wrong?
>>>> GRADS 1.94 on LINUX machine
>>>> 
>>>> Thanks
>>>> --Senya
>>>> 
>>>> -----------------------------------------------------------
>>>> Semyon Grodsky
>>>> Computer and Space Science Building (Bldg. #224), Room 2409
>>>> Department of Atmospheric and Oceanic Science
>>>> University of Maryland
>>>> College Park, MD 20742
>>>> 
>>>> Phone:  301-405-5330
>>>> Fax:    301-314-9482
>>>> E-mail: senya at atmos.umd.edu
>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>> 
>>> --
>>> Jennifer M. Adams
>>> IGES/COLA
>>> 4041 Powder Mill Road, Suite 302
>>> Calverton, MD 20705
>>> jma at cola.iges.org
>>> 
>>> 
>>> 
>> 
>> -----------------------------------------------------------
>> Semyon Grodsky
>> Computer and Space Science Building (Bldg. #224), Room 2409
>> Department of Atmospheric and Oceanic Science
>> University of Maryland
>> College Park, MD 20742
>> 
>> Phone:  301-405-5330
>> Fax:    301-314-9482
>> E-mail: senya at atmos.umd.edu
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer M. Adams
> IGES/COLA
> 4041 Powder Mill Road, Suite 302
> Calverton, MD 20705
> jma at cola.iges.org
>
>
>

-----------------------------------------------------------
Semyon Grodsky
Computer and Space Science Building (Bldg. #224), Room 2409
Department of Atmospheric and Oceanic Science
University of Maryland
College Park, MD 20742

Phone:  301-405-5330
Fax:    301-314-9482
E-mail: senya at atmos.umd.edu



More information about the gradsusr mailing list