home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 89268800

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
89268800 MDU6SXNzdWU4OTI2ODgwMA== 438 `xray.open_mfdataset` concatenates also variables without time dimension 3404817 closed 0   1172685 13 2015-06-18T11:34:53Z 2017-09-19T16:16:58Z 2015-07-15T21:47:11Z CONTRIBUTOR      

When opening a multi-file dataset with xray.open_mfdataset, also some variables are concatenated that do not have a time dimension.

My netCDF files contain a lot of those "static" variables (e.g. grid spacing etc.). netCDF4.MFDataset used to handle those as expected (i.e. did not concatenate them).

Is the different behaviour of xray.open_mfdataset intentional or due to a bug?

Note: I am using decode_times=False.

Example

python with xray.open_dataset(files[0], decode_times=False) as single: print single['dz']

<xray.DataArray 'dz' (z_t: 60)> array([ 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1000. , 1019.68078613, 1056.44836426, 1105.99511719, 1167.80700684, 1242.41333008, 1330.96777344, 1435.14099121, 1557.12585449, 1699.67956543, 1866.21240234, 2060.90234375, 2288.85205078, 2556.24707031, 2870.57495117, 3240.8371582 , 3677.77246094, 4194.03076172, 4804.22363281, 5524.75439453, 6373.19189453, 7366.94482422, 8520.89257812, 9843.65820312, 11332.46582031, 12967.19921875, 14705.34375 , 16480.70898438, 18209.13476562, 19802.234375 , 21185.95703125, 22316.50976562, 23186.49414062, 23819.44921875, 24257.21679688, 24546.77929688, 24731.01367188, 24844.328125 , 24911.97460938, 24951.29101562, 24973.59375 , 24985.9609375 , 24992.67382812, 24996.24414062, 24998.109375 ]) Coordinates: * z_t (z_t) float32 500.0 1500.0 2500.0 3500.0 4500.0 5500.0 6500.0 ... Attributes: long_name: thickness of layer k units: centimeters

python with xray.open_mfdataset(files, decode_times=False) as multiple: print multiple['dz']

<xray.DataArray 'dz' (time: 12, z_t: 60)> dask.array<concatenate-1156, shape=(12, 60), chunks=((1, 1, 1, ..., 1, 1), (60,)), dtype=float64> Coordinates: * z_t (z_t) float32 500.0 1500.0 2500.0 3500.0 4500.0 5500.0 6500.0 ... * time (time) float64 3.653e+04 3.656e+04 3.659e+04 3.662e+04 ... Attributes: long_name: thickness of layer k units: centimeters

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/438/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

  • 1 row from issues_id in issues_labels
  • 13 rows from issue in issue_comments
Powered by Datasette · Queries took 0.673ms · About: xarray-datasette