Hi Ange,
You can do this in HEC-RAS, but the cross section points should be station-elevation rather than station-depth. One approach would be to use an arbitrary elevation for the crest, say 1000, and then subtract the depths from that value (you can also just subtract them from 0 if you don’t mind negative elevations).
When you run the model, you can use the “Set Changes in WS and EG…” option in the Flow Data Editor to fix the water surface elevation at the crest elevation for each of the cross sections behind the dam.
In the output table, you can use the Define Table option to select the Volume variable, which computes a cumulative volume. Or you can use the computed flow area at each cross section along with the reach lengths to compute the volume.
Hope this helps.
– Jake G