P1[t_] :=
Module[{pts},
pts = Cases[Plot[uwave1[t, 0.5, z]^2, {z, 0, 50}, PlotRange -> All],
Line[a_] :> a, Infinity];
RegionCentroid@
Polygon@
Join[{{pts[[1, 1, 1]], 0}}, pts[[1]], {{pts[[1, -1, 1]], 0}}]]
Here P1[t] is a point $(a,b)$ in 2D space which varies with time. How shall I plot the value of $a$ against time?