home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 292585285

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
292585285 MDU6SXNzdWUyOTI1ODUyODU= 1865 Dimension Co-ordinates incorectly saving _FillValue attribute 6153603 closed 0     6 2018-01-29T22:31:43Z 2018-02-13T18:34:36Z 2018-02-13T18:34:36Z CONTRIBUTOR      

Code Sample, a copy-pastable example if possible

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

temp = 273.15 + 25 * np.random.randn(2, 2) lon = [0.0, 5.0] lat = [10.0, 20.0]

ds = xr.Dataset({'temperature': (['lat', 'lon'], temp)}, coords={'lat': lat, 'lon': lon})

ds['lat'].attrs = { 'standard_name': 'latitude', 'long_name': 'latitude', 'units': 'degrees_north', 'axis': 'Y'} ds['lon'].attrs = { 'standard_name': 'longitude', 'long_name': 'longitude', 'units': 'degrees_east', 'axis': 'X'} ds['temperature'].attrs = { 'standard_name': 'air_temperature', 'units': 'K'} ds.attrs = { ('title', 'non-conforming CF 1.6 data produced by xarray 0.10'), ('Conventions', 'CF-1.6')}

ds.to_netcdf('/tmp/test.nc')

```

Problem description

According to the last sentence of the first paragraph of 2.5.1. Missing data, valid and actual range of data in NetCDF Climate and Forecast (CF) Metadata Conventions 1.7:

Missing data is not allowed in coordinate variables.

When I use the conformance checker it issues an INFO message to this point for the co-ordinate variables.

Output of CF-Checker follows...

`` CHECKING NetCDF FILE: /tmp/29428.nc ===================== Using CF Checker Version 3.0.0 Checking against CF Version CF-1.6 Using Standard Name Table Version 48 (2017-11-28T15:32:48Z) Using Area Type Table Version 6 (22 February 2017)


Checking variable: temperature


Checking variable: lat

INFO: attribute _FillValue is being used in a non-standard way


Checking variable: lon

INFO: attribute _FillValue is being used in a non-standard way

ERRORS detected: 0 WARNINGS given: 0 INFORMATION messages: 2 ```

Expected Output

Co-ordinate variables should not store a _FillValue attribute

Output of xr.show_versions()

INSTALLED VERSIONS

commit: None python: 3.6.4.final.0 python-bits: 64 OS: Linux OS-release: 4.14.15-1-ARCH machine: x86_64 processor: byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.0 pandas: 0.22.0 numpy: 1.14.0 scipy: 1.0.0 netCDF4: 1.3.1 h5netcdf: 0.5.0 Nio: None bottleneck: 1.2.1 cyordereddict: None dask: 0.16.1 matplotlib: 2.1.2 cartopy: None seaborn: None setuptools: 38.4.0 pip: 9.0.1 conda: None pytest: None IPython: None sphinx: None

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1865/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
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.72ms · About: xarray-datasette