Installation with GitHub

This package has been tested on Windows, WSL on Windows and Linux

Cloning the GitHub repository to use CUWALID allows greater control with the code, this installation installs python and all dependencies with conda.

Using the PyPi package installation may be more simple if you just plan to run the model as it is.

Follow the steps below to get the model:

  1. Clone the GitHub repository and navigate to the main directory (CUWALID) in the terminal:

    git clone https://github.com/CornishLeo/CUWALID.git
    cd CUWALID
    
  2. Set up the conda environment:

    Enter into the installers directory and run the cwld_wos.bat file:

    cd installers
    # For windows
    cwld_wos.bat
    
    # For Linux and WSL
    sh cwld_linux.sh
    

    Wait for the installation to complete and then activate your environment using:

    conda activate cwld
    

    Exit the installers directory back into the main directory:

    cd ..
    
  3. Now you need to run a command to downlaod some of the files that are too large to be stored on github, follow the stops below from the root of the project:

    cd cuwalid/tools/
    python download_data.py
    
  4. Test everything has installed properly (Currently only for DRYP model)

    First ensure you have your environment activated with the command:

    Then enter the test directory and run the tests using these commands:

    cd tests/dryp/
    python run_tests.py
    

    Once all the tests have completed, the last bit of output should look similair to this:

    ************************************************************
    Infiltration approach: Philips
    Run Interception component
    100%|███████████████████████████████████████████████████████████████████████████████| 733/733 [00:21<00:00, 34.04days/s]
    *** SAVING RESULTS ***
    Traceback (most recent call last):
    File "/home/<username>/CUWALID/tests/test_dryp.py", line 24, in <module>
        test_dryp()
    File "/home/<username>/CUWALID/tests/test_dryp.py", line 19, in test_dryp
        assert np.allclose(out, ans)
    AssertionError
    Basin delineation: Test runs successfully
    
  5. Learn how to run the model with an example at this CUWALID Example github repository, or here here.