[gradsusr] error using tcorr

M.Mahakur mmahakur at tropmet.res.in
Thu Jun 4 12:09:53 EDT 2020


Thank you, Dear Jeff. 

I tried all before what you have suggested! 

var1 is 1440x721 and T =492 
var2 is 1x1 and T=492. 

What is happening is if I open var2 (binary) as 2nd file. I can display both variables (otherwise it does not). 
But, I found it takes var2 as 1440x721 with constant field! 
I may be wrong! But, to tackle this, I averaged var2 globally.. 

'set x 1' 
'set y 1' 
'set t 1 492' 
ave2=aave(var2,g). 

Then, tcorr worked. 

'set x 1 1440' 
'set y 1 721' 
'set t 1' 

d tcorr(ave2,var1,t=1,t=492) 

I got a spatial map, which makes some sense.. 

But, it might sound foolish ! 

With Best Regards, 
Mahakur 


From: "Jeff Duda" <jeffduda319 at gmail.com> 
To: "GrADS Users Forum" <gradsusr at gradsusr.org> 
Sent: Thursday, June 4, 2020 9:19:47 PM 
Subject: Re: [gradsusr] error using tcorr 

That error message doesn't seem to make much sense on first glance. 

Questions to guide your troubleshooting: 

-What are the dimensions of both var1 and var2? 
-Is this problem the result of using sdfopen for one field and open for the other? 
-Do you need to set the dimensions to the full domain before calling the tcorr function? That is, when you open the first file, the dimensions should automatically be set to the full domain, so setting them again may not only be unnecessary, but might actually be altering things in a way you didn't expect. 
-Are you absolutely sure var2 is valid on the exact same grid as var1? To test, do 
'set dfile 2' 
'q dims' 
If the grid limit indices become decimals, then your grids are probably not actually identical. In that case you should run 'd var2interp = lterp(var2,var1)' 

See if any of that exposes the issue. 

Jeff Duda 


On Thu, Jun 4, 2020 at 9:01 AM M.Mahakur < [ mailto:mmahakur at tropmet.res.in | mmahakur at tropmet.res.in ] > wrote: 



Dear All, 

I am using tcorr and the input data are in two files [1) netCDF, varies in space and time; 2) binary, varying only in time, both having same time dim). 

I am doing .. 

'sdfopen [ http://file1.nc/ | file1.nc ] ' ==> var1 
'open file2.ctl' ==> var2 

'set x 1 1440' 
'set y 1 721' 
'set t 1' 

But, it complains : ... 

ga-> d tcorr(var2.2,var1,t=1,t=492) 
TCORR: dim = 3, start = 1, end = 492 
Error from TCORR: 1st arg must be 0-D 
Error from TCORR: Error getting grids 
Operation Error: Error from tcorr function 
Error ocurred at column 1 
DISPLAY error: Invalid expression 
Expression = tcorr(var2.2,var1,t=1,t=492) 
ga-> 


q dims: 

Default file number is: 1 
X is varying Lon = 0 to 359.75 X = 1 to 1440 
Y is varying Lat = -90 to 90 Y = 1 to 721 
Z is fixed Lev = 0 Z = 1 
T is varying Time = 23Z31JAN1979 to 23Z31DEC2019 T = 1 to 492 
E is fixed Ens = 1 E = 1 
ga-> 



Please suggest, how to remove this error. 
If, I interchange the order of opening input file, even the data does not display! 

With Thanks and Regards, 
Mahakur 

_______________________________________________ 
gradsusr mailing list 
[ mailto:gradsusr at gradsusr.org | gradsusr at gradsusr.org ] 
[ http://gradsusr.org/mailman/listinfo/gradsusr | http://gradsusr.org/mailman/listinfo/gradsusr ] 





-- 
Jeff Duda, Research Scientist 
University of Colorado Boulder 
Cooperative Institute for Research in Environmental Sciences 
NOAA/OAR/ESRL/Global Systems Laboratory 
Boulder, CO 

_______________________________________________ 
gradsusr mailing list 
gradsusr at gradsusr.org 
http://gradsusr.org/mailman/listinfo/gradsusr 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200604/713ec2d8/attachment.html>


More information about the gradsusr mailing list