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/3996#issuecomment-1373993285,https://api.github.com/repos/pydata/xarray/issues/3996,1373993285,IC_kwDOAMm_X85R5XlF,1197350,2023-01-06T18:36:56Z,2023-01-06T18:47:48Z,MEMBER,"We found a nice solution to this using @TomNicholas's Datatree ```python import xarray as xr import datatree dt = datatree.open_datatree(""AQUA_MODIS.20220809T182500.L2.OC.nc"") def fix_dimension_names(ds): if 'pixel_control_points' in ds.dims: ds = ds.swap_dims({'pixel_control_points': 'pixels_per_line'}) return ds dt_fixed = dt.map_over_subtree(fix_dimension_names) all_dsets = [subtree.ds for node, subtree in dt_fixed.items()] ds = xr.merge(all_dsets, combine_attrs=""drop_conflicts"") ds = ds.set_coords(['latitude', 'longitude']) ds.chlor_a.plot(x=""longitude"", y=""latitude"", robust=True) ```  ","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 1, ""eyes"": 0}",,605608998 https://github.com/pydata/xarray/issues/3996#issuecomment-625290593,https://api.github.com/repos/pydata/xarray/issues/3996,625290593,MDEyOklzc3VlQ29tbWVudDYyNTI5MDU5Mw==,2497349,2020-05-07T14:30:18Z,2020-05-07T14:30:18Z,NONE,"Hi @dcherian thanks for the help, though this method seems a bit clunky it worked well and was reasonably fast.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,605608998 https://github.com/pydata/xarray/issues/3996#issuecomment-618492914,https://api.github.com/repos/pydata/xarray/issues/3996,618492914,MDEyOklzc3VlQ29tbWVudDYxODQ5MjkxNA==,2448579,2020-04-23T16:14:41Z,2020-04-23T16:14:41Z,MEMBER,You'll have to create one dataset per group and then merge. an xarray Dataset represents one group of a netcdf file. This model unfortunately breaks down when coordinate data are only present in one group. as in your dataset,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,605608998 https://github.com/pydata/xarray/issues/3996#issuecomment-618478015,https://api.github.com/repos/pydata/xarray/issues/3996,618478015,MDEyOklzc3VlQ29tbWVudDYxODQ3ODAxNQ==,2497349,2020-04-23T15:49:46Z,2020-04-23T15:49:46Z,NONE,"Thanks for the help @dcherian, that does work to get at the variables, such as `xds = xr.open_dataset(fn, group='geophysical_data'), but then it is missing all the coordinate data from the `navigation_data` group and other groups. Is there a preferred way (or just a good example) of opening multiple groups and merging them into a final dataset?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,605608998 https://github.com/pydata/xarray/issues/3996#issuecomment-618452406,https://api.github.com/repos/pydata/xarray/issues/3996,618452406,MDEyOklzc3VlQ29tbWVudDYxODQ1MjQwNg==,2448579,2020-04-23T15:09:45Z,2020-04-23T15:09:45Z,MEMBER,"You'll need to specify `group` when opening the file using `open_dataset`: https://xarray.pydata.org/en/stable/io.html#groups I think somewhere there is a comment saying xarray could support searching for coordinate data in groups other than the one requested. So you could look into implementing that if interested. Either way this would make a nice example notebook for the documentation.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,605608998