home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where repo = 13221727 and user = 8100801 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 1

  • issue 2

state 1

  • closed 2

repo 1

  • xarray · 2 ✖
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
1339921253 I_kwDOAMm_X85P3ZNl 6919 Parallel read with MPI mengaldo 8100801 closed 0     4 2022-08-16T07:19:14Z 2023-09-12T15:16:32Z 2023-09-12T15:16:31Z NONE      

Is your feature request related to a problem?

Is it possible to somehow extend xarray to use MPI I/O?

Describe the solution you'd like

We would need to know the offset from where the actual data starts within the file. Is there a way of retrieving that? Disclaimer: I am not an expert of NetCDF format - so, apologies if the question is trivial!

Describe alternatives you've considered

No response

Additional context

No response

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6919/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue
577068248 MDU6SXNzdWU1NzcwNjgyNDg= 3842 Mixed datatypes Dataset.to_netcdf() mengaldo 8100801 closed 0     3 2020-03-06T17:16:13Z 2020-03-23T15:12:18Z 2020-03-23T05:38:31Z NONE      

Not sure if this is intended, but when I try to save a Dataset to netCDF using Dataset.to_netcdf(), it produces the following error: ValueError: could not convert string to float: 'a'

This seems to be due to forcing datatypes to be equal to the datatype of the first column encountered. See below a simple working example.

MCVE Code Sample

```python import pandas as pd import xarray as xr

df = pd.DataFrame() df['Values' ] = [1.0,2.0,3.0] df['Strings'] = ['a','b','c']

da = xr.DataArray(df) ds = xr.Dataset() ds['A'] = da ds.to_netcdf('A.nc')

```

Expected Output

Gianmarcos-MacBook-Pro-2:examples gian$ python3 test_xarray.py Traceback (most recent call last): File "test_xarray.py", line 11, in <module> ds.to_netcdf('A.nc') File "/usr/local/lib/python3.7/site-packages/xarray/core/dataset.py", line 1232, in to_netcdf compute=compute) File "/usr/local/lib/python3.7/site-packages/xarray/backends/api.py", line 749, in to_netcdf unlimited_dims=unlimited_dims) File "/usr/local/lib/python3.7/site-packages/xarray/backends/api.py", line 792, in dump_to_store unlimited_dims=unlimited_dims) File "/usr/local/lib/python3.7/site-packages/xarray/backends/common.py", line 261, in store variables, attributes = self.encode(variables, attributes) File "/usr/local/lib/python3.7/site-packages/xarray/backends/common.py", line 347, in encode variables, attributes = cf_encoder(variables, attributes) File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 605, in cf_encoder for k, v in iteritems(variables)) File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 605, in <genexpr> for k, v in iteritems(variables)) File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 241, in encode_cf_variable var = ensure_dtype_not_object(var, name=name) File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 201, in ensure_dtype_not_object data = _copy_with_dtype(data, dtype=_infer_dtype(data, name)) File "/usr/local/lib/python3.7/site-packages/xarray/conventions.py", line 160, in _copy_with_dtype result[...] = data ValueError: could not convert string to float: 'a'

Problem Description

It should be able to save the file into netcdf format?

Versions

Output of `xr.show_versions()` INSTALLED VERSIONS ------------------ commit: None python: 3.7.6 (default, Jan 7 2020, 19:34:32) [Clang 11.0.0 (clang-1100.0.33.16)] python-bits: 64 OS: Darwin OS-release: 19.2.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: C LOCALE: None.UTF-8 libhdf5: 1.10.2 libnetcdf: 4.4.1.1 xarray: 0.11.2 pandas: 0.24.2 numpy: 1.16.2 scipy: 1.1.0 netCDF4: 1.4.3.2 pydap: None h5netcdf: None h5py: 2.8.0 Nio: None zarr: None cftime: 1.0.3.4 PseudonetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.2.1 cyordereddict: None dask: 0.19.4 distributed: None matplotlib: 3.0.2 cartopy: None seaborn: 0.9.0 setuptools: 42.0.2 pip: 20.0.2 conda: None pytest: 3.8.2 IPython: 7.1.1 sphinx: 1.8.4
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3842/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 26.304ms · About: xarray-datasette