[ncl-talk] Regression produces fatal error: regCoef_n: The input array y must have as many or more dimensions than x
Andreas Chrysanthou
eeac at leeds.ac.uk
Fri Sep 1 07:06:59 MDT 2017
Hi NCL users,
I want to calculate the regression coefficients of variable with 1 dimension (y= mass_flux) against another which has 3 dimensions (x = acceldivf_).
Typically, according to the description of the regCoef_n (x, y, dims_x, dims_y) NCL function x and y can be arrays of any dimensionality but the dims_x and dims_x and dims_y is an integer indicating which dimension of x/y to do the calculation on, as long as it has the same number of elements.
The error I’m getting is the following: fatal:regCoef_n: The input array y must have as many or more dimensions than x
PrintVarSummary of both variables follows:
Variable: mass_flux
Type: float
Total Size: 564 bytes
141 values
Number of Dimensions: 1
Dimensions and sizes: [time | 141]
Coordinates:
time: [1960..2100]
Number Of Attributes: 1
_FillValue : 1e+20
Variable: acceldivf_
Type: float
Total Size: 839232 bytes
209808 values
Number of Dimensions: 3
Dimensions and sizes: [time | 141] x [lev | 31] x [lat | 48]
Coordinates:
time: [1960..2100]
lev: [1000.. 0.1]
lat: [-87.15909445302286..87.15909445302286]
So it fails with the above fatal error when I try:
rc= regCoef_n (acceldivf_, mass_flux, 0, 0)
Any ideas please?
Cheers,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170901/069fca2f/attachment.html>
More information about the ncl-talk
mailing list