A globally integrated substorm model: Tail reconnection and magnetosphere-ionosphere coupling