Tate duality in positive dimension and applications