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/pull/3545#issuecomment-586346637,https://api.github.com/repos/pydata/xarray/issues/3545,586346637,MDEyOklzc3VlQ29tbWVudDU4NjM0NjYzNw==,2448579,2020-02-14T15:52:21Z,2020-02-14T15:52:33Z,MEMBER,"I am now wondering if we can use `align` or `reindex` to do the filling for us. Example: goal is concat along 'x' with result dataset having `x=[1,2,3,4]` 1. Loop through datasets and assign coordinate values as appropriate. 2. Break datasets up into mappings `collected = {""variable"": [var1_at_x=1, var2_at_x=2, var4_at_x=4]}` -> there's some stuff in `merge.py` that could be reused for this 3. concatenate these lists to get a new mapping `concatenated = {""variable"": [var_at_x=[1,2,4]]}` 4. apply `reindexed = {concatenated[var].reindex(x=[1,2,3,4], fill_value=...) for var in concatenated}` 5. create dataset `Dataset(reindexed)` Step 1 would be where we deal with all the edge cases mentioned in @shoyer's comment viz > For example: > > Pre-existing vs non-pre-existing dimension > Pre-existing dimensions of different sizes > Missing data variables vs coordinates vs indexed coordinates ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,524043729 https://github.com/pydata/xarray/pull/3545#issuecomment-577737475,https://api.github.com/repos/pydata/xarray/issues/3545,577737475,MDEyOklzc3VlQ29tbWVudDU3NzczNzQ3NQ==,2448579,2020-01-23T15:41:33Z,2020-01-23T15:41:33Z,MEMBER,"> the most time consuming part is the expand_dims for every dataset, which accounts for roughly 80% overall concat runtime. Hmmm... maybe we need a short-circuit version of `expand_dims`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,524043729