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/2811#issuecomment-473758690,https://api.github.com/repos/pydata/xarray/issues/2811,473758690,MDEyOklzc3VlQ29tbWVudDQ3Mzc1ODY5MA==,1217238,2019-03-18T03:37:08Z,2019-03-18T03:37:08Z,MEMBER,see https://github.com/pydata/xarray/pull/2818 for removing that warning,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870 https://github.com/pydata/xarray/issues/2811#issuecomment-473752674,https://api.github.com/repos/pydata/xarray/issues/2811,473752674,MDEyOklzc3VlQ29tbWVudDQ3Mzc1MjY3NA==,1217238,2019-03-18T03:01:44Z,2019-03-18T03:01:44Z,MEMBER,That warning should be removed — we already finished that deprecation cycle!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870 https://github.com/pydata/xarray/issues/2811#issuecomment-473359624,https://api.github.com/repos/pydata/xarray/issues/2811,473359624,MDEyOklzc3VlQ29tbWVudDQ3MzM1OTYyNA==,1217238,2019-03-15T16:44:40Z,2019-03-15T16:44:40Z,MEMBER,"This is due to the internal implementation of `xarray.concat`, which sometimes reorders variables. I doubt the reordering was intentional. It's probably just a side effect of how `concat` takes multiple passes over different types of variables to figure out how to combine them. You are welcome to take a look at improving this, though I doubt this would be particularly easy to fix. Certainly the code in `concat` could use some clean-up, and if we can preserve the order of variables on outputs that would be an improvement in usability. But it's still not something I would consider a ""bug"" *per se*.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870 https://github.com/pydata/xarray/issues/2811#issuecomment-473331876,https://api.github.com/repos/pydata/xarray/issues/2811,473331876,MDEyOklzc3VlQ29tbWVudDQ3MzMzMTg3Ng==,1217238,2019-03-15T15:31:23Z,2019-03-15T15:31:23Z,MEMBER,"> I was assuming something along that lines. But in my variable `test` the 'c' dim is first. And it is written correctly, if there are no coordinates in that dataset (test_dim0). If there are coordinates (test_dims2) the dimensions are written in wrong order. So there is something working in one config and not in the other. The order of dimensions in the netCDF file matches the order of their appearance on variables in the netCDF files. In your first file, it's `(c, b)` on variable `test`. In the second file, it's `b` on variable `b` and `c` from variable `test`. > My use case is, that the dimensions should appear in the same order as in the source files. Sorry, xarray is not going to satisfy this use. If you want this guarantee in all cases, you should pick a different tool.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870 https://github.com/pydata/xarray/issues/2811#issuecomment-473319350,https://api.github.com/repos/pydata/xarray/issues/2811,473319350,MDEyOklzc3VlQ29tbWVudDQ3MzMxOTM1MA==,1217238,2019-03-15T14:59:19Z,2019-03-15T14:59:19Z,MEMBER,"Dimensions are written to netCDF files in the order in which they appear on variables in the Dataset: https://github.com/pydata/xarray/blob/f382fd840dafa5fdd95e66a7ddd15a3d498c1bce/xarray/backends/common.py#L325-L329 It sounds like your use-case is writing netCDF files to disk with a desired dimension order? We could conceivably add an ""encoding"" option to datasets for specifying dimension order, like how we support controlling unlimited dimensions.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870 https://github.com/pydata/xarray/issues/2811#issuecomment-473183599,https://api.github.com/repos/pydata/xarray/issues/2811,473183599,MDEyOklzc3VlQ29tbWVudDQ3MzE4MzU5OQ==,1217238,2019-03-15T07:19:18Z,2019-03-15T07:19:18Z,MEMBER,"Your system might print dataset dimensions like `Frozen(SortedKeysDict({'c': 2, 'b': 3}))`, but the iteration order will always be sorted (including if you write the dataset to disk as netcdf file). When we drop support for Python 3.5, xarray might switch to dimensions matching order of insertion, since we'll get that for free with Python dictionary. But I still doubt we would make any guarantees about preserving dimension order in xarray operations, just like we don't guarantee variable order as part of xarray's API. It should be deterministic (with fixed versions of xarray and dependencies), but you shouldn't write your code in a way that breaks if changes. What's your actual use-case here? What are you trying to do that needs preserving of dimension order?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,420930870