-
Notifications
You must be signed in to change notification settings - Fork 224
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
Wrap grdgradient #1269
Wrap grdgradient #1269
Conversation
Ping @GenericMappingTools/pygmt-contributors, I'm never used anything like |
Co-authored-by: Dongdong Tian <[email protected]>
npt.assert_allclose(temp_grid.min(), -0.0045060496) | ||
npt.assert_allclose(temp_grid.max(), 0.0575332976) | ||
|
||
|
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.
I can't seem to reproduce your error above when running pytest pygmt/tests/test_grdgradient.py
, so maybe you're right that there isn't any problem. My pygmt.show_versions()
is as below for reference, just did a fresh install yesterday. I only see a difference in xarray
and ghostscript
versions but those shouldn't matter much I think.
PyGMT information:
version: v0.3.2.dev145+ga2cdce2c.d20210520
System information:
python: 3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:33) [GCC 9.3.0]
executable: /home/username/miniconda3/envs/pygmt/bin/python
machine: Linux-5.4.0-73-generic-x86_64-with-glibc2.31
Dependency information:
numpy: 1.20.2
pandas: 1.2.4
xarray: 0.18.2
netCDF4: 1.5.6
packaging: 20.9
ghostscript: 9.54.0
gmt: 6.2.0rc1
GMT library information:
binary dir: /home/username/miniconda3/envs/pygmt/bin
cores: 6
grid layout: rows
library path: /home/username/miniconda3/envs/pygmt/lib/libgmt.so
padding: 2
plugin dir: /home/username/miniconda3/envs/pygmt/lib/gmt/plugins
share dir: /home/username/miniconda3/envs/pygmt/share/gmt
version: 6.2.0rc1
Co-authored-by: Wei Ji <[email protected]>
I'll merge this in first @willschlitzer before all the GMT 6.2.0rc2 chaos ensues (have tested that |
Add `grdgradient` function for computing directional gradients from a grid. Original GMT grdgradient function can be found at https://docs.generic-mapping-tools.org/6.1/grdgradient.html * aliased azimuth (A), direction (D), and radiance (E) * add test_grdgradient.py Co-authored-by: Wei Ji <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
This pull request wraps the GMT module
grdgradient
.Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version