-
Notifications
You must be signed in to change notification settings - Fork 35
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
xESMF regridding showing repeated values at latitude poles #133
Comments
Thanks for the report, the example and test file. We've a bit of a backlog at the moment, will try to look into it next week. |
Edit: Also experiencing the occasional incorrect value at longitude 0? But no problem at anti-meridian. |
Hi @mtrimp2, In the input file, there is only one value for ZLCL as well at lat=90 and -90. In [20]: set(ds.ZLCL.isel(time=0, lat=-1).data)
Out[20]: {222.90154} which is expected because it's the pole. After interpolation, we get the same thing. In [23]: set(ds_out.ZLCL.isel(time=0, lat=-1).data)
Out[23]: {222.9015350341797} What value were you expecting ? |
Okay, ZLCL turned out to not be the best example. I will take instead V50M in the same file. The values I was expecting were in reference to the results I got from CDO tool I used to do the same regridding process on the same dataset. If, for example, I print ds['V50M'][0,45,:] (corresponding to latitude 90 at time 0), I get [-1.823932, -1.823932, -1.823932, ... , -1.823932]. Meanwhile, on the dataset generated by the CDO tool, the same calculation would yield results along the lines of [ 1.823529, 2.287396, 2.758099, 3.235638, 3.722943, 4.106732, ... , 3.545208]. I can send you the dataset generated by the CDO tool as well, if needed. |
@mtrimp2 sorry we've been busing getting the new release out. Copy/paste here your cdo command and I'll give it a try. As @huard mentioned the poles are special cases and there can be different choices how to treat them. Have you tried the |
Here are the regridded datasets. ignore_degenerate yields the same results in this case, unfortunately |
V50M is a If someone can confirm this will actually solve your issue, would you want to submit a PR for this new feature ? We'll be happy to review and merge. |
@mtrimp2 have you tried a quiver plot of remapped velocities on a polar stereographic projection? |
It is also worth noting, that when regridding the entire dataset, many variables yield different results. I tried to find a correlation to see if there is a sole issue (for example, the northward wind at 50m), but I do not believe it to be the case. Here is a complete output from nccmp diagnostics showing the differing variables, if that is helpful |
I am experiencing problems when regridding on a global grid in xesmf. Everything is working as it should, except for at the poles (latitudes -90 and 90), where it shows repeated values (2.58851004e+00, 2.58851004e+00, 2.58851004e+00, ...) for each variable. I have also compared it with the CDO regridder to verify, and it showed differences of 0 at every lat/lon point, save for lats -90 and 90. Is there a fix for this?
I have attatched sample netCDF input data via zip file: test_input.zip
Code:
You will notice, once ds_out is generated, evaluating ds_out['ZLCL'][:,0,:] or ds_out['ZLCL'][:,45,:] Will show all repeated values. These values correspond to lat = -90 and lat = 90.
The text was updated successfully, but these errors were encountered: