[gradsusr] tcorr error: invalid grid coordinates

Eric Altshuler ela at cola.iges.org
Tue Nov 16 17:25:37 EST 2010


Mira,

After you define test2, do not close file 1. Doing so leaves the grads dimension environment in an undefined state. If you leave file 1 open, the dimension environment continues to be well-defined. You also need to set T to be a fixed dimension (e.g. 'set t 1') before using tcorr (but after you define test2). tcorr won't work if T is varying. So, in your case, you can simply replace the line 'close 1' with 'set t 1' and it should work.

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Mira Losic" <mlosic at envsci.rutgers.edu>
To: gradsusr at gradsusr.org
Sent: Tuesday, November 16, 2010 5:10:38 PM
Subject: [gradsusr] tcorr error: invalid grid coordinates

Hi everyone,

I'm hoping someone can help me with the tcorr function. I am simply trying
to correlate two WRF time series of temperature (T2) at a particular grid
location and level from the beginning to end of my time series. (t=1 to
t=123). The commands and errors are copied below.

Also, I'd like to use tcorr to correlate my WRF output to my station data.
Can tcorr find the correlation between station and gridded data?

Many thanks,
Mira

ga-> open RUN4_StationVars.ctl
Scanning description file:  RUN4_StationVars.ctl
Data file RUN4_StationVars.nc is open as file 1
LON set to -116.1 -34.1464
LAT set to 55.9 78.7109
LEV set to 1 1
Time values set: 1981:7:1:6 1981:7:1:6
Notice: Implied interpolation for file RUN4_StationVars.ctl
 Interpolation will be performed on any data displayed from this file
ga-> set lat 68.47
LAT set to 68.4613 68.4613
ga-> set lon -66.82
LON set to -66.8144 -66.8144
ga-> set t 1 123
Time values set: 1981:7:1:6 1981:7:31:18
ga-> define test=T2-273.15
Notice:  Automatic Grid Interpolation Taking Place
Define memory allocation size = 492 bytes
ga-> close 1
File 1 has been closed
ga-> open RUN3_StationVars.ctl
Scanning description file:  RUN3_StationVars.ctl
Data file RUN3_StationVars.nc is open as file 1
LON set to -116.1 -34.1464
LAT set to 55.9 78.7109
LEV set to 1 1
Time values set: 1981:7:1:6 1981:7:1:6
Notice: Implied interpolation for file RUN3_StationVars.ctl
 Interpolation will be performed on any data displayed from this file
ga-> set lat 68.47
LAT set to 68.4613 68.4613
ga-> set lon -66.82
LON set to -66.8144 -66.8144
ga-> set t 1 123
Time values set: 1981:7:1:6 1981:7:31:18
ga-> define test2=T2-273.15
Notice:  Automatic Grid Interpolation Taking Place
Define memory allocation size = 492 bytes
ga-> close 1
File 1 has been closed
ga-> d tcorr(test,test2,t=1,t=123)
TCORR:  dim = 3, start = 1, end = 123
Data Request Error: Invalid grid coordinates
  Varying dimension 3 decreases: -2.89491e+06 to -2.89491e+06
  Error ocurred getting variable 'test'
Error from TCORR:  Error getting grids
Operation Error:  Error from tcorr function
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tcorr(test,test2,t=1,t=123)



_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list