question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Grid.boundary

See original GitHub issue

How about having xgcm.set_options(boundary="extend") or similar to save quite a lot of typing?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
rabernatcommented, Sep 17, 2019

Good idea. But one might not want to set these globally, since someone might be working with multiple different Grid objects in one session.

Instead, they could be attached to a grid. For example

grid = Grid(ds, coords={'X': {'center': 'x_c', 'left': 'x_g'},
                        'Y': {'center': 'y_c', 'left': 'y_g'}},
           periodic=False, boundary={'X': 'extend', 'Y: 'fill'})

Then every time you did grid.diff(data, 'X') it would apply the specified boundary condition.

0reactions
rabernatcommented, Sep 17, 2019

The path to implementing this would be to attach a new attribute to Axis objects

https://github.com/xgcm/xgcm/blob/cac66afeb2426546b142aef07b7752bd02ea0ebb/xgcm/grid.py#L59-L77

and then pass that through the Grid constructor.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a grid—ArcGIS Pro | Documentation
In an active layout view, select the map frame in the Contents pane. · On the Insert tab, in the Map Frames group,...
Read more >
How to Add Grids and Grid Frame to Map in QGIS - GeoAfrikana
Open the 'MAP GRID PROPERTIES' dialog, scroll down to the second section labelled 'frame'. · The first option allows you to choose the...
Read more >
To Create and Removing Boundaries for Layout Grids
Select a layout grid, and then click Layout Grid 2D tab Clipping panel Set Boundary. Select the layout grid, and press Enter. Select...
Read more >
Show or hide gridlines on a worksheet - Microsoft Support
Gridlines are the faint lines that appear around cells to distinguish them on the worksheet. By default, gridlines are displayed in worksheets using...
Read more >
Setting values for grid boundaries - amuse - Read the Docs
A boundary grid connects to the grid in a very specific way. The general rule for the 1 or inflow boundaries is that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found