issue_comments: 1373993285
This data as json
| 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 |
