home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1213062603

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/6909#issuecomment-1213062603 https://api.github.com/repos/pydata/xarray/issues/6909 1213062603 IC_kwDOAMm_X85ITd3L 5821660 2022-08-12T12:31:04Z 2022-08-12T12:31:04Z MEMBER

This would be not as easy.

  1. If you want to stick with a single line of code you would need to feed a nested list:

[[t0_f0, t0_f1, ...], [t1_f0, t1_f1, ...], [...]].

ds = xr.open_mfdataset(file_list, engine='cfgrib', combine="nested", concat_dim=["time", "generalVerticalLayer"], coords="minimal", compat="override") But note that it will take some coordinates from the first timestep only (eg. valid_time).

This might work without coords="minimal", compat="override", if you provide equivalent layers for each timestep.

2. You can break this into pieces:

python d0 = xr.open_mfdataset(file_list[0], engine='cfgrib', combine="nested", concat_dim="generalVerticalLayer") d1 = xr.open_mfdataset(file_list[1], engine='cfgrib', combine="nested", concat_dim="generalVerticalLayer") ds = xr.concat([ds1, ds2], dim="time")

I'm not sure if there is an incantation to get it work with a oneliner, but others might know.

{
    "total_count": 2,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1336946890
Powered by Datasette · Queries took 0.65ms · About: xarray-datasette