-
Notifications
You must be signed in to change notification settings - Fork 346
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
Changing a grid's scale_factor #3268
Comments
Does |
Just find a potential bug with grdedit. Follow the steps below to reproduce it:
scale_factor is 10 in the grid, but the z_min and z_max is 100 times of the original data. Why?
scale_factor is still 1. |
In my case the grdedit -D+s0.01 works exactly as I want, but if I want to write that to a new grid via -Gnew.grd the new grid is not correct. |
If I understand it correctly, the z_min and z_max should be -50230 and 36140, not -502300 and 361400. If I use grd2xyz to output the data, I should see the z value in the range -5023 to 3614, right? |
Yes, there is clearly some problems here:
We getting the factor of 10 twice. However, my other case seems to work:
|
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. |
Description of the problem
Not sure if this is a bug or not but it is certainly not straightforward to do or figure out, and I should have an inside track on this...
I have a netCDF short int grid with values that need to be scaled by 0.01 to be used. OK, so I can plot it as grid.nc+s0.01. But this data will never be used as is, always with that scale, so better to insert the 0.01 scale into the grid. I have tried various schemes with grdedit and grdconvert but no success. Making this issue mostly so it is not forgotten and once a solution (bug fix, improved documentation) happens then we can delete it.
One can experiment with this grid whose z values should be 0-100 on output, but that requires +s0.01 when used.
gmt grdmath -R0/10/0/10 -I1 X Y MUL 100 MUL = t.nc=ns
The text was updated successfully, but these errors were encountered: