Make a promotion like PROMOTION_OCEAN_IMPASSABLE_UNTIL_ASTRONOMY, but in the UnitPromotions_Terrains table, use Desert instead of Ocean, and the tech required to pass Deserts instead of Astronomy. And give this promotion to those land units that shouldn't be able to pass deserts without the tech.