|
1 | 1 | # processing |
2 | | -Examples about running the STEMMUS-SCOPE model |
| 2 | + |
| 3 | +This repositary includes python modules for running the STEMMUS-SCOPE model in a |
| 4 | +notebook. |
| 5 | + |
| 6 | +The workflow is executed using python and MATLAB Runtime on a Unix-like system. |
| 7 | +The python packages are listed in the |
| 8 | +[`environment.yml`](https://github.com/EcoExtreML/processing/blob/main/environment.yml) |
| 9 | +file. Follow the instructions below to create conda environment and install |
| 10 | +MATLAB Runtime. |
| 11 | + |
| 12 | +<details> |
| 13 | + <summary>Create conda environment </summary> |
| 14 | + |
| 15 | +Run the commands below in a terminal: |
| 16 | + |
| 17 | +```sh |
| 18 | +# Download and install Conda |
| 19 | +wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh |
| 20 | +bash Mambaforge-pypy3-Linux-x86_64.sh |
| 21 | +-b -p ~/mamba |
| 22 | + |
| 23 | +# Update base environment |
| 24 | +. ~/mamba/bin/activate |
| 25 | +mamba update --name base mamba |
| 26 | + |
| 27 | +# Clone this repository |
| 28 | +git clone https://github.com/EcoExtreML/processing.git |
| 29 | + |
| 30 | +# Create a conda environment called 'stemmus' with all required dependencies |
| 31 | +cd processing |
| 32 | +mamba env create |
| 33 | + |
| 34 | +# The environment can be activated with |
| 35 | +. ~/mamba/bin/activate stemmus |
| 36 | + |
| 37 | +``` |
| 38 | +</details> |
| 39 | + |
| 40 | +<details> |
| 41 | + <summary>Install MATLAB Runtime </summary> |
| 42 | + |
| 43 | +To run the STEMMUS_SCOPE, you need MATLAB Runtime version `2021a`. |
| 44 | + |
| 45 | +In a terminal: |
| 46 | + |
| 47 | +```sh |
| 48 | +# Download MATLAB Runtime for Linux |
| 49 | +wget https://ssd.mathworks.com/supportfiles/downloads/R2021a/Release/6/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021a_Update_6_glnxa64.zip |
| 50 | + |
| 51 | +# Unzip the file |
| 52 | +unzip MATLAB_Runtime_R2021a_Update_6_glnxa64.zip |
| 53 | + |
| 54 | +# Install it |
| 55 | +cd MATLAB_Runtime_R2021a_Update_6_glnxa64 |
| 56 | +sudo -H ./install -mode silent -agreeToLicense yes |
| 57 | +``` |
| 58 | + |
| 59 | +For more information on how to download and install it, see the links below: |
| 60 | +- [download](https://nl.mathworks.com/products/compiler/matlab-runtime.html) |
| 61 | +- [intallation](https://nl.mathworks.com/help/compiler/install-the-matlab-runtime.html) |
| 62 | + |
| 63 | +**On Snellius:** |
| 64 | + |
| 65 | +[Snellius](https://servicedesk.surfsara.nl/wiki/display/WIKI/Snellius) is the |
| 66 | +Dutch National supercomputer hosted at SURF. MATLAB Runtime is installed on |
| 67 | +Snellius, see the script |
| 68 | +[`run_jupyter_lab_on_compute_node.sh`](https://github.com/EcoExtreML/processing/blob/main/run_jupyter_lab_on_compute_node.sh) |
| 69 | +on how to load the module. |
| 70 | +</details> |
| 71 | + |
| 72 | +# Run jupyter notebook |
| 73 | + |
| 74 | +Open a terminal and run: |
| 75 | + |
| 76 | +```sh |
| 77 | +jupyter lab |
| 78 | +``` |
| 79 | + |
| 80 | +JupyterLab will open automatically in your browser. |
| 81 | + |
| 82 | +**On Snellius:** |
| 83 | + |
| 84 | +Use the script |
| 85 | +[`run_jupyter_lab_on_compute_node.sh`](https://github.com/EcoExtreML/processing/blob/main/run_jupyter_lab_on_compute_node.sh) |
| 86 | +to create a jupyter lab server on Snellius for running the notebook |
| 87 | +interactively. |
| 88 | + |
| 89 | +# Run jupyter notebook on CRIB |
| 90 | + |
| 91 | +[CRIB](https://crib.utwente.nl/) is the ITC Geospatial Computing Platform. |
| 92 | +Currently, running the notebook on CRIB is not supported because MATLAB Runtime |
| 93 | +can not be installed there. |
| 94 | + |
| 95 | +# Recipe of model execution |
| 96 | + |
| 97 | +The execution of the model includes following steps: |
| 98 | + |
| 99 | +- Create exe file |
| 100 | +- Update/set config files |
| 101 | +- Create input directories, prepare input files |
| 102 | +- Run the model |
| 103 | +- Create output directories, prepare output files |
0 commit comments