Divergence in limited area models for numerical weather prediction : doctoral thesis