Tangier is really, really not worth that effort. There are great places in Morocco; Tangier isn't one of them. There are flights from many European cities to places in Morocco life Fes and Marrakech. You don't have to go to Morocco this year (and settle for Tangier) just because you'll be in Spain.
There are also many great places to see in Andalucia: Granada, Seville, Cordoba, Cadiz, Malaga, Ubeda/Baeza... I hope you are going to be able to see at least the first three. Unfortunately, Tarifa isn't well-positioned for day trips to Andalucia's highlights, though I guess Cadiz might be manageable. Andalucia is a very large region, and there's no single point from which it's practical to see it all.