In this phrase '天気が好きなんです' 好きな follows the subject marker. Is this because the phrase ends with んです?
In 天気が好きなんです, "好きなんです" is the predicate. Subject + が + predicate is a common sentence pattern.
As for why 好きな follows 天気が, you cannot simply say 天気が好きな. First, at the most elementary level, you will have learned to use 天気が好きだ to mean "(I) like the weather." Here 好きだ is the predicate. You cannot say 天気が好きな because as a na-adjective, 好きな must be followed by a noun that it modifies.
Note that んです is not a fancy version of だ. んです arises as follows. First, 好きな modifies の, which is a 形式名詞. の here doesn't have an intrinsic meaning. It simply serves a syntactic purpose, allowing you to use an adjective where a noun is required. As a noun phrase, 好きなの cannot be a predicate; it must be followed by だ/です. So we have 天気が好きなのです. Informally, の can be replaced by ん and you have 天気が好きなんです.