Slope of linear fit: Using xskillscore.linslope #362
Replies: 7 comments
-
Try b=AOD.time or np.arange(AOD.time.size) |
Beta Was this translation helpful? Give feedback.
-
produced error..........
|
Beta Was this translation helpful? Give feedback.
-
When I added skipna=True
|
Beta Was this translation helpful? Give feedback.
-
please try without using dask, so the traceback can be better debugged.
|
Beta Was this translation helpful? Give feedback.
-
the linslope function doesnt work with cftime often. Therefore try setting import xskillscore as xs
ds = xr.tutorial.load_dataset('rasm')
ds['time']=np.arange(ds.time.size)
xs.linslope(ds, ds.time, dim='time') |
Beta Was this translation helpful? Give feedback.
-
Hello, this worked well........Thanks, I want to know does the xskillscore.linslope works same as the scipy.stats.linregress to calculate the slope. I used the following lines for that:
|
Beta Was this translation helpful? Give feedback.
-
The Dimension of the Variables are:
lat=28
lon=62
time=216
AOD=(216,28,62)
In xskillscore.linslope (), parameters requires two labeled array(s) (e.g., a and b) as detailed in documentation: https://xskillscore.readthedocs.io/en/stable/api/xskillscore.linslope.html
But I want to compute the linear slope against time in AOD. As my AOD variable has 216 month of time dimension, I want to compute linear fit between time and AOD, that should produce slope of trend. May be I getting the documentation wrong or something different.........................
What I should declare in the above line at position 'b'
Thanks for constructive comments!!
Beta Was this translation helpful? Give feedback.
All reactions