Identifying causal gateways and mediators in complex spatio-temporal systems