2d curvilinear coordinate transformation