The best solution I have been able to find comes from a blog, The RAS Solution. It doesn't completely solve the problem, but we'll follow their steps until it becomes necessary to diverge.
- Add at least one map of each type using the Manage Results Maps window.
Save and exit the program. With HEC-RAS closed, find and open the
your_file.rasmap document. You may wish to create a backup of this file first.
In the rasmap file, look for the Results section. You should find something which resembles the following:
<Layer Name="depth" Type="RASResultsMap" Checked="True">
<Pen A="255" R="0" G="255" B="255" Width="2" />
<Brush A="32" R="32" G="178" B="170" />
<SurfaceFill Alpha="255" Colors="-16711681,-16777077" Values="0,15" Stretched="True" />
<Contour On="False" Interval="5" Color="-16777216" />
<LabelFeatures Checked="True" rows="1" cols="1" r0c0="Map Value" Position="5" Color="-16777216" />
<MapParameters MapType="depth" LayerName="Depth" OutputMode="Stored Current Terrain" StoredFilename=".\Inundation Mapping\Depth (Jan 1).vrt" Terrain="Terrain" ContourPolygonValue="0" ProfileIndex="0" ProfileName="Jan 1" ArrivalDepth="0" ArrivalStartMode="0" Hours="True" />
Now this is where the provided solution at the above-referenced blog post falls short. It is suggested that you simply copy and paste this block of code and replace the appropriate
In my experience, however, doing so yields the following results:
But I don't need 365 copies of Jan 1! And also, the process of finding and replacing all the file/profile names isn't that much of a time-saver of the endless clicking of before.
Turns out, when RAS Mapper loads
your_file.rasmap, it's really reading the
ProfileIndex="x" parameter, then filling the other parameters based on the value of x. In the above situation, when I re-opened my .rasmap file all of my edits to
StoredFilename had been replaced.
- Copy the block of code from before and duplicate it until you have n of them, and simply update
ProfileIndex to incrementally increase up to n-1. Depending on the program you're using (Vim, Notepad++, &c) and your proficiency, you can do this right in your editor.
If that's above your head (as it was for me when I first encountered this problem), it's also possible to do via a spreadsheet program:
- Column A: XML code from Layer thru ProfileIndex="
- Column B: An incremental field beginning at 0, increasing by 1.
- Column C: XML code following the ProfileIndex closequote thru to /Layer.
- Column D:
Copy column D into your .rasmap file where the original layer information was. It will be an ugly block of code, but the program will still read it just fine.
However you got your .rasmap file updated, save and close. Open HEC-RAS and get to the Manage Results Maps again. You should now see a full list of your maps!
Select all, click Compute/Update Stored Maps. Once finished, open the destination folder, where you will find all your files. Hooray for time saved!