pygmt.grdpaste: Join two grids along their common edge#4399
pygmt.grdpaste: Join two grids along their common edge#4399seisman merged 47 commits intoGenericMappingTools:mainfrom
Conversation
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
|
Also need to add it to |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
|
|
I think this points to an upstream GMT bug, which should be fixed. |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
|
Could you please add one more test with grid1 as file and grid2 as xr.dataarray? |
When the first input is a real file path and the second is a virtual file (from a DataArray), a GMT_GRID_READ_ERROR is raised. However, if the first input is a virtual file and the second is a real file, it works normally. success: failure: A temporary workaround is to detect mixed inputs in PyGMT and load the files as DataArrays, making both inputs virtual files: This may be an issue with upstream GMT. Should we use the workaround or report the problem to upstream? |
|
@Chuan1937 I've added a section "Notes on the input/output" in #4395. Could you please complete the summary table so that we can better understand the current behavior/limitations? |
|
@seisman |
|
Thanks. Could you please add the tests in #4399 (comment)? You can mark the failing one as xfail. |
Wait. Maybe we should make it simple by only allowing grid1 and grid2 to be the same type (file or xarray.DataArray). |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
I agree. It seems there are still quite a few issues with GMT's external interfaces lately. I'll add this test first. |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
pygmt.grdpaste: Join two grids along their common edge
Preview: https://pygmt-dev--4399.org.readthedocs.build/en/4399/api/generated/pygmt.grdpaste.html#pygmt.grdpaste