[gradsusr] Scatter plot

Jennifer Adams jma at cola.iges.org
Thu Apr 4 15:29:51 EDT 2013


You can interpolate the data from the second file to the grid of the first file using the lterp function:

set gxout scatter
d var.1; lterp(var.2,var.1)

--Jennifer



On Apr 4, 2013, at 2:26 PM, James T. Potemra wrote:

> Mary:
> 
> If you open one file, and do a "q dims", you should see all the dimensions.  Do you get the
> exact same thing for both files (range and resolution, including for time)?   If not, you may 
> have to interpolate one to the other.
> 
> Jim
> 
> On 4/4/13 12:34 AM, Mary Ndlovu wrote:
>> Hi. 
>> 
>> These are both .nc files. I think it has got to do something with the grids (thanks for the heads up)... I figured out that the original grids were 
>> file 1: Xsize = 360  Ysize = 180  Zsize = 1  Tsize = 1715
>> file 2: Xsize = 720  Ysize = 360  Zsize = 1  Tsize = 1320
>> 
>> Now i have since converted these to a T42 Gaussian grid, which means i get for both 
>> Xsize = 128  Ysize = 64  Zsize = 1 
>> 
>> But now i get an error telling me that 
>> Error plotting scatter plot:  Invalid grids
>>    The two grids have difference scaling. I am out of ideas now.
>> 
>> Mary Ndlovu
>> maryndlovu at aol.com
>> 
>> 
>> -----Original Message-----
>> From: James T. Potemra <jimp at hawaii.edu>
>> To: GrADS Users Forum <gradsusr at gradsusr.org>
>> Sent: Wed, Apr 3, 2013 10:44 pm
>> Subject: Re: [gradsusr] Scatter plot
>> 
>> Mary:
>> 
>> This is likely because the two variables are on different grids.  The file with SST is loaded first, and the RF file probably has a different definition for x/y/z/t.  If you can't sort it out try send the associated ctl files.
>> 
>> Jim
>> 
>> On 4/2/13 11:22 PM, Mary Ndlovu wrote:
>>> 
>>> Hi, 
>>> 
>>> Please help me. I am trying to plot a scatter plot from 2 different files. The 2 variables are sst; rf... so file 1 has sst, file 2 has rf. So when i do
>>> 'd sst ; rf.2'
>>> i get an error message 
>>> Data Request Error: Invalid grid coordinates
>>>   World coordinates convert to non-integer grid coordinates
>>>     Variable = rf.2  Dimension = 0 
>>>   Error ocurred at column 1
>>> DISPLAY error:  Invalid expression 
>>>   Expression = rf.2
>>> 
>>> I have tried to convert the file to be grads friendly... when i deal with this file on its own, everything works fine... but in the scatter plot it doesn't seem to work
>>> 
>>> I have converted the grid 
>>> 
>>> 
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>> 
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>> 
>> 
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> _______________________________________________
> 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130404/b5832de1/attachment-0003.html 


More information about the gradsusr mailing list