Converting code for regional models