I think you want to replace set_clim()
with
p.autoscale()
With no arguments, set_clim()
is a no-op.
That said, changing your color scale in the middle of an animations seems very misleading.
You should also use set_data
instead of set_array
(according to the docs).