Skip to content

Instantly share code, notes, and snippets.

@kmuehlbauer
Last active January 13, 2024 14:18
Show Gist options
  • Save kmuehlbauer/645e42a53b30752230c08c20a9c964f9 to your computer and use it in GitHub Desktop.
Save kmuehlbauer/645e42a53b30752230c08c20a9c964f9 to your computer and use it in GitHub Desktop.
xarray and pysteps, just good friends
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cvelascof
Copy link

in xarray_pysteps.ipynb [14], by using

bom = xr.open_mfdataset(filename, concat_dim='valid_time')

all files are correctly concatenated by the end time of the accumulation period.

@kmuehlbauer
Copy link
Author

@cvelascof Yes, you're right, this would work too, thanks! Regarding accumulation period, how is it with the MCH GIF files? Is it the minutes before or after the timestamp in the filename?

@cvelascof
Copy link

Not sure on MCH GIF files. Best assumption is always minutes until timestamp. Perhaps @dnerini knows.

@dnerini
Copy link

dnerini commented Jun 26, 2019

It is the accumulation in minutes before timestamp for all the MCH QPE products.

ps: I really like the way your're putting together xarrays and pystpes, very impressive!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment