The stretching is indeed a crude methode, that's why I always stretch the terrain Y to begin with.
The modulo always got me a hard/clamped output, so I don't know how that would work properly. The problem with the second curve is that it also needs to point at the coast. Must be possible. Jon has done a lot in that area, but I was never able to replicate.