Problem of Incompatable grids
Henrique Barbosa
hmjbarbosa at GMAIL.COM
Fri Sep 30 21:54:21 EDT 2005
Hi Hui,
Humm, I never tried to do correlations with data that only partially
overlap... But I think it should work. You could try your script
with the same variable. I mean, try to calculate the correlation
of the reanalysis agains the reanalysis.... and the model x model.
If that doen's work, than rewrite your script.
If that work then you could try to write the lon/lat exactly
as in the ctl. For instance, call scorr with lon=230.5045
instead of 230.505.
]['s
Henrique
On 9/30/05, Hui Du <huidu at ucdavis.edu> wrote:
>
> Dear GrADs users:
> I want to calculate the correlation between two variables which come
> from two data sets. One is model output, the other is reanalysis data.
> The domain of the model is a little bigger than the reanalysis, But part
> of them are overlapped exactly. I have written the grid set at the last.
> We can see that they are exactly the same except the blue part. My
> script is
>
> function wp ( args)
> tb=subwrd(args,1)
> te=subwrd(args,2)
> 'define avet2a=ave(t2.2,t='tb',t='te')'
> 'define avet20=ave(t2,t='tb',t='te')'
> 'define
> cort2a=scorr(avet2a,avet20,lon=230.505,lon=252.651,lat=28.4976,lat=46.6943
> )'
> 'd cort2a'
> return
>
> When I ran the above script, I got:
>
> ga-> run b.gs <http://b.gs> 613 736
> Error from SCORR: Incompatable grids
> Operation Error: Error from scorr function
> Error ocurred at column 1
> DEFINE error: Invalid expression.
>
> I wonder where my problem was, when I calculate two model sets which
> have the exactly same grid set. It was ok
> Thanks lot
>
>
> **********************************************************************************************************
> Control
>
> longitude = 223.6738, 224.011, 224.3488, 224.6871, 225.0258, 225.3651,
>
> 225.7048, 226.045, 226.3856, 226.7267, 227.0682, 227.4102, 227.7525,
>
> 228.0952, 228.4384, 228.7819, 229.1257, 229.4699, 229.8145, 230.1593,
>
> 230.5045, 230.85, 231.1957, 231.5418, 231.888, 232.2346, 232.5814,
>
> 232.9284, 233.2756, 233.623, 233.9706, 234.3183, 234.6662, 235.0143,
>
> 235.3625, 235.7108, 236.0592, 236.4077, 236.7563, 237.105, 237.4537,
>
> 237.8024, 238.1512, 238.5, 238.8488, 239.1976, 239.5463, 239.895,
>
> 240.2437, 240.5923, 240.9408, 241.2892, 241.6375, 241.9857, 242.3338,
>
> 242.6817, 243.0294, 243.377, 243.7244, 244.0716, 244.4186, 244.7654,
>
> 245.1119, 245.4583, 245.8043, 246.15, 246.4955, 246.8407, 247.1855,
>
> 247.5301, 247.8743, 248.2181, 248.5616, 248.9048, 249.2475, 249.5898,
>
> 249.9318, 250.2733, 250.6144, 250.955, 251.2952, 251.6349, 251.9742,
>
> 252.313, 252.6512, 252.989, 253.3262, 253.6629 ;
>
> latitude = 28.4976, 28.76577, 29.03428, 29.30313, 29.57229, 29.84179,
>
> 30.11159, 30.38172, 30.65216, 30.9229, 31.19394, 31.46528, 31.73691,
>
> 32.00883, 32.28103, 32.55351, 32.82626, 33.09929, 33.37257, 33.64611,
>
> 33.9199, 34.19395, 34.46824, 34.74277, 35.01752, 35.29251, 35.56772,
>
> 35.84315, 36.11879, 36.39464, 36.67069, 36.94694, 37.22338, 37.5,
>
> 37.7768, 38.05378, 38.33092, 38.60824, 38.8857, 39.16333, 39.44109,
>
> 39.71899, 39.99703, 40.2752, 40.55349, 40.83189, 41.1104, 41.38903,
>
> 41.66775, 41.94656, 42.22545, 42.50443, 42.78348, 43.0626, 43.34177,
>
> 43.62101, 43.90029, 44.17961, 44.45897, 44.73835, 45.01777, 45.29719,
>
> 45.57663, 45.85606, 46.1355, 46.41492, 46.69433, 46.9737 ;
>
> Observation
>
> longitude = 230.5045, 230.85, 231.1957, 231.5418, 231.888, 232.2346,
>
> 232.5814, 232.9284, 233.2756, 233.623, 233.9706, 234.3183, 234.6662,
>
> 235.0143, 235.3625, 235.7108, 236.0592, 236.4077, 236.7563, 237.105,
>
> 237.4537, 237.8024, 238.1512, 238.5, 238.8488, 239.1976, 239.5463,
>
> 239.895, 240.2437, 240.5923, 240.9408, 241.2892, 241.6375, 241.9857,
>
> 242.3338, 242.6817, 243.0294, 243.377, 243.7244, 244.0716, 244.4186,
>
> 244.7654, 245.1119, 245.4583, 245.8043, 246.15, 246.4955, 246.8407,
>
> 247.1855, 247.5301, 247.8743, 248.2181, 248.5616, 248.9048, 249.2475,
>
> 249.5898, 249.9318, 250.2733, 250.6144, 250.955, 251.2952, 251.6349,
>
> 251.9742, 252.313, 252.6512 ;
>
> latitude = 28.4976, 28.76577, 29.03428, 29.30313, 29.57229, 29.84179,
>
> 30.11159, 30.38172, 30.65216, 30.9229, 31.19394, 31.46528, 31.73691,
>
> 32.00883, 32.28103, 32.55351, 32.82626, 33.09929, 33.37257, 33.64611,
>
> 33.9199, 34.19395, 34.46824, 34.74277, 35.01752, 35.29251, 35.56772,
>
> 35.84315, 36.11879, 36.39464, 36.67069, 36.94694, 37.22338, 37.5,
>
> 37.7768, 38.05378, 38.33092, 38.60824, 38.8857, 39.16333, 39.44109,
>
> 39.71899, 39.99703, 40.2752, 40.55349, 40.83189, 41.1104, 41.38903,
>
> 41.66775, 41.94656, 42.22545, 42.50443, 42.78348, 43.0626, 43.34177,
>
> 43.62101, 43.90029, 44.17961, 44.45897, 44.73835, 45.01777, 45.29719,
>
> 45.57663, 45.85606, 46.1355, 46.41492, 46.69433 ;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20050930/6ff6a067/attachment.html
More information about the gradsusr
mailing list