-
Notifications
You must be signed in to change notification settings - Fork 361
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
Matrix grid doesn't always work with different central meridians #4335
Comments
Is this a gridline registration issue only or is it the same for pixel as well? |
Same issue for pixel-registered grids (just tried |
And just to be absolutely clear, the plot on the bottom is what you expect? That rougher plot is what I get with long=0 which you said works, so just checking. |
Yes, the bottom one uses the earth relief grid file, which gives the same plot as GMT CLI. |
So what happens is this: We have a read-only grid and it has a certain central meridian. This kicks in:
So now we go the way of resampling the images - hence the smoother apparance. The other image is not resampled, just plotted, but handles the change in longitude. I will see if I can make it work the same. You would think that should be doable, but the big difference is that the file is read in and the matrix is rotated to fit the -R while in the xarray case the pixels are still -180/180. So not the same case. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
What is the status of this? Mane related changes have been committed meanwhile. |
I'll find some time to check it. |
Description of the problem
The issue was first reported in GenericMappingTools/pygmt#390, but was thought to be fixed by GMT PRs #3813 and #3829. The GMT master branch works for some projection parameters but doesn't always work.
Full script that generated the error
Output
Image difference
In the PyGMT, we test several different projection parameters. Here are the ones that are known to fail:
Q123/0/15c
Q123/30/15c
Q180/0/15c
Q180/30/15c
Here are the ones that are known to work:
Q0/0/15c
Q0/30/15c
The same parameters work well for General Stereographic projection (i.e., changing Q to S).
Note: Those tests were originally written by @weiji14.
The text was updated successfully, but these errors were encountered: