html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/4927#issuecomment-782820367,https://api.github.com/repos/pydata/xarray/issues/4927,782820367,MDEyOklzc3VlQ29tbWVudDc4MjgyMDM2Nw==,5821660,2021-02-21T08:34:10Z,2021-02-21T08:34:10Z,MEMBER,"Closing as ""won't fix"" due to issue based on non-standard behaviour. Anyone finding this issue, a workaround is shown in the OP. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782808567,https://api.github.com/repos/pydata/xarray/issues/4927,782808567,MDEyOklzc3VlQ29tbWVudDc4MjgwODU2Nw==,5821660,2021-02-21T06:31:26Z,2021-02-21T06:31:26Z,MEMBER,"@dcherian Thanks, I've thought around the same. But it will be a bit more involved because this will be used in a new `BackendEntrypoint` in a downstream package. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782783402,https://api.github.com/repos/pydata/xarray/issues/4927,782783402,MDEyOklzc3VlQ29tbWVudDc4Mjc4MzQwMg==,2448579,2021-02-21T02:22:02Z,2021-02-21T02:22:02Z,MEMBER,"Thanks @spencerkclark I missed that those conventions specified that the `units` attribute should include the datetime string. @kmuehlbauer you could ``` python ds = xr.open_dataset(..., decode_times=False) ds = rewrite_time_reference_units(ds) ds = xr.decode_cf(ds) ```","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782747982,https://api.github.com/repos/pydata/xarray/issues/4927,782747982,MDEyOklzc3VlQ29tbWVudDc4Mjc0Nzk4Mg==,5821660,2021-02-20T20:53:59Z,2021-02-20T20:53:59Z,MEMBER,"@spencerkclark If it's not exactly standard, it's not standard. So I completely understand your concerns. I just need to figure out, how to work around this downstream. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782739934,https://api.github.com/repos/pydata/xarray/issues/4927,782739934,MDEyOklzc3VlQ29tbWVudDc4MjczOTkzNA==,6628425,2021-02-20T19:51:34Z,2021-02-20T19:51:34Z,MEMBER,"Yeah, I understand, these kinds of metadata issues can be frustrating to deal with, especially when things are close to being valid, but not quite. That said, I'm afraid I would be -1 on adding special logic to handle this to xarray, though I'm open to being convinced if others feel otherwise. (The time bounds logic is a bit different, because there are indeed [CF Conventions pertaining to that](http://cfconventions.org/cf-conventions/cf-conventions.html#cell-boundaries)).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782737641,https://api.github.com/repos/pydata/xarray/issues/4927,782737641,MDEyOklzc3VlQ29tbWVudDc4MjczNzY0MQ==,5821660,2021-02-20T19:33:42Z,2021-02-20T19:33:42Z,MEMBER,"@spencerkclark The problem is I have exactly these files which have a time attrs units reading ""time since time_reference"" and a variable ""time_reference"" with the needed time string. OK, I can use the fix I showed above.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782735912,https://api.github.com/repos/pydata/xarray/issues/4927,782735912,MDEyOklzc3VlQ29tbWVudDc4MjczNTkxMg==,6628425,2021-02-20T19:20:47Z,2021-02-20T19:20:47Z,MEMBER,"@kmuehlbauer thanks -- in my reading of the table under Section 4.4.1 (Attributes for time coordinate variable) it seems like the actual value of the date should appear in the units attribute of the time coordinate (matching the ""time_reference"" or ""time_coverage_start"" variable is a separate condition). ![Screen Shot 2021-02-20 at 2 13 31 PM](https://user-images.githubusercontent.com/6628425/108606064-d9643600-7385-11eb-91a7-990afc2c0f75.png)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782735668,https://api.github.com/repos/pydata/xarray/issues/4927,782735668,MDEyOklzc3VlQ29tbWVudDc4MjczNTY2OA==,5821660,2021-02-20T19:18:48Z,2021-02-20T19:18:48Z,MEMBER,@spencerkclark We might restrict it to just that name `time_reference` over in #4933. WDYT?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782734731,https://api.github.com/repos/pydata/xarray/issues/4927,782734731,MDEyOklzc3VlQ29tbWVudDc4MjczNDczMQ==,5821660,2021-02-20T19:11:01Z,2021-02-20T19:11:01Z,MEMBER,@spencerkclark This is specified in CfRadial1 https://www.eol.ucar.edu/system/files/CfRadialDoc.v1.4.20160801.pdf,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782733509,https://api.github.com/repos/pydata/xarray/issues/4927,782733509,MDEyOklzc3VlQ29tbWVudDc4MjczMzUwOQ==,6628425,2021-02-20T19:02:02Z,2021-02-20T19:02:02Z,MEMBER,"Sorry for chiming in a bit late -- I just want to make sure, is this truly valid under the [CF Conventions](https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#time-coordinate)? It seems to open the door for ambiguity; e.g. it's a pathological example, but one could imagine a ""time_reference"" variable named in the form of a date. In that case what takes precedence when decoding the times, the value of the date in the name, or the value the variable refers to?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782112972,https://api.github.com/repos/pydata/xarray/issues/4927,782112972,MDEyOklzc3VlQ29tbWVudDc4MjExMjk3Mg==,5821660,2021-02-19T14:34:35Z,2021-02-19T14:34:35Z,MEMBER,"Thanks @dcherian, this looks like a way to try. I'll give it a try.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067 https://github.com/pydata/xarray/issues/4927#issuecomment-782111696,https://api.github.com/repos/pydata/xarray/issues/4927,782111696,MDEyOklzc3VlQ29tbWVudDc4MjExMTY5Ng==,2448579,2021-02-19T14:32:28Z,2021-02-19T14:32:28Z,MEMBER,"https://github.com/pydata/xarray/blob/070d8158aab31c6a53efb36f9ea4a57dc6671e43/xarray/conventions.py#L498-L500 Looks like we treat time bounds specially. You could add a helper function to this if condition that rewrites `""seconds since time_reference""` to `""seconds since 1970-01-01T00:00:00Z""` and the rest of the decoding machinery should just work. This approach might break round-tripping that file though. Perhaps saving `encoding[""units""] = ""seconds since time_reference""` fixes that?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,811933067