Global simulation of tropospheric O3-NOx-hydrocarbon chemistry: 1. Model formulation