I'm just pushing all my RWB statistical analysis codes here. Don't beat me up if they dont work. All these analysis are for checking RWB stats at a single isentropic level.
To check RWB stats on a merged file (all isentropic levels are present) if RWB event exists on 2 or more Isentropic levels, The resulting flagged_data (2d array) will have 1 where there are RWB event present on 2 or more vertial levels (otherwise zero)
Run these codes on the resultant 2D array obtained (RWB events present 2 or more vertical levels)