this code is kept in https://github.com/norihiro-w/ogs/tree/keep-mapping-to-natural-coords