<html><body><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000"><div>Thank you, Dear Jeff.<br></div><div><br data-mce-bogus="1"></div><div>I tried all before what you have suggested!<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>var1 is 1440x721 and T =492<br data-mce-bogus="1"></div><div>var2 is 1x1 and T=492.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>What is happening is if I open var2 (binary) as 2nd file. I can display both variables (otherwise it does not).<br data-mce-bogus="1"></div><div>But, I found it takes var2 as 1440x721 with constant field!<br data-mce-bogus="1"></div><div>I may be wrong! But, to tackle this, I averaged var2 globally.. </div><div><br data-mce-bogus="1"></div><div>'set x 1'<br data-mce-bogus="1"></div><div>'set y 1'<br data-mce-bogus="1"></div><div>'set t 1 492'<br data-mce-bogus="1"></div><div>ave2=aave(var2,g). </div><div><br data-mce-bogus="1"></div><div>Then, tcorr worked.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>'set x 1 1440'<br data-mce-bogus="1"></div><div>'set y 1 721'<br data-mce-bogus="1"></div><div>'set t 1'<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>d tcorr(ave2,var1,t=1,t=492)<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I got a spatial map, which makes some sense..<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>But, it might sound foolish !<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>With Best Regards,<br data-mce-bogus="1"></div><div>Mahakur<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Jeff Duda" <jeffduda319@gmail.com><br><b>To: </b>"GrADS Users Forum" <gradsusr@gradsusr.org><br><b>Sent: </b>Thursday, June 4, 2020 9:19:47 PM<br><b>Subject: </b>Re: [gradsusr] error using tcorr<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr"><div>That error message doesn't seem to make much sense on first glance.</div><br><div>Questions to guide your troubleshooting:</div><br><div>-What are the dimensions of both var1 and var2?</div><div>-Is this problem the result of using sdfopen for one field and open for the other?</div><div>-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.</div><div>-Are you absolutely sure var2 is valid on the exact same grid as var1? To test, do</div><div>'set dfile 2'</div><div>'q dims'</div><div>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)'</div><br><div>See if any of that exposes the issue.</div><br><div>Jeff Duda<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 4, 2020 at 9:01 AM M.Mahakur <<a href="mailto:mmahakur@tropmet.res.in" target="_blank">mmahakur@tropmet.res.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><div>Dear All,<br></div><br><div>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).<br></div><br><div>I am doing ..<br></div><br><div>'sdfopen <a href="http://file1.nc" target="_blank">file1.nc</a>'  ==> var1<br></div><div>'open file2.ctl'      ==> var2<br></div><br><div>'set x 1 1440'<br></div><div>'set y 1 721'<br></div><div>'set t 1'<br></div><br><div>But, it complains : ...<br></div><br><div>ga-> d tcorr(var2.2,var1,t=1,t=492)<br></div><div>TCORR:  dim = 3, start = 1, end = 492<br>Error from TCORR:  1st arg must be 0-D<br>Error from TCORR:  Error getting grids<br>Operation Error:  Error from tcorr function<br>  Error ocurred at column 1<br>DISPLAY error:  Invalid expression<br>  Expression = tcorr(var2.2,var1,t=1,t=492)<br>ga-> <br></div><br><br><div>q dims:</div><br><div>Default file number is: 1<br>X is varying   Lon = 0 to 359.75   X = 1 to 1440<br>Y is varying   Lat = -90 to 90   Y = 1 to 721<br>Z is fixed     Lev = 0  Z = 1<br>T is varying   Time = 23Z31JAN1979 to 23Z31DEC2019  T = 1 to 492<br>E is fixed     Ens = 1  E = 1<br>ga-><br><br></div><br><br><div>Please suggest, how to remove this error.<br></div><div>If, I interchange the order of opening input file, even the data does not display!<br></div><br><div>With Thanks and Regards,<br></div><div>Mahakur<br></div><br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span data-mce-style="font-size: small;" style="font-size: small;" size="2"><span>Jeff Duda, Research Scientist</span></span></div><div dir="ltr"><span data-mce-style="font-size: small;" style="font-size: small;" size="2"><span></span></span>University of Colorado Boulder</div><div dir="ltr"><span data-mce-style="font-size: small;" style="font-size: small;" size="2"><span></span></span>Cooperative Institute for Research in Environmental Sciences</div><div dir="ltr">NOAA/OAR/ESRL/Global Systems Laboratory<br><span data-mce-style="font-size: small;" style="font-size: small;" size="2"><span>

<span>Boulder, CO<br></span></span></span>



</div></div></div></div></div></div></div></div></div></div>
<br>_______________________________________________<br>gradsusr mailing list<br>gradsusr@gradsusr.org<br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></div></body></html>