-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd errors from using pixel_overlaps with a weights option #28
Comments
I was able to get past the regridding step by running Line 71 in 5015c7f
from is to == (which then matches the second test).
|
oof yeah that's not great. Maybe making sure the code runs More broadly this is more motivation to implement #1 , since I'll take a look. |
I changed that equality check as you had suggested in the main branch (will be published with v0.3, which will have a huge performance boost likely in general as well); I'm also bumping the adoption of |
@ks905383 I ran into a few more issues-- more importantly that the aggregation process was super slow-- and fixed them in my own version of the code. But now I can't figure out which version of the code conda had installed for me. I installed it fairly recently (a month ago?), but it doesn't seem to match 0.2.4 - 0.2.6. Any clues? |
That's odd - anything between about 6 months ago until yesterday should be 0.2.5. I'd be curious to hear about your performance improvements in any case. |
First, on the versioning, if I install xagg from pip (which was the only way I eventually got it to work with the right constellation of package versions), I get the old version. I just confirmed this now. It's an older version than anything in the xagg repository-- as an indication, the docstring of the My main speed-up was to remove a bunch of the lines from the loop here: Line 207 in 4ac0c0f
The only line I think that needs to be in that loop is |
Hm, truly odd - it's all updated on pypi. Maybe there are some conflicting dependencies. Have you tried installing it in a fresh environment? Would be good to see if that reproduces the issue. Re: the speed-up - yes, that would be a huge improvement, I don't know what I was thinking when writing that for-loop. Do you want to start a PR? Otherwise I can just do it. |
On a new environment I get:
So, it wants to install xagg-0.2.6, and the versions of geopandas and pandas that it grabs are the most recent on pypi, but then it gets kicked down to xagg-0.1.4 at the end.
I would make a PR, but I don't see a 0.1.4 tag in the current xagg repo. I guess I could set up xagg-archive as a separate remote and then try to branch off of that and update. |
Ah, the problem seems to be that I was able to replicate the issue on my machine. There are a few options I'm trying. One would just be a source install of the latest I'll keep you updated. I'll just add the speedup fix myself then, will be great to add it to the other speed fixes coming up in v0.3.0 |
I have also got this error while installing the xagg package. I got this message ModuleNotFoundError: No module named 'xesmf' I would like to know if someone were able to install xagg recently. I have tried many ways to install but it failed. |
Hi - so import Here is a sequence that just worked for me:
This should allow you to use This doesn't yet solve @jrising 's problem if you can't use conda, but it does mean that you can install it. I'm honestly not sure when we can get the issues relating to |
Until the current installation issues with `conda`, `pip` are fixed, the workaround mentioned in #28 should be posted in an easier spot to see
@jrising are these issues still occurring? (If so, can you try with |
@ks905383 I'm not going to have a chance to check for a couple weeks. But I can look after that. |
I can't find the code that produced these errors, but I have since been able to successfully use |
Great, thanks for checking! |
This issue is sort of three issues that I encountered while trying to solve a problem. Fixes to any of these would work for me.
I'm trying to use
xagg
with some fairly large files including a weights file, and I was getting an error during the regridding process:(at which point, python crashes)
I decided to do the regridding myself and save the result. Here are what the data file (
ds_tas
) and weights file (ds_pop
) look like:The dimensions line up exactly. But
xagg
still wanted to regrid my weights file. My guess is that this is because the dimensions are labeled differently (and so annp.allclose
fails because taking a difference between the coordinates results in a 2-D matrix).So I relabeled my coordinates and dimensions. This results in a new error:
To be clear, neither of my datasets has a dimension of size 1079.
The text was updated successfully, but these errors were encountered: