[gradsusr] Problem Using Functions tcorr2 and tregr2 in Linux

Stephen McMillan smcmillan at planalytics.com
Fri Sep 11 10:37:36 EDT 2020


This question is for the developers of or a user familiar with both the
Windows and Linux versions of opengrads.  This question is specifically
about version 2.2.1.oga.1.  Another user could not use it on the ubuntu
version as well.

I have a script that does temporal regressions of the variable "air" on
various climate indices, using opengrads functions (B Tsuang extensions)
tcorr2 and tregr2.  I have no problems using the Windows version on my
laptop, but when I use it on my Cloud linux version, I get the following
error when using tcorr2 (the tregr2 error is similar):

--------------------------
Opened ../stevem/data/cdf/monthlyanoms/air.sig995.mon.anom.nc
Opened data/index/pna.mon.1948-2020.ctl
i=1  j=1
Error from TCORR:  Too many or too few args
                   4 arguments expected
Operation Error:  Error from tcorr2 function
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tcorr2(ndexnew(t-2),air,time=oct1950,time=oct2019,12mo)
Cannot plot color bar: No shading information
Error from TCORR:  Too many or too few args
                   4 arguments expected
Operation Error:  Error from tcorr2 function
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tcorr2(ndexnew(t-2),air,time=oct1950,time=oct2019,12mo)
--------------------------

All of the variables are valid and available to the function, so the issue
appears to be related to the fifth argument provided, which tcorr does not
accept.

Here's the applicable command in my script:

'd tcorr2(ndexnew(t-'lt'),'dvar',time='date1',time='date2',12mo)'

where ndexnew is the independent variable timeseries, dvar = air, date1 and
date2 represent the range of dates in "air" and 12mo is the time interval
within both ndexnew and dvar.  Lt = the index leadtime in months, so a
regression of Oct "air" is being done on the Aug index.

How do I get my script to override/ignore the official GrADS functions
tcorr and tregr with the opengrads functions tcorr2 and tregr2?  I prefer
to use the latter because they include the fifth argument "dt".  Note,
other B Tsuang extension functions, such as "if_" work on my linux and the
required B Tsuang extension files *appear* to be present.

Stephen McMillan
Research Meteorologist

-- 
***************************************************The information 
contained in this e-mail message is intended only for the use of the 
recipient(s) named above and may contain information that is privileged, 
confidential, and/or proprietary. If you are not the intended recipient, 
you may notreview, copy or distribute this message. If you havereceived 
this communication in error, please notify the sender immediately by 
e-mail, and delete the original 
message.***************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200911/7a190c5e/attachment-0001.html>


More information about the gradsusr mailing list