Long weakly nonlinear waves in geophysical applications