home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1098915891

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1098915891 I_kwDOAMm_X85BgCAz 6153 [FEATURE]: to_netcdf and additional keyword arguments 90008 open 0     2 2022-01-11T09:39:35Z 2022-01-20T06:54:25Z   CONTRIBUTOR      

Is your feature request related to a problem?

I briefly tried to see if any issue was brought up but couldn't.

I'm hoping to be able to pass additional keyword arguments to the engine when using to_netcdf. https://xarray.pydata.org/en/stable/generated/xarray.open_dataset.html

However, it doesn't seem to easy to do so.

Similar to how open_dataset has an additional **kwargs parameter, would it be reasonable to add a similar parameter, maybe engine_kwargs to the to_netcdf to allow users to pass additional parameters to the engine?

Describe the solution you'd like

```python import xarray as xr import numpy as np

dataset = xr.DataArray( data=np.zeros(3), name="hello" ).to_dataset()

dataset.to_netcdf("my_file.nc", engine="h5netcdf", engine_kwargs={"decode_vlen_strings=True"}) ```

Describe alternatives you've considered

One could forward the additional keyword arguments with **kwargs. I just feel like this makes things less "explicit".

Additional context

h5netcdf emits a warning that is hard to disable without passing a keyword argument to the constructor. https://github.com/h5netcdf/h5netcdf/issues/132

Also, for performance reasons, it might be very good to tune things like the storage data alignment.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6153/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 78.207ms · About: xarray-datasette