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 1194945072,I_kwDOAMm_X85HOWow,6447,allow merging datasets where a variable might be a coordinate variable only in a subset of datasets,2448579,open,0,,,1,2022-04-06T17:53:51Z,2022-11-16T03:46:56Z,,MEMBER,,,,"### Is your feature request related to a problem? Here are two datasets, in one `a` is a data_var, in the other `a` is a coordinate variable. The following fails ``` python import xarray as xr ds1 = xr.Dataset({""a"": ('x', [1, 2, 3])}) ds2 = ds1.set_coords(""a"") ds2.update(ds1) ``` with ``` 649 ambiguous_coords = coord_names.intersection(noncoord_names) 650 if ambiguous_coords: --> 651 raise MergeError( 652 ""unable to determine if these variables should be "" 653 f""coordinates or not in the merged result: {ambiguous_coords}"" 654 ) 656 attrs = merge_attrs( 657 [var.attrs for var in coerced if isinstance(var, (Dataset, DataArray))], 658 combine_attrs, 659 ) 661 return _MergeResult(variables, coord_names, dims, out_indexes, attrs) MergeError: unable to determine if these variables should be coordinates or not in the merged result: {'a'} ``` ### Describe the solution you'd like I think we should replace this error with a warning and arbitrarily choose to either convert `a` to a coordinate variable or a data variable. ### Describe alternatives you've considered _No response_ ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6447/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1194790343,I_kwDOAMm_X85HNw3H,6445,map removes non-dimensional coordinate variables,2448579,open,0,,,0,2022-04-06T15:40:40Z,2022-04-06T15:40:40Z,,MEMBER,,,,"### What happened? ``` python ds = xr.Dataset( {""a"": (""x"", [1, 2, 3])}, coords={""c"": (""x"", [1, 2, 3]), ""d"": (""y"", [1, 2, 3, 4])} ) print(ds.coords) mapped = ds.map(lambda x: x) print(mapped.coords) ``` Variables `d` gets dropped in the `map` call. It does not share any dimensions with any of the data variables. ``` Coordinates: c (x) int64 1 2 3 d (y) int64 1 2 3 4 Coordinates: c (x) int64 1 2 3 ``` ### What did you expect to happen? _No response_ ### Minimal Complete Verifiable Example _No response_ ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment xarray 2022.03.0","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6445/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue