The translation 'It is raining in the farm' has the incorrect preposition. The correct sentence would be 'It is raining at the farm'.
Raining in the farm, would suggest that it rains in the farmhouse or in a farm building, which theoretically could happen if the farm building had the size and volume of a NASA VAB building, BUT that is probably not what the Portuguese sentence is trying to convey.
Best source I could find regarding place indicating prepositions:
I agree "in" is a very poor choice. Your answer makes sense. Why did you reject "on" though? A farm is an area of land so it can be rained on, no?
In Australia we would probably say "raining on the farm" or "raining at the farm" just as often.
"It rains in the farm" is wrong. My answer, "It rains on the farm," which was counted wrong, is right. So frustrating!