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/5030#issuecomment-1058577301,https://api.github.com/repos/pydata/xarray/issues/5030,1058577301,IC_kwDOAMm_X84_GJuV,35968931,2022-03-03T22:35:08Z,2022-03-03T22:37:16Z,MEMBER,"> For datatree, you could apply the reduction with the set-intersection of provided dims and dims present in a node (if that's the right term).
I specifically want the user to be able to choose between different behaviours with a flag, but you're right that I could just deal with this at the datatree level instead of here. That would make a fair amount of sense, and it would cover Julius' use-case (via encouraging him to store his models in a tree, so that `for ds in model_datasets` would become a loop over nodes in a tree).
> My concern is that we could conceivably adding missing_dims to any function that takes a dim argument, which is pretty much the whole API.
Do you think that's a problem though? We added `keep_attrs` to even more of the API than this would cover. Specifically I would want to add it to the `REDUCE_METHODS`, the `NAN_REDUCE_METHODS`, and the `NAN_CUM_METHODS` (so `{""all"", ""any"", ""max"", ""min"", ""mean"", ""prod"", ""sum"", ""std"", ""var"", ""median"", ""cumsum"", ""cumprod""}`).
I'm fine with doing it either here or in `datatree` personally.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672
https://github.com/pydata/xarray/issues/5030#issuecomment-1058532014,https://api.github.com/repos/pydata/xarray/issues/5030,1058532014,IC_kwDOAMm_X84_F-qu,2448579,2022-03-03T21:56:55Z,2022-03-03T21:57:21Z,MEMBER,"My concern is that we could conceivably adding `missing_dims` to any function that takes a `dim` argument, which is pretty much the whole API.
For datatree, you could apply the reduction with the set-intersection of provided dims and dims present in a node (if that's the right term).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672
https://github.com/pydata/xarray/issues/5030#issuecomment-1058446727,https://api.github.com/repos/pydata/xarray/issues/5030,1058446727,IC_kwDOAMm_X84_Fp2H,35968931,2022-03-03T20:19:39Z,2022-03-03T20:19:39Z,MEMBER,"I ran into the same sort of thing today, when trying to loop over many datasets (each of which contained the contents of a node in a datatree...).
I also think that adding a `missing_dims` argument to all the array reduce methods would be useful, and I plan to have a go at it.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672
https://github.com/pydata/xarray/issues/5030#issuecomment-797850555,https://api.github.com/repos/pydata/xarray/issues/5030,797850555,MDEyOklzc3VlQ29tbWVudDc5Nzg1MDU1NQ==,2448579,2021-03-13T02:23:38Z,2021-03-13T02:23:38Z,MEMBER,"Alternatively, you could run the following at the beginning
``` python
# not sure if syntax is right
model_datasets = [
ds.expand_dims('member_id')
if ""member_id"" not in ds.coords else ds
for ds in model_datasets
]
```
so all your datasets are consistent.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672
https://github.com/pydata/xarray/issues/5030#issuecomment-797842748,https://api.github.com/repos/pydata/xarray/issues/5030,797842748,MDEyOklzc3VlQ29tbWVudDc5Nzg0Mjc0OA==,5635139,2021-03-13T01:30:36Z,2021-03-13T01:30:36Z,MEMBER,"That seems like a reasonable suggestion @jbusecke .
To confirm, would `ds.groupby('lat', 'long').mean(...)` work? i.e. are the dimensions you _don't_ want to reduce over reliable?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,830638672