Modelling the effect of atmospheric pressure variations on gravity