If you're getting map.rwm then there is no landmass/sea area problem, and if all ports and cities look correctly located in corrected_regions then map_heights can't be causing problem.