home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 507658070

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
507658070 MDU6SXNzdWU1MDc2NTgwNzA= 3407 Save 'S1' array without the char_dim_name dimension 30388627 closed 0     2 2019-10-16T07:04:47Z 2019-10-16T08:55:02Z 2019-10-16T08:55:01Z NONE      

MCVE Code Sample

```python import numpy as np import xarray as xr tstr='2019-07-25_00:00:00' Times = xr.DataArray(np.array([" ".join(tstr).split()], dtype = 'S1'), dims = ['Time', 'DateStrLen']) ds = xr.Dataset({'Times':Times}) ds.to_netcdf('test.nc', format='NETCDF4',encoding={'Times': {'zlib':True, 'complevel':5}}, unlimited_dims={'Time':True})

```

Expected Output

Because I want to use the nc file as the input of WRF model, I just need Time and DateStrLen two dimensions.

ncdump -h test.nc:

``` netcdf test { dimensions: Time = UNLIMITED ; // (1 currently) DateStrLen = 19 ; variables: char Times(Time, DateStrLen) ; }

`` Although it's possible to set the exactchar_dim_nametoTimelike #2895, but I need the unlimitedTime` dimension as the first one.

Problem Description

This is the actual output of ncdump -h test.nc: netcdf test { dimensions: Time = UNLIMITED ; // (1 currently) DateStrLen = 19 ; string1 = 1 ; variables: char Times(Time, DateStrLen, string1) ; }

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.0.76-0.11-default machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.1 libnetcdf: 4.4.1.1 xarray: 0.13.0 pandas: 0.25.1 numpy: 1.17.2 scipy: 1.3.1 netCDF4: 1.3.1 pydap: None h5netcdf: None h5py: 2.8.0 Nio: None zarr: 2.3.2 cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.5.0 distributed: 2.5.2 matplotlib: 3.1.1 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 41.2.0 pip: 19.2.3 conda: None pytest: None IPython: 7.8.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3407/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

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