For steady flow, if you specify an upstream water surface and the upstream water surface is subcritical, I don’t think RAS will use it.
For mixed flow, if you specify an upstream supercritical water surface, a downstream subcritical water surface, and a flow, RAS will compute the locations(s) of the hydraulic jump. The location of the hydraulic jump is a free parameter.
For steady, subcritical, flow:
If you want to specify the upstream water surface and have RAS compute the flow,
Then: Add a storage area to the upstream end. Connect the upstream reach directly to the storage area and enter the desired water surface elevation for the storage area. Go to flow optimizations and turn on the Reach-Storage area optimization. RAS should compute the flow that is needed to get the correct water surface at the upstream end.