GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Wrap GMT's standard data type GMT_CUBE for cubes and support reading/writing cubes by seisman · Pull Request #3150 · GenericMappingTools/pygmt

Conversation

@seisman

@seisman seisman commented Mar 31, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Similar to #3338 and #3128, but for wrapping GMT_CUBE.

Main changes in this PR:

  • Wrap GMT's standard data type GMT_CUBE
  • Implement the to_xarray method
  • Let low-level functions (e.g., read_data/write_data) support cubes
  • Extend the xarray backend to support cubes (i.e., xr.open_dataarray("xxx.cube", engine="gmt", kind="cube")

Known issues:

  • It seems we can't use lib.call_module("read", "@cube.nc out.nc -Tu") for cubes. The similar command works well for grids and images. It's likely an upstream bug.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Base automatically changed from gmtgrid/parser to main April 1, 2024 05:56
@seisman
seisman force-pushed the datatypes/gmtcube branch from fe976e4 to 1c5df8c Compare April 1, 2024 06:00
michaelgrund
michaelgrund reviewed Apr 2, 2024
View reviewed changes
Comment thread pygmt/datatypes/cube.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@seisman seisman mentioned this pull request Apr 19, 2024
Add placeholder codes for wrapping GMT_IMAGE/GMT_CUBE #3181
Closed
@seisman
Wrap GMT's standard data type GMT_CUBE for cubes
b59efe0
@seisman
seisman force-pushed the datatypes/gmtcube branch from 499c519 to b59efe0 Compare July 19, 2024 08:51
seisman added 6 commits July 19, 2024 16:52
@seisman
Remove the to_dataarray method
277a30d
@seisman
Finalize the GMT_CUBE wrapper
757321a
@seisman
Update the docstrings
f77d412
@seisman
Add cube support in Session.read_data
ecf5711
@seisman
Add two tests for reading grid/image as GMT_CUBE
810fb12
@seisman
Merge branch 'main' into datatypes/gmtcube
1ee8208
@seisman seisman added the feature Brand new feature label Jul 27, 2024
seisman added 3 commits July 27, 2024 16:42
@seisman
Fix some typos
2823168
@seisman
Sort data kind by importance
6b1bc40
@seisman
Merge branch 'main' into datatypes/gmtcube
1bc06d9
@seisman seisman mentioned this pull request Aug 5, 2024
Add an example cube netCDF file GenericMappingTools/gmtserver-admin#266
Merged
@seisman seisman added this to the 0.14.0 milestone Aug 5, 2024
seisman added 4 commits August 9, 2024 14:10
@seisman
Merge branch 'main' into datatypes/gmtcube
0e7dc72
@seisman
Cache cube.nc
fec544c
@seisman
Merge branch 'main' into datatypes/gmtcube
12790e3
@seisman
Merge branch 'main' into datatypes/gmtcube
087912d
@seisman seisman removed this from the 0.14.0 milestone Sep 5, 2024
seisman added 3 commits September 19, 2024 21:14
@seisman
Merge branch 'main' into datatypes/gmtcube
9b87e6d
@seisman
Add a doctest
2647e41
@seisman
Fix styles
0b64d70
@seisman seisman mentioned this pull request Sep 29, 2024
**BREAKING** pygmt.grdcut: Refactor to store output in virtualfiles for grids #3115
Merged
@seisman
Merge branch 'main' into datatypes/gmtcube
a441fbd
@weiji14 weiji14 mentioned this pull request Sep 30, 2024
Get projection/crs from GMT_GRID_HEADER #3470
Open
@seisman
Merge branch 'main' into datatypes/gmtcube
fdf004c
seisman added 2 commits September 30, 2024 21:18
@seisman
Merge branch 'main' into datatypes/gmtcube
84b37a7
@seisman
Updates
80999c6
@seisman seisman self-assigned this Oct 30, 2024
@seisman
Merge branch 'main' into datatypes/gmtcube
0492d55
@seisman seisman mentioned this pull request Apr 17, 2025
Add pygmt.gmtread to read a dataset/grid/image into pandas.DataFrame/xarray.DataArray #3673
Draft
4 of 7 tasks
seisman added 13 commits August 23, 2026 12:28
@seisman
Merge branch 'main' into datatypes/gmtcube
81e2507
@seisman
Fix styling issue
723d9f2
@seisman
Fix for cubes
0117af3
@seisman
Improve doctests
f2b285a
@seisman
Merge branch 'main' into datatypes/gmtcube
7ada8f2
@seisman
Merge branch 'main' into datatypes/gmtcube
d7f99ac
@seisman
Improve description of n_bands
8178467
@seisman
Revert changes in test_clib_virtualfiles.py
db98fba
@seisman
Improve doctest for _GMT_CUBE
41e86a4
@seisman
Improve code and doctests for _GMT_CUBE.to_xarray
f3af709
@seisman
Simplify tests
7a1a03c
@seisman
Extending xarray backend
80388cf
@seisman
Fix z_unit
e1ceda2
@seisman seisman changed the title Wrap GMT's standard data type GMT_CUBE for cubes Wrap GMT's standard data type GMT_CUBE for cubes and support reading/writing cubes Aug 25, 2026
@seisman seisman added this to the 0.20.0 milestone Aug 25, 2026
@seisman
seisman marked this pull request as ready for review August 25, 2026 16:54
@seisman seisman added the needs review This PR has higher priority and needs review. label Aug 25, 2026
@seisman
Merge branch 'main' into datatypes/gmtcube
35960f8
@seisman seisman modified the milestones: 0.20.0, 0.21.0 Oct 22, 2026
@seisman seisman removed the needs review This PR has higher priority and needs review. label Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@michaelgrund michaelgrund michaelgrund left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@seisman seisman

Labels

feature Brand new feature

Projects

None yet

Milestone

0.21.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@seisman @michaelgrund
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.