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.

need better defaults for autogenerate_ds

See original GitHub issue

I just tried out autogenerate_ds.

I loaded the dataset in this example.

The dataset has the following coords:

<xarray.Dataset>
Dimensions:                      (lat: 180, lon: 360, time: 203)
Coordinates:
  * lon                          (lon) float32 0.5 1.5 2.5 3.5 4.5 5.5 6.5 ...
  * time                         (time) datetime64[ns] 2000-03-15 2000-04-15 ...
  * lat                          (lat) float32 -89.5 -88.5 -87.5 -86.5 -85.5 ...

I tried the following

grid_ds = xgcm.autogenerate.generate_grid_ds(ds, axes_dims_dict={'X': 'lon', 'Y': 'lat'})

But I got and error RuntimeError: Either "boundary_discontinuity" or "pad" have to be specified.

I repeated with

grid_ds = xgcm.autogenerate.generate_grid_ds(ds, axes_dims_dict={'X': 'lon', 'Y': 'lat'},
                                            boundary_discontinuity={'lon': 360, 'lat': 180})

I understand why I need this option, but it feels a too complicated. Maybe we can think about some different default values or behaviors that avoid having to specify the boundary_discontinuity keyword in these simple cases.

cc @jbusecke

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
rabernatcommented, Jul 30, 2018

Sorry, my bad! I lost track of that PR. Will review now.

0reactions
github-actions[bot]commented, Jun 18, 2021

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

autogenerated default value for uuid columns #338 - GitHub
Expected behavior. Would have expected, that default value had been applied to column. Equal to, ALTER TABLE <table> alter column <column> ...
Read more >
Enable or disable autogenerated binding redirects
Disable automatic binding redirects in desktop apps. Automatic binding redirects are enabled by default for Windows desktop apps that target .
Read more >
SAP PowerDesigner - function parameter defaults - missing in ...
I am using PD 16.6.0.0.(4971). When I create a function with parameters and set default values for these "IN" parameters, for some reason ......
Read more >
Telerik Web Forms Working with Autogenerated Columns
Check our Web Forms article about Working with Autogenerated Columns. Read more in Telerik UI for ASP.NET AJAX Documentation.
Read more >
Changing autogenerated code in a C# Windows Forms ...
I have found some useful information, but I feel I need more. I think it's likely I will get that at stackoverflow.com. Update...
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