CLAWRIM Wiki

The Computational Lab for Advanced Water Resources Informatics and Modeling

User Tools

Site Tools


howtos:how_to_install_hec-ras_on_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:how_to_install_hec-ras_on_linux [2024-07-21 09:39 am] – removed - external edit (Unknown date) 127.0.0.1howtos:how_to_install_hec-ras_on_linux [2024-08-30 06:45 pm] (current) hcho
Line 1: Line 1:
 +====== How to install HEC-RAS on Linux ======
  
 +Login to the Linux machine. In this example, we use NMSU's Discovery node ''discovery-l2'':
 +<code bash>
 +# connect to the NMSU network using either Wi-Fi or VPN
 +ssh NMSU_username@discovery-l2
 +# type your NMSU password
 +</code>
 +
 +Download the [[https://www.hec.usstart?rev=1721575766ace.army.mil/software/hec-ras/downloads/HEC-RAS_610_Linux.zip|HEC-RAS 6.1.0 Linux version]].
 +<code bash>
 +mkdir -p ~/archive/hecras
 +cd ~/archive/hecras
 +wget https://www.hec.usace.army.mil/software/hec-ras/downloads/HEC-RAS_610_Linux.zip
 +</code>
 +
 +Uncompress the downloaded file.
 +<code bash>
 +mkdir -p ~/usr/local/opt
 +cd ~/usr/local/opt
 +unzip ~/archive/hecras/HEC-RAS_610_Linux.zip
 +mv HEC-RAS_610_Linux hecras
 +</code>
 +
 +Uncompress Linux binaries.
 +<code bash>
 +cd hecras
 +unzip RAS_Linux_test_setup.zip
 +</code>
 +
 +Move binaries and libraries to ''~/usr/local/opt/hecras''.
 +<code bash>
 +mv RAS_Linux_test_setup/Ras_v61/Release bin
 +chmod a+x bin/*
 +mv RAS_Linux_test_setup/libs lib
 +</code>
 +
 +Set up environment variables for HEC-RAS. Don't type it; copy-paste ''cat << 'EOT'...EOT'' into the terminal.
 +<code bash>
 +cat << 'EOT' >> ~/.bash_profile
 +# HEC-RAS                    
 +export PATH="$HOME/usr/local/opt/hecras/bin:$PATH"
 +export LD_LIBRARY_PATH="$HOME/usr/local/opt/hecras/lib:$HOME/usr/local/opt/hecras/lib/mkl:$HOME/usr/local/opt/hecras/lib/rhel_8:$LD_LIBRARY_PATH"
 +EOT
 +
 +. ~/.bash_profile
 +</code>
 +
 +Let's test it.
 +<code bash>
 +cd RAS_Linux_test_setup/Muncie
 +cp wrk_source/Muncie.p04.tmp.hdf .
 +RasUnsteady Muncie.c04 b04
 +</code>
 +
 +Did it run?
 +
 +Delete extra files and directories.
 +<code bash>
 +cd ../..
 +rm -rf RAS* remove*
 +</code>

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki