cLinearRegression performs a linear regression Y = aX + b between two fields X and Y. They can be either spatio-temporal fields (same grids) or just time series. Y can be a spatio-temporal field, and X can be a time series. This operator is based on cdutil (CDAT).
References : https://uvcdat.llnl.gov/
Provider / contact : climaf at meteo dot fr
Output : the slope a of the linear regression (either a field, or one value)
Climaf call example
>>> ds1 = .... # X: some dataset, with whatever variable
>>> ds2 = .... # Y: some dataset, same dimension as ds1
>>> slope_linreg = cLinearRegression(ds1, ds2) # -> field of slope values for each grid points (between the time series of the corresponding grid points of X and Y)
>>> ts1 = space_average(ds1)
>>> slope_linreg2 = cLinearRegression(ts1, ds2) # -> field of slope values between the time series ts1 and the field ds2
Side effects : None
Implementation : need CDAT installed