Analyzing Droughts in Xarray DataArray – Identifying consecutive ocurrences (Trues) in boolean array and their cumsum
I’m working with an Xarray data array (data
) containing precipitation data. I want to analyze droughts as years falling below a specific threshold. Here’s what I’m trying to achieve without relying on explicit loops (ideal for large 3D datasets):
Xarray return the dimensional information for minimum
When we handle the climate model output, we often get a NetCDF file with dimensions including member, lon, lat. Foe every member, how do we get the minimum of data, the lon and the lat of the data?