Photorefractive harmonic gratings within the shallow trap model