bilke / hydrus

CMake-ified Hydrus-1D
http://www.pc-progress.com/en/Default.aspx?hydrus-1d
GNU General Public License v3.0
6 stars 10 forks source link

Installing on Ubuntu #2

Open ebsbel opened 8 years ago

ebsbel commented 8 years ago

I managed to install the model on an Ubuntu server 14.04. Apart from gcc and cmake you need to install gfortran: apt-get install gfortran The order of the cmake command is reversed in Ubuntu (probably any Debian based system): cmake [-G "MSYS Makefiles"] ../hydrus/

Now it compiled successfully.

To run the model you need a file named LEVEL_01.DIR containing the input/output folder. I also needed to change the HYDRUS.FOR file as suggested in this discussion.

In the HYDRUS.FOR file, beside the instruction given online, we need to correct the file path as well. For example,

cFileName = cDataPath(1:iLengthPath)//'\Selector.in'

need to change to

cFileName = cDataPath(1:iLengthPath)//'/Selector.in'

This sed command seems to get the job done: sed -i 's/\\/\//g' HYDRUS.FOR So now the model needs to be compiled again. It ran successfully with test data from Examples\Direct\1INFILTR.

HeymansAdrien commented 4 years ago

Thank you for the usefull comments.

the cmake [-G "MSYS Makefiles"] ../hydrus/ was, indeed, needed to do the make

I manage to run hydrus but this happen at the end. image

It seems to run but no output have been saved. Could this be solved by changing the code or change of compiler ?