Issues with detrend='linear' in dft() killing kernel
See original GitHub issueI have two comments, the first of which is the main issue, while the second is a small, related note. I am currently running the most up-to-date xrft version from GitHub (version 0.2.2+1.g8b7e84e) on Pangeo Cloud.
(1) I’ve been trying to use the ‘linear’ detrend option in dft()
without success. (I created a sample notebook here on a subset of CESM data to illustrate this problem, which should be executable on Pangeo Cloud.) Whenever I use the ‘linear’ option, when using .load()
to calculate the dft function, the cell runs for awhile (~15 minutes in my notebook example) and eventually kills the kernel without any warning or error messages. This does not seem to be an issue with running the computation with dask gateway, as I have had this problem running both with and without dask (and when trying to use dask gateway, the dashboard showed no activity the whole time). When running with detrend='constant'
or detrend=None
I don’t have any errors and the function runs in under 10 seconds. I’ve looked at the xrft code a bit and it may have to do with the dask chunking, but I’m not sure at this point. I believe @navidcy has had similar problems.
~(2) I just noticed today that I’ve been running the dft() function with detrend=True
. This ran just fine, but also didn’t raise any errors saying that ‘True’ is, in fact, not one of the options. I wonder if it makes sense to add a warning that any arguments that are not either ‘constant’ or ‘linear’ will be treated as ‘None’? (I realize that this was entirely my mistake in not reading the xrft docs better, but since the ‘window’ flag does use ‘True’ it may be confusing for others as well.)~ (This comment is now in issue #114.)
I would be happy to make a pull request for these issues if we see the need, but since I’m new to this community I might need a few tips from the more experienced developers out there!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top GitHub Comments
@roxyboy, I guess the idea is to use
xarray.polyfit
to find the linear tread and then subtract it from the data, right?@paigem should we try to have a go at it and make a PR?
We would be very happy to walk you through the PR process.