-
Notifications
You must be signed in to change notification settings - Fork 367
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
Let data processors default to gridline reg for unspecified remote grids #6710
Conversation
If users select a remote data set without specifying the registration then grid-processing modules shall select gridline registration while plot producers shall (continue to) select pixel registration. This is to avoid issues such as #6678.
OK, hadn't realize that this applies only to the cases of remote files and when the user didn't bother (quite likely because he/she doesn't even knows the matter) to explicitly specify the registration. In that case we are free to set a default behavior. |
This disagrees with the description here - https://docs.generic-mapping-tools.org/6.3/datasets/remote-data.html#usage. If the PR is merged we should adjust the description in that section and add a deprecation notice to the changelog since it is technically breaking backwards compatibility. I'm not opposed to the change, but think it should be applied to all processing modules if merged. |
True, but it is more of a documentation bug. For instance, it does not mention that grdtrack is using gridline registration. It basically only talks about registration in the context of plots. Given that it is a fools errand for anyone to not specify registration with a grid processor (meaning they probably have no idea what they are really doing), I think it is better to declare a bug and clarify in that documentation section how we handle registration for grid processing and that we suggest users specify what they want. It also adds consistency rather than just singling out grdtrack. |
I think we're in agreement that we need better documentation. I agree with having the same default for all processors and add a +1 for your previous suggestion to raise a warning when the registration is not provided. Even very smart people can write data processing scripts without specifying the registration (e.g., #6678). |
I will work this up tomorrow for review. |
Testing this branch I run into hung jobs apparently - cannot tell if it is Hawaii server network or what. If you build this branch, does things like
give any trouble (probably you need to delete your saved file first. |
So turns out I can run that command manually, but for some reason my tests get hung up on some of the scripts and it is usually one with grdcut on a remote file without resolution specification. |
There are about 30 tests that access I propose to edit those scripts and append |
Yes, simpler to addend |
I will do that once the surface-faster branch is merged (soon - awaiting CI). |
I am thinking that while the _p trick shall be used for various tests, I am hesitant to change 6 example and tutorial scripts to do this. Here I think perhaps updating the PS is the better solution. Thoughts? |
Fine with me to update the PS for the user-facing examples. |
So there are some dumb things in the tutorial which has not kept up with the times. For instance, we just translated old scripts to modern mode but that meant we do
For instance, here is tut 16:
But surely, in a tutorial to show simple things, this should instead just be:
No? Otherwise we just complicate things by having to use _p in the grdcut step to ensure the two grids are compatible (ie., the unspecified resolution in grdimage). |
Basically, I propose to rewrite the text surrounding tutorial examples 16 and 19 so we avoid this painful section of steps. We can still talk about grdgradient and what it does, but then say for most purposes like here we simply do it implicitly via -I. |
I have acted on my impulses and updated the old-style examples in the tutorial. I have left most/all the doc and example scripts without explicit resolution and hence updated those PS files in DVC, and fixed the test scripts. I havd removed the WIP label. @seisman, let me know if the CI is unhappy. about anything, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment the "pull_request" line before merging.
There is one failing test on Linux and Windows:
|
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
OK, not having omp so did not notice. I added the _p in the grdfilter call so now it should be as before - let's see. |
Let me know how it went, @seisman. I fly back to Hawaii on the weekend for a 2 week break, then back to Oxford, so things may slow down in 24 hours... |
The grdfill test still fails on Windows, same as #6678 (comment). |
OK, this latest commit deals with several somewhat related and unrelated issues:
Once again probably need full tests, @seisman. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass.
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
If users select a remote data set without specifying the registration then grid-processing modules shall select gridline registration while plot producers shall (continue to) select pixel registration. This is to avoid issues such as #6678.
Currently, this policy only applied to grdtrack. Note I am on a train and cannot run the tests, and we should discuss if we want to make this change. Hence WIP.