A three-dimensional modeling study of the influence of planetary wave dynamics on polar ozone photochemistry