open_mfdataset not returning all data #5659
-
Hi, I have a few grib2 files and am trying to use open_mfdataset to read into one variable. A preprocess function makes a new time coord, along which the concatting should happen. But the resulting DataSet only contains the last file's data. The short code and the output of printing the datasets is below. Seems like this should work. Has anyone seen similar behavior, or otherwise see something wrong? I've posted the 2 grib files here, if anyone would like to try them. multi_reanal.ecg_4m.hs.197901.grb2, multi_reanal.ecg_4m.hs.197902.grb
Returned ds from open_mfdataset:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi Brian, This line
should be raising a warning for you:
because the default value of |
Beta Was this translation helpful? Give feedback.
Hi Brian,
This line
xr.open_mfdataset(files, engine='cfgrib', preprocess=preprocess, concat_dim='step', parallel=False)
should be raising a warning for you:
because the default value of
combine='by_coords'
for this function. This also means the concatenation behaviour is probably not as you are expecting. Are you using the most recent version of xarray?