I have a NetCDF file p_arr (shape: 87601440721). Now I want to get a new array events_arr (same size: 87601440721) according to these steps as follows: